-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtitle.a
147 lines (137 loc) · 1.41 KB
/
title.a
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
title
!zone {
+VSync
+VBlankBegin
lda #4
sta P0LIVES
sta P1LIVES
ldx #0
ldy #0
lda INPT4
and INPT5
and #$80
bne .noplay
jsr game_init
jmp game_start
.noplay
sty PF0
sty PF1
sty PF2
lda #5
sta CTRLPF
+VBlankEnd
.lander
sta WSYNC
lda lander_pf2,y
sta PF2
inx
txa
lsr
lsr
lsr
tay
cpx #96
bne .lander
ldx #0
.break
sta WSYNC
lda #0
sta CTRLPF
sta PF0
sta PF1
sta PF2
inx
cpx #24
bne .break
ldx #0
ldy #0
.title
sta WSYNC
txa
and #$f
ora #$50
sta COLUPF
lda #0
sta PF0
lda title_left_pf1,y
sta PF1
lda title_left_pf2,y
sta PF2
nop
nop
lda title_right_pf0,y
sta PF0
lda title_right_pf1,y
sta PF1
lda title_right_pf2,y
sta PF2
inx
txa
lsr
lsr
lsr
tay
cpx #80
bne .title
.final
sta WSYNC
lda #0
sta PF0
sta PF1
sta PF2
inx
cpx #PICTURE_LINES-96-24
bne .final
}
+OverscanBegin
game_end
inc COLOR
lda COLOR
and #$f
ora WINNER_COLOR
sta COLUPF
jsr tick_music
+OverscanEnd
jmp title
tick_music
dec MUSIC_TICK
bne noplay
jsr play_music
lda #MUSIC_SPEED
sta MUSIC_TICK
noplay
lda MUSIC_COUNTER
cmp #6
beq novol
lda MUSIC_TICK
lsr
sta AUDV0
novol
rts
play_music
ldy MUSIC_COUNTER
cpy #5
beq music_off
cpy #6
beq music_off
lda music_freq,y
sta AUDF0
lda #1
sta AUDC0
lda #$f
sta AUDV0
iny
sty MUSIC_COUNTER
rts
music_off
lda #0
sta AUDF0
sta AUDC0
sta AUDV0
cpy #6
beq noenv
inc MUSIC_COUNTER
noenv
rts
music_freq
!byte 26,23,19,17,23