-
Notifications
You must be signed in to change notification settings - Fork 0
/
PANOUT.ASM
132 lines (109 loc) · 3.69 KB
/
PANOUT.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
; pan out from centre demo
; like that of the last ASM demo on the demo cartridge.
;
; 0 black = 128
; 1 green = 143 5 white = 207
; 2 yellow= 159 6 cyan = 223
; 3 blue = 175 7 magenta = 239
; 4 red = 191 8 buff = 255
ORG $8000
CALL 01C9h ; CLS. MODE(0).
ld de, $7000 ; display to video.
ld hl, screen
ld bc, 512
ldir
ld de, $B000 ; display to video buffer.
ld hl, screen
ld bc, 512
ldir
loop0: ld hl, $b000
ld b, 255 ; FIRST LOT
loop1a: ld a, (hl)
cp 143
jr nz, norsta
ld a, 255
JR HEREA
norsta: DEC a ; increase color step + 16.
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
HEREA: ld (hl), a
INC HL
djnz loop1a
ld b, 255 ; SECOND LOT
loop1b: ld a, (hl)
cp 143
jr nz, norstb
ld a, 255
JR HEREB
norstb: DEC a ; increase color step + 16.
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
DEC a
HEREB: ld (hl), a
INC HL
djnz loop1b
LD hl,0x6800
sync2: BIT 7,(hl) ; fancy wait retrace.
jr NZ,sync2
LD hl,0x6800
sync3: BIT 7,(hl) ; fancy wait retrace.
jr Z,sync3
push de
push bc
ld hl, $B000
ld de, $7000
ld bc, 512
ldir
pop bc
pop de
LD BC,$2000
CALL 0060H ; delay
jr loop0
; 0 black = 128 5 white = 207
; 1 green = 143 6 cyan = 223
; 2 yellow= 159 7 magenta = 239
; 3 blue = 175 8 buff = 255
; 4 red = 191
screen:
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
defb 255,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, 239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,255
defb 255,239,223,223,223,223,223,223,223,223,223,223,223,223,223,223, 223,223,223,223,223,223,223,223,223,223,223,223,223,223,239,255
defb 255,239,223,207,207,207,207,207,207,207,207,207,207,207,207,207, 207,207,207,207,207,207,207,207,207,207,207,207,207,223,239,255
defb 255,239,223,207,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,207,223,239,255
defb 255,239,223,207,191,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,175,175,175,175,191,207,223,239,255
defb 255,239,223,207,191,175,159,159,159,159,159,159,159,159,159,159, 159,159,159,159,159,159,159,159,159,159,175,191,207,223,239,255
defb 255,239,223,207,191,175,159,143,143,143,143,143,143,143,143,143, 143,143,143,143,143,143,143,143,143,159,175,191,207,223,239,255
defb 255,239,223,207,191,175,159,143,143,143,143,143,143,143,143,143, 143,143,143,143,143,143,143,143,143,159,175,191,207,223,239,255
defb 255,239,223,207,191,175,159,159,159,159,159,159,159,159,159,159, 159,159,159,159,159,159,159,159,159,159,175,191,207,223,239,255
defb 255,239,223,207,191,175,175,175,175,175,175,175,175,175,175,175, 175,175,175,175,175,175,175,175,175,175,175,191,207,223,239,255
defb 255,239,223,207,191,191,191,191,191,191,191,191,191,191,191,191, 191,191,191,191,191,191,191,191,191,191,191,191,207,223,239,255
defb 255,239,223,207,207,207,207,207,207,207,207,207,207,207,207,207, 207,207,207,207,207,207,207,207,207,207,207,207,207,223,239,255
defb 255,239,223,223,223,223,223,223,223,223,223,223,223,223,223,223, 223,223,223,223,223,223,223,223,223,223,223,223,223,223,239,255
defb 255,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, 239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,255
defb 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
end