-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhorse.asm
158 lines (124 loc) · 3.05 KB
/
horse.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
include "lvo/exec_lib.i"
include "lvo/dos_lib.i"
MODE_OLDFILE = 1005
USE_VISUALIZER_OUTPUT = 0
ENABLE_MUSIC = 1
COMPATIBILITY = 1
FASTMEM = 0
RMBPAUSE = 0
FPUINT = 0
COPPER = 1
BLITTER = 1
SPRITE = 0
TOPAZ = 0
SECTIONHACK = -1
SCREENHEIGHT = 180
; ---------------------------------------------------------------------------
section code,code
; ---------------------------------------------------------------------------
CODE_START:
include macros.asm
include DemoStartup.S
include Rose.S
include Sinus.S
_Precalc:
lea.l RoseSinus,a0
bsr.w MakeSinus
lea.l ColorScript,a1
lea.l Constants,a2
lea.l Bytecode,a3
lea.l RoseSinus,a4
lea.l RoseChip,a5
lea.l RoseSpace,a6
bsr.w RoseInit
rts
_Main:
; _mt_init(a6=CUSTOM, a0=TrackerModule, a1=Samples|NULL, d0=InitialSongPos.b)
lea $dff000,a6
lea song,a0
sub.l a1,a1
moveq #0,d0
bsr _mt_init
; _mt_install_cia(a6=CUSTOM, a0=VectorBase, d0=PALflag.b)
lea $dff000,a6
sub.l a0,a0
moveq #1,d0
bsr _mt_install_cia
; Main demo routine, called by the startup.
; Demo will quit when this routine returns.
lea.l RoseSpace,a6
bsr.w RoseMain
rts
_Interrupt:
; Called by the vblank interrupt.
lea.l RoseSpace,a6
tst.l r_VBlank(a6)
beq.b .nomus
st.b _mt_Enable
.nomus
tst.l r_Ready(a6)
beq.b .notready
; Skip all vblank tasks (including music) until Rose is ready.
bsr.w RoseInterrupt
.notready: rts
_Exit:
rts
; ptplayer
; MINIMAL=1
include ptplayer.asm
CODE_END:
; ---------------------------------------------------------------------------
section data,data
; ---------------------------------------------------------------------------
DATA_START:
if USE_VISUALIZER_OUTPUT
ColorScript: incbin ../Rose/visualizer/colorscript.bin
even
Bytecode: incbin ../Rose/visualizer/bytecodes.bin
even
Constants: incbin ../Rose/visualizer/constants.bin
even
else
ColorScript: incbin colorscript.bin
even
Bytecode: incbin bytecodes.bin
even
Constants: incbin constants.bin
even
endif
DATA_END:
; ---------------------------------------------------------------------------
section bss,bss
; ---------------------------------------------------------------------------
BSS_START:
RoseSpace: ds.b ROSE_FASTSIZE
RoseSinus: ds.w DEGREES
BSS_END:
; ---------------------------------------------------------------------------
section bss_c,bss_c
; ---------------------------------------------------------------------------
BSS_C_START:
RoseChip: ds.b ROSE_CHIPSIZE
BSS_C_END:
; ---------------------------------------------------------------------------
section data_c,data_c
; ---------------------------------------------------------------------------
CHIP_START:
song: incbin mod.logicos
CHIP_END:
; ---------------------------------------------------------------------------
CODE_SIZE = CODE_END-CODE_START
DATA_SIZE = DATA_END-DATA_START
CHIP_SIZE = CHIP_END-CHIP_START
BSS_SIZE = BSS_END-BSS_START
BSS_C_SIZE = BSS_C_END-BSS_C_START
printt 'CODE'
printv CODE_SIZE
printt 'DATA'
printv DATA_SIZE
printt 'CHIP'
printv CHIP_SIZE
printt 'BSS'
printv BSS_SIZE
printt 'BSS_C'
printv BSS_C_SIZE