-
Notifications
You must be signed in to change notification settings - Fork 0
/
Collision Course Color (2023)(oxiti8).8o
179 lines (177 loc) · 2.77 KB
/
Collision Course Color (2023)(oxiti8).8o
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
###########################################
#
# Collision Course Color
# An expansion of Collision Course that takes advantage of the HyperWAVEChip-64 extension
# Drive across the road, but watch out for the oncoming cars!
# Press W to advance, use A and D to turn left and right.
# Drive to the edge of the screen to earn a point.
# Press S after crashing to restart.
# By Oxiti8
#
###########################################
:alias px vC
:alias ex vB
:alias py v8
:alias ey v9
:alias wins vA
: main
jump real
0x43 0x43 0x4C 0x4C 0x49 0x53 0x49 0x4F 0x4E 0x43 0x4F 0x55 0x52 0x53 0x45 # COLLISIONCOURSE in ASCII, meant for HP48 SCHIP
: real
plane 15
clear
# Sets up initial color
i := roadcolor
0xF0 0x03 # plane 0
i := playercolor
0xF1 0x03 # plane 1
i := countdowncolor
0xF2 0x03 # plane 2
i := barriercolor
0xF4 0x03 # plane 4
0xF5 0x03 # plane 5
i := powcolor
0xF8 0x03 # plane 8
0x00 0xF3
# Draws the track
v1 := 0
wins := 0
ex := 58
px := 0
:call drawhoriz
v1 := 23
:call drawhoriz
# Draw the two cars on the track
py := 2
ey := 12
plane 1
i := playercar
sprite px py 5
sprite ex ey 5
plane 2
# Begin countdown
vE := 30
v4 := 3
i := hex v4
sprite vE ey 5
loop
v5 := 60
delay := v5
buzzer := v4
loop
v5 := delay
if v5 != 0 then
again
sprite vE ey 5
v4 -= 1
i := hex v4
sprite vE ey 5
if v4 != 0 then
again
sprite vE ey 5
# Begin the Race
loop
plane 3
clear
# Draws the track
plane 2
vD := 23 # Score
vE := 26
i := hundreds
bcd wins
load v0
i := hex v0
sprite vD vE 5
i := tens
vD += 7
load v0
i := hex v0
sprite vD vE 5
vD += 7
i := ones
load v0
i := hex v0
sprite vD vE 5
plane 1
v7 := px
v0 := OCTO_KEY_W
if v0 key then px += 1
if px == 64
then :call moveplayer
v0 := OCTO_KEY_A
if v0 key then py -= 1
v0 := OCTO_KEY_D
if v0 key then py += 1
ex -= 2
if ex >= 64
then :call moveenemy
v1 := 0
:call drawhoriz
v1 := 23
:call drawhoriz
plane 1
i := playercar
sprite ex ey 5
sprite px py 5
if vf == 1 then
jump lose
loop
vf := delay
if vf != 0 then
again
vf := 3
delay := vf
again
: lose
plane 8
0x00 0xF1 # OR mode
i := pow
sprite px py 15
v1 := 20
buzzer := v1
loop
0xFE 0x0A # wait for key 8
if vE != 8 then
again
jump real
: moveplayer
wins += 1
px := 0
buzzer := v4
;
: moveenemy
ey := random 0b0001111
ey += 1
ex := 62
;
: drawhoriz
0x00 0xF1
v4 := 0
plane 5
i := line
loop
sprite v4 v1 1
v4 += 8
0x34 0x40
again
0x00 0xF3
;
: roadcolor
0x50 0x50
: playercar
0x50 0xF8 0xD8 0xF8 0x50
: playercolor
0x00 0xB0 0xF0
: powcolor
0xFF 0x00 0x00
: barriercolor
0xF3 0x99 0x00
: countdowncolor
0xFF # cheating here to save 2 bytes
: line
0xFF 0xFF
: pow
0xF8 0x88 0xF8 0x80 0x80 0x00 0xF8 0x88 0x88 0xF8 0x00 0xA8 0xA8 0xA8 0x50
: hundreds 0
: tens 0
: ones 0