-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathshow_instructions.asm
245 lines (215 loc) · 4.03 KB
/
show_instructions.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
instruct:
db 0x99+' ',0x9A+' '," Avoid barriers and other",13
db 0x9B+' ',0x9C+' '," tall obstacles",13
db 0x9D+' ',0x9E+' ',13
db 0x84+' ',0x86+' '," Press up/down + X to spin",13
db 0x85+' ',0x87+' '," and pass between barriers",13
db 0x80+' ',0x82+' '," Use looping to avoid",13
db 0x81+' ',0x83+' '," enemy bullets",13
db 0x88+' ',0x89+' ',0x88+' ',13
db 0x8B+' ',0x8C+' ',0x8B+' '," Destroy ground targets",13
db 0x8D+' ',0x8E+' ',0x8F+' '," to weaken Dreadnought's",13
db 0x90+' ',0x91+' ',0x92+' '," defense",13
db 0x88+' ',0x93+' ',0x94+' ',13
db 0x88+' ',0x95+' ',0x96+' ',13
db "Land on the main runway of",13
db "each Dreadnought and activate",13
db "its self destruction system",13
show_instructions:
call cls
call _color_set
call _destr_set
ld de,instruct
ld hl,0x1800+32*1+2
call prstr
ld hl,0x1800+32*2+2
call prstr
ld hl,0x1800+32*3+2
call prstr
ld hl,0x1800+32*5+2
call prstr
ld hl,0x1800+32*6+2
call prstr
ld hl,0x1800+32*8+2
call prstr
ld hl,0x1800+32*9+2
call prstr
ld hl,0x1800+32*11+2
call prstr
ld hl,0x1800+32*12+2
call prstr
ld hl,0x1800+32*13+2
call prstr
ld hl,0x1800+32*14+2
call prstr
ld hl,0x1800+32*15+2
call prstr
ld hl,0x1800+32*16+2
call prstr
ld hl,0x1800+32*18+2
call prstr
ld hl,0x1800+32*19+2
call prstr
ld hl,0x1800+32*20+2
call prstr
ld de,0x1800+32*22+8
call setwrtvram
ld bc,0x1098
1: ld hl,runway_map
outi
nop
nop
outi
jr nz,1b
ld hl,runway_map
outi
ld de,0x1800+32*23+8
call setwrtvram
ld bc,0x1098
1: ld hl,runway_map+2
outi
nop
nop
outi
jr nz,1b
ld hl,runway_map+2
outi
ei
3:
xor a
ld (aniframe),a
2: halt
call plot_spt_char_anim
ld b,10
1: halt
djnz 1b
ld a,(aniframe)
inc a
ld (aniframe),a
cp 32
jr z,3b
call joy_read
and 0x13 ; up/down/fire
jp nz,return
jr 2b
plot_spt_char_anim:
setvdpwvram 0x0400
ld a,(aniframe)
and 7
call 1f
setvdpwvram 0x0C00
ld a,(aniframe)
and 7
call 1f
; setvdpwvram 0x1400
; ld a,(aniframe)
; and 7
; call 1f
setvdpwvram 0x0420
ld a,(aniframe)
and 15
add a,32
call 1f
setvdpwvram 0x0C20
ld a,(aniframe)
and 15
add a,32
; call 1f
; setvdpwvram 0x1420
; ld a,(aniframe)
; and 15
; add a,32
; call 1f
; ret
1: ld hl,ms_ani
ld c,a
ld b,0
add hl,bc
ld l,(hl)
ld h,b
add hl,hl
add hl,hl
add hl,hl
add hl,hl
add hl,hl
ld e,l
ld d,h
add hl,hl
add hl,de
ld de,ms_spt
add hl,de
ld bc,0x2098
1: outi
jr nz,1b
ret
; set colours
_color_set
setvdpwvram (0x2000+128*8)
call 1f
setvdpwvram (0x2800+128*8)
call 1f
setvdpwvram (0x3000+128*8)
1: ld b,8*8
1: ld a,0xF1
out (0x98),a
djnz 1b
ret
_destr_set:
halt
setvdpwvram (0x0000+136*8)
call 2f
setvdpwvram (0x0800+136*8)
call 2f
setvdpwvram (0x1000+136*8)
call 2f
setvdpwvram (0x2000+136*8)
call 1f
setvdpwvram (0x2800+136*8)
call 1f
setvdpwvram (0x3000+136*8)
1:
ld hl,destruct_colors
ld bc,23*8*256+0x98
11: outi
jr nz,11b
ret
2:
ld hl,destruct_tiles
ld bc,23*8*256+0x98
11: outi
jr nz,11b
ret
destruct_tiles:
incbin destr_shape.bin
runway_shape:
db 0x00,0x00,0x00,0x00,0x00,0xC0,0x07,0x01
db 0x01,0x07,0xC0,0x00,0x00,0x00,0x00,0xFF
barrier_shape:
db 0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40 ;
db 0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02 ;
db 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 ;
db 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02 ;
db 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x80 ;
db 0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01 ;
destruct_colors:
incbin destr_col.bin
runway_col:
db 0x55,0x44,0x44,0x44,0x44,0xA4,0x4A,0x4A
db 0x4A,0x4A,0xA4,0x44,0x44,0x44,0x44,0x11
barrier_col:
db 0x4C,0xC4,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C
db 0x1C,0xC1,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C
db 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0x4C
db 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C
db 0x4C,0x4C,0x4C,0x4C,0x4C,0x4C,0xC4,0x4C
db 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xC1,0x1C
; destruct_map
; db 0x00,0x01,0x00
; db 0x03,0x04,0x03
; db 0x05,0x06,0x07
; db 0x08,0x09,0x0A
; db 0x00,0x0B,0x0C
; db 0x00,0x0D,0x0E
runway_map:
db 0x8D,0x97
db 0x90,0x98