-
Notifications
You must be signed in to change notification settings - Fork 0
/
ident.asm
260 lines (236 loc) · 4.47 KB
/
ident.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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
; IDENT
;----------------------------------------------
ident.gfx: mdat "ident.raw" ; graphics
ident.anim_data:
; Animation data, each entry is frame, delay, position
db 6,1
dw (91*256+123)/2 ; Fade in
db 7,1
dw (91*256+123)/2
db 8,1
dw (91*256+123)/2
db 9,25
dw (91*256+123)/2
db 10,1 ; Red blink x2
dw (91*256+123)/2
db 11,1
dw (91*256+123)/2
db 12,1
dw (91*256+123)/2
db 11,4
dw (91*256+123)/2
db 10,1
dw (91*256+123)/2
db 9,30
dw (91*256+123)/2
db 10,1
dw (91*256+123)/2
db 11,1
dw (91*256+123)/2
db 12,1
dw (91*256+123)/2
db 11,4
dw (91*256+123)/2
db 10,1
dw (91*256+123)/2
db 9,15
dw (91*256+123)/2
db 0,2 ; Open circle
dw (86*256+123)/2
db 1,2
dw (86*256+123)/2
db 2,2
dw (86*256+123)/2
db 3,2
dw (86*256+123)/2
db 4,2
dw (86*256+123)/2
db 5,0
dw (86*256+123)/2
db 13,0
dw (86*256+129)/2
db 19,1 ; Scroll on logo
dw (86*256+129)/2
db 18,1
dw (86*256+129)/2
db 17,1
dw (86*256+129)/2
db 16,1
dw (86*256+129)/2
db 15,1
dw (86*256+129)/2
db 21,1
dw (86*256+129)/2
db 14,70
dw (86*256+129)/2
db 21,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+50)/2
db 15,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+44)/2
db 16,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+36)/2
db 17,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+28)/2
db 18,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+20)/2
db 19,0
dw (86*256+129)/2
db 20,1
dw (86*256+129+12)/2
db 20,1
dw (86*256+129)/2
db 4,2
dw (86*256+123)/2
db 3,2
dw (86*256+123)/2
db 2,2
dw (86*256+123)/2
db 1,2
dw (86*256+123)/2
db 0,20
dw (86*256+123)/2
db 9,1
dw (91*256+123)/2
db 8,1
dw (91*256+123)/2
db 7,1
dw (91*256+123)/2
db 6,1
dw (91*256+123)/2
db 0,255,0,0
;----------------------------------------------
ident.frame_data:
dw ident.gfx+0 ;0 Opening circle
db 5,20
dw ident.gfx+5
db 5,20
dw ident.gfx+10
db 5,20
dw ident.gfx+15
db 5,20
dw ident.gfx+20
db 5,20
dw ident.gfx+25
db 3,20
dw ident.gfx+54 ;6 Fade in circle
db 5,10
dw ident.gfx+59
db 5,10
dw ident.gfx+64
db 5,10
dw ident.gfx+69 ;9 Full circle (black spot)
db 5,10
dw ident.gfx+74 ; Dark red
db 5,10
dw ident.gfx+79 ; red
db 5,10
dw ident.gfx+84 ; Yellow
db 5,10
dw ident.gfx+89 ;13 Blank
db 2,20
dw ident.gfx+28 ;14 rest of logo anims
db 26,20
dw ident.gfx+32
db 22,20
dw ident.gfx+36
db 18,20
dw ident.gfx+40
db 14,20
dw ident.gfx+44
db 10,20
dw ident.gfx+94
db 6,20
dw ident.gfx+89 ;20 bigger blank
db 10,20
dw ident.gfx+29
db 25,20
ident.palette: db 8,62,50,33,2,15,38,40,10,112,4,12,66,106,119,127
;----------------------------------------------
ident.run:
call house.clear_screens
call house.double_buffer.off
@set_palette:
ld hl,ident.palette+15
ld bc,&10f8
otdr
ld a,30
call PauseA
ld ix,ident.anim_data
@loop:
call ident.get_frame
cp 255
jp z,@+end
call ident.print
cp 0
jp z,@-loop
call PauseA
jp @-loop
@end:
call house.double_buffer.on
call house.clear_screens
ret
ident.get_frame:
ld a,(ix)
inc ix
add a
add a
ld e,a
ld d,0
ld hl,ident.frame_data
add hl,de
ld e,(hl)
inc hl
ld d,(hl)
inc hl
ld b,(hl) ; b=width
inc hl
ld c,(hl) ; c=depth
ex de,hl ; hl=source
ld a,(ix) ; a=delay
inc ix
ld e,(ix) ; de=print position
inc ix
ld d,(ix)
inc ix
ret
ident.print:
push af
@loop2:
push bc
push hl
push de
@loop1:
push bc
ldi
pop bc
djnz @-loop1
pop hl
ld bc,128
add hl,bc
ex de,hl
pop hl
add hl,bc
pop bc
dec c
jp nz,@-loop2
pop af
ret
PauseA:
ld b,a
@loop:
call house.wait_frame
dec b
ret z
ld a,191
call house.wait_lineA
jp @-loop