-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathintro.inc
105 lines (103 loc) · 2.51 KB
/
intro.inc
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
;-----------------------------------------------------------
; Filename: intro.asm
; Long name: Intro Screen Routine
; Author: Kerm Martian aka Christopher Mitchell
; Last Update: June 2, 2006
;
;Please consult license.txt for the fair use agreement
;implicitly binding by you continuing to read past this
;point. Close and delete this file if you do not agree
;to the terms of the agreement.
;-----------------------------------------------------------
minContrast = 10d
Intro:
ld a,($8447)
push af
ld a,minContrast
ld ($8447),a
add a,23d
or $c0
bcall(_lcd_busy)
out (LCDINSTPORT),a
bcall(_grbufclr)
ld hl,IntroImageData
ld de,gbuf+(12*16)
ld bc,12*21
ldir
call iFastCopy
pop bc
ld c,minContrast
IntroContrast:
ld a,c
ld ($8447),a
add a,23d
or $c0
bcall(_lcd_busy)
out (LCDINSTPORT),a
ld hl,$3000
call IntroPause
ld a,c
inc c
cp b
jr nz,IntroContrast
push bc
ld b,3
IntroWait:
ld hl,$0000
call IntroPause
djnz IntroWait
pop bc
IntroContrastOut:
ld a,c
ld ($8447),a
add a,23d
or $c0
bcall(_lcd_busy)
out (LCDINSTPORT),a
ld hl,$3000
call IntroPause
ld a,c
dec c
cp minContrast
jr nz,IntroContrastOut
push bc
bcall(_clrlcdfull)
pop bc
ld a,b
ld ($8447),a
add a,23d
or $c0
bcall(_lcd_busy)
out (LCDINSTPORT),a
ret
IntroPause:
dec hl
ld a,h
or l
jr nz,IntroPause
ret
IntroImageData:
.db $00,$00,$00,$00,$00
.db $00,$00,$00,$00,$00,$00,$00,$00,$1C,$00,$3F,$FE
.db $00,$03,$FF,$03,$FE,$00,$78,$00,$3E,$00,$3F,$FF
.db $C0,$0F,$FF,$8F,$FE,$03,$F8,$00,$7F,$00,$07,$01
.db $F0,$3C,$03,$9E,$0E,$07,$C0,$00,$FF,$80,$07,$00
.db $F0,$38,$03,$9C,$0E,$0F,$00,$01,$FF,$C0,$07,$00
.db $78,$70,$03,$9C,$0E,$1E,$00,$03,$F3,$E0,$07,$00
.db $3C,$F0,$03,$9C,$06,$1C,$00,$07,$E1,$F0,$07,$00
.db $3C,$E0,$00,$1E,$00,$3C,$00,$0F,$C1,$F8,$07,$00
.db $3D,$E0,$00,$1F,$00,$38,$00,$1F,$80,$FC,$07,$00
.db $1D,$E0,$00,$1F,$E0,$7F,$F0,$3F,$1C,$7E,$07,$00
.db $1F,$E0,$00,$0F,$F0,$7F,$F8,$3E,$3E,$3E,$07,$00
.db $1F,$E0,$00,$07,$FC,$78,$7C,$1C,$7F,$1C,$07,$00
.db $1F,$E0,$00,$01,$FE,$78,$3C,$00,$FF,$80,$07,$00
.db $1D,$E0,$00,$00,$3E,$70,$1E,$01,$FF,$C0,$07,$00
.db $1D,$E0,$00,$00,$1F,$70,$1E,$03,$F7,$E0,$07,$00
.db $1C,$F0,$00,$00,$0F,$70,$1E,$07,$E3,$F0,$07,$00
.db $3C,$F0,$03,$98,$0F,$78,$1E,$0F,$C1,$F8,$07,$00
.db $78,$78,$03,$98,$0F,$78,$1C,$1F,$80,$FC,$07,$00
.db $F0,$7C,$03,$98,$0E,$78,$3C,$3F,$00,$7E,$07,$03
.db $F0,$3F,$03,$98,$1E,$3C,$3C,$3E,$00,$3E,$3F,$FF
.db $C0,$0F,$FF,$9F,$FC,$1F,$F8,$1C,$00,$1C,$3F,$FE
.db $00,$03,$FF,$1F,$F0,$0F,$E0,$00,$00,$00,$00,$00
.db $00,$00,$00,$00,$00,$00,$00