git @ Cat's Eye Technologies SixtyPical / 689670a
Small bugfixes and changes. Chris Pressey 3 years ago
5 changed file(s) with 503 addition(s) and 502 deletion(s). Raw diff Collapse all Expand all
00 SixtyPical
11 ==========
22
3 _Version 0.13. Work-in-progress, everything is subject to change._
3 _Version 0.14. Work-in-progress, everything is subject to change._
44
55 **SixtyPical** is a 6502-assembly-like programming language with advanced
66 static analysis.
5050 ![Screenshot of result of running hearts.60p](https://raw.github.com/catseye/SixtyPical/master/images/hearts.png)
5151
5252 You can try the `loadngo.sh` script on other sources in the `eg` directory
53 tree. There is an entire small game(-like program) in [demo-game.60p](eg/c64/demo-game.60p).
53 tree. There is an entire small game(-like program) in [demo-game.60p](eg/c64/demo-game/demo-game.60p).
5454
5555 Documentation
5656 -------------
0 // ****************************
1 // * Demo Game for SixtyPical *
2 // ****************************
3
4 // ----------------------------------------------------------------
5 // Type Definitions
6 // ----------------------------------------------------------------
7
8 //
9 // Type of routines (and vectors to those routines) which are called on each frame
10 // to implement a certain state of the game (title screen, in play, game over, etc.)
11 //
12 // This type is also used as the type for the interrupt vector, even though
13 // the interrupt routine saves and restores everything before being called and
14 // thus clearly does not actually trash all the registers. It is declared this
15 // way so that the game state routines, which do trash these registers, can be
16 // assigned to it.
17 //
18 // This type is also used as the type for the location the old interrupt vector
19 // is backed up to, because all the game state routines `goto` the old handler
20 // and the end of their own routines, so the type needs to be compatible.
21 // (In a good sense, it is a continuation.)
22 //
23 // Further,
24 //
25 // It's very arguable that screen1/2/3/4 and colormap1/2/3/4 are not REALLY inputs.
26 // They're only there to support the fact that game states sometimes clear the
27 // screen, and sometimes don't. When they don't, they preserve the screen, and
28 // currently the way to say "we preserve the screen" is to have it as both input
29 // and output. There is probably a better way to do this, but it needs thought.
30 //
31
32 typedef routine
33 inputs joy2, press_fire_msg, dispatch_game_state,
34 actor_pos, actor_delta, actor_logic,
35 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
36 outputs dispatch_game_state,
37 actor_pos, actor_delta, actor_logic,
38 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
39 trashes a, x, y, c, z, n, v, pos, new_pos, delta, ptr, dispatch_logic
40 game_state_routine
41
42 //
43 // Routines that are called to get the new state of each actor (player, enemy, etc.)
44 //
45 // Routines that conform to this type also follow this convention:
46 //
47 // Set carry if the player perished. Carry clear otherwise.
48 //
49
50 typedef routine
51 inputs pos, delta, joy2, screen
52 outputs pos, delta, new_pos, screen, c
53 trashes a, x, y, z, n, v, ptr
54 logic_routine
55
56 // ----------------------------------------------------------------
57 // System Locations
58 // ----------------------------------------------------------------
59
60 byte vic_border @ 53280
61 byte vic_bg @ 53281
62
63 byte table[256] screen1 @ 1024
64 byte table[256] screen2 @ 1274
65 byte table[256] screen3 @ 1524
66 byte table[256] screen4 @ 1774
67
68 byte table[256] colormap1 @ 55296
69 byte table[256] colormap2 @ 55546
70 byte table[256] colormap3 @ 55796
71 byte table[256] colormap4 @ 56046
72
73 buffer[2048] screen @ 1024
74 byte joy2 @ $dc00
75
76 // ----------------------------------------------------------------
77 // Global Variables
78 // ----------------------------------------------------------------
79
80 pointer ptr @ 254
81
82 word table[256] actor_pos
83 word pos
84 word new_pos
85
86 word table[256] actor_delta
87 word delta
88
89 vector logic_routine table[256] actor_logic
90 vector logic_routine dispatch_logic
91
92 byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
93
94 //
95 // Points to the routine that implements the current game state.
96 //
97
98 vector game_state_routine
99 dispatch_game_state
100
101 //
102 // Interrupt vector. Has same type as game states (see above.)
103 //
104
105 vector game_state_routine
106 cinv @ 788
107
108 //
109 // Location to which the old interrupt vector is saved before replacement.
110 //
111
112 vector game_state_routine
113 save_cinv
114
115 // ----------------------------------------------------------------
116 // Utility Routines
117 // ----------------------------------------------------------------
118
119 routine read_stick
120 inputs joy2
121 outputs delta
122 trashes a, x, z, n
123 {
124 ld x, joy2
125 ld a, x
126 and a, 1 // up
127 if z {
128 copy $ffd8, delta // -40
129 } else {
130 ld a, x
131 and a, 2 // down
132 if z {
133 copy word 40, delta
134 } else {
135 ld a, x
136 and a, 4 // left
137 if z {
138 copy $ffff, delta // -1
139 } else {
140 ld a, x
141 and a, 8 // right
142 if z {
143 copy word 1, delta
144 } else {
145 copy word 0, delta
146 }
147 }
148 }
149 }
150 }
151
152 // You can repeatedly (i.e. as part of actor logic or an IRQ handler)
153 // call this routine.
154 // Upon return, if carry is set, the button was pressed then released.
155
156 define check_button routine
157 inputs joy2
158 outputs c
159 trashes a, z, n
160 static byte button_down : 0
161 {
162 ld a, button_down
163 if z {
164 ld a, joy2
165 and a, $10
166 if z {
167 ld a, 1
168 st a, button_down
169 }
170 st off, c
171 } else {
172 ld a, joy2
173 and a, $10
174 if not z {
175 ld a, 0
176 st a, button_down
177 st on, c
178 } else {
179 st off, c
180 }
181 }
182 }
183
184 routine clear_screen
185 outputs screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
186 trashes a, y, c, n, z
187 {
188 ld y, 0
189 repeat {
190 ld a, 1
191 st a, colormap1 + y
192 st a, colormap2 + y
193 st a, colormap3 + y
194 st a, colormap4 + y
195
196 ld a, 32
197 st a, screen1 + y
198 st a, screen2 + y
199 st a, screen3 + y
200 st a, screen4 + y
201
202 inc y
203 cmp y, 250
204 } until z
205 }
206
207 routine calculate_new_position
208 inputs pos, delta
209 outputs new_pos
210 trashes a, c, n, z, v
211 {
212 copy pos, new_pos
213 st off, c
214 add new_pos, delta
215 }
216
217 define check_new_position_in_bounds routine
218 inputs new_pos
219 outputs c
220 trashes a, z, n, v
221 static word compare_target : 0
222 {
223 copy 1000, compare_target
224 st on, c
225 sub compare_target, new_pos
226
227 if not c {
228 copy word 0, compare_target
229 st on, c
230 sub compare_target, new_pos
231 if not c {
232 st off, c
233 } else {
234 st on, c
235 }
236 } else {
237 st on, c
238 }
239 }
240
241 routine init_game
242 inputs actor_pos, actor_delta, actor_logic
243 outputs actor_pos, actor_delta, actor_logic
244 trashes pos, a, y, z, n, c, v
245 {
246 ld y, 0
247 copy word 0, pos
248 repeat {
249 copy pos, actor_pos + y
250 copy word 40, actor_delta + y
251 copy enemy_logic, actor_logic + y
252
253 st off, c
254 add pos, word 7
255
256 inc y
257 cmp y, 16
258 } until z
259
260 ld y, 0
261 copy word 0, actor_pos + y
262 copy word 0, actor_delta + y
263 copy player_logic, actor_logic + y
264 }
265
266 // ----------------------------------------------------------------
267 // Actor Logics
268 // ----------------------------------------------------------------
269
270 define player_logic logic_routine
271 {
272 call read_stick
273
274 call calculate_new_position
275 call check_new_position_in_bounds
276
277 if c {
278 copy ^screen, ptr
279 st off, c
280 add ptr, new_pos
281 ld y, 0
282
283 // check collision.
284 ld a, [ptr] + y
285 // if "collision" is with your own self, treat it as if it's blank space!
286 cmp a, 81
287 if z {
288 ld a, 32
289 }
290 cmp a, 32
291 if z {
292 copy ^screen, ptr
293 st off, c
294 add ptr, pos
295 copy 32, [ptr] + y
296
297 copy new_pos, pos
298
299 copy ^screen, ptr
300 st off, c
301 add ptr, pos
302 copy 81, [ptr] + y
303
304 st off, c
305 } else {
306 st on, c
307 }
308
309 // FIXME these trashes, strictly speaking, probably shouldn't be needed,
310 // but currently the compiler cares a little too much about values that are
311 // initialized in one branch of an `if`, but not the other, but are trashed
312 // at the end of the routine anyway.
313 trash ptr
314 trash y
315 trash v
316 } else {
317 st off, c
318 }
319 }
320
321 define enemy_logic logic_routine
322 static word compare_target : 0
323 {
324 call calculate_new_position
325 call check_new_position_in_bounds
326
327 if c {
328 copy ^screen, ptr
329 st off, c
330 add ptr, new_pos
331 ld y, 0
332
333 // check collision.
334 ld a, [ptr] + y
335 // if "collision" is with your own self, treat it as if it's blank space!
336 cmp a, 82
337 if z {
338 ld a, 32
339 }
340 cmp a, 32
341 if z {
342 copy ^screen, ptr
343 st off, c
344 add ptr, pos
345 copy 32, [ptr] + y
346
347 copy new_pos, pos
348
349 copy ^screen, ptr
350 st off, c
351 add ptr, pos
352 copy 82, [ptr] + y
353
354 st off, c
355 } else {
356 st on, c
357 }
358
359 // FIXME these trashes, strictly speaking, probably shouldn't be needed,
360 // but currently the compiler cares too much about values that are
361 // initialized in one branch of an `if`, but not the other, but trashed
362 // at the end of the routine anyway.
363 trash ptr
364 trash y
365 } else {
366 copy delta, compare_target
367 st on, c
368 sub compare_target, word 40
369 if not z {
370 copy word 40, delta
371 } else {
372 copy $ffd8, delta
373 }
374 }
375
376 st off, c
377 }
378
379 // ----------------------------------------------------------------
380 // Game States
381 // ----------------------------------------------------------------
382
383 define game_state_title_screen game_state_routine
384 {
385 ld y, 0
386 repeat {
387
388 // First we "clip" the index to 0-31 to ensure we don't
389 // read outside the bounds of the table:
390 ld a, y
391 and a, 31
392 ld y, a
393
394 ld a, press_fire_msg + y
395
396 st on, c
397 sub a, 64 // yuck. oh well
398
399 st a, screen1 + y
400 inc y
401 cmp y, 18
402 } until z
403
404 st off, c
405 call check_button
406
407 if c {
408 call clear_screen
409 call init_game
410 copy game_state_play, dispatch_game_state
411 }
412
413 goto save_cinv
414 }
415
416 define game_state_play game_state_routine
417 static byte save_x : 0
418 {
419 ld x, 0
420 repeat {
421 copy actor_pos + x, pos
422 copy actor_delta + x, delta
423
424 st x, save_x
425
426 copy actor_logic + x, dispatch_logic
427 call dispatch_logic
428
429 if c {
430 // Player died! Want no dead! Break out of the loop (this is a bit awkward.)
431 call clear_screen
432 copy game_state_game_over, dispatch_game_state
433 ld x, 15
434 } else {
435 ld x, save_x
436 }
437
438 copy pos, actor_pos + x
439 copy delta, actor_delta + x
440
441 inc x
442 cmp x, 16
443 } until z
444
445 goto save_cinv
446 }
447
448 define game_state_game_over game_state_routine
449 {
450 st off, c
451 call check_button
452
453 if c {
454 call clear_screen
455 call init_game
456 copy game_state_title_screen, dispatch_game_state
457 }
458
459 goto save_cinv
460 }
461
462 // *************************
463 // * Main Game Loop Driver *
464 // *************************
465
466 define our_cinv game_state_routine
467 {
468 goto dispatch_game_state
469 }
470
471 routine main
472 inputs cinv
473 outputs cinv, save_cinv, pos, dispatch_game_state,
474 screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
475 trashes a, y, n, c, z, vic_border, vic_bg
476 {
477 ld a, 5
478 st a, vic_border
479 ld a, 0
480 st a, vic_bg
481 ld y, 0
482
483 call clear_screen
484
485 copy game_state_title_screen, dispatch_game_state
486
487 copy word 0, pos
488 with interrupts off {
489 copy cinv, save_cinv
490 copy our_cinv, cinv
491 }
492
493 repeat { } forever
494 }
+0
-495
eg/c64/demo-game.60p less more
0 // ****************************
1 // * Demo Game for SixtyPical *
2 // ****************************
3
4 // ----------------------------------------------------------------
5 // Type Definitions
6 // ----------------------------------------------------------------
7
8 //
9 // Type of routines (and vectors to those routines) which are called on each frame
10 // to implement a certain state of the game (title screen, in play, game over, etc.)
11 //
12 // This type is also used as the type for the interrupt vector, even though
13 // the interrupt routine saves and restores everything before being called and
14 // thus clearly does not actually trash all the registers. It is declared this
15 // way so that the game state routines, which do trash these registers, can be
16 // assigned to it.
17 //
18 // This type is also used as the type for the location the old interrupt vector
19 // is backed up to, because all the game state routines `goto` the old handler
20 // and the end of their own routines, so the type needs to be compatible.
21 // (In a good sense, it is a continuation.)
22 //
23 // Further,
24 //
25 // It's very arguable that screen1/2/3/4 and colormap1/2/3/4 are not REALLY inputs.
26 // They're only there to support the fact that game states sometimes clear the
27 // screen, and sometimes don't. When they don't, they preserve the screen, and
28 // currently the way to say "we preserve the screen" is to have it as both input
29 // and output. There is probably a better way to do this, but it needs thought.
30 //
31
32 typedef routine
33 inputs joy2, press_fire_msg, dispatch_game_state,
34 actor_pos, actor_delta, actor_logic,
35 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
36 outputs dispatch_game_state,
37 actor_pos, actor_delta, actor_logic,
38 screen, screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
39 trashes a, x, y, c, z, n, v, pos, new_pos, delta, ptr, dispatch_logic
40 game_state_routine
41
42 //
43 // Routines that are called to get the new state of each actor (player, enemy, etc.)
44 //
45 // Routines that conform to this type also follow this convention:
46 //
47 // Set carry if the player perished. Carry clear otherwise.
48 //
49
50 typedef routine
51 inputs pos, delta, joy2, screen
52 outputs pos, delta, new_pos, screen, c
53 trashes a, x, y, z, n, v, ptr
54 logic_routine
55
56 // ----------------------------------------------------------------
57 // System Locations
58 // ----------------------------------------------------------------
59
60 byte vic_border @ 53280
61 byte vic_bg @ 53281
62
63 byte table[256] screen1 @ 1024
64 byte table[256] screen2 @ 1274
65 byte table[256] screen3 @ 1524
66 byte table[256] screen4 @ 1774
67
68 byte table[256] colormap1 @ 55296
69 byte table[256] colormap2 @ 55546
70 byte table[256] colormap3 @ 55796
71 byte table[256] colormap4 @ 56046
72
73 buffer[2048] screen @ 1024
74 byte joy2 @ $dc00
75
76 // ----------------------------------------------------------------
77 // Global Variables
78 // ----------------------------------------------------------------
79
80 pointer ptr @ 254
81
82 word table[256] actor_pos
83 word pos
84 word new_pos
85
86 word table[256] actor_delta
87 word delta
88
89 vector logic_routine table[256] actor_logic
90 vector logic_routine dispatch_logic
91
92 byte table[32] press_fire_msg: "PRESS`FIRE`TO`PLAY"
93
94 //
95 // Points to the routine that implements the current game state.
96 //
97
98 vector game_state_routine
99 dispatch_game_state
100
101 //
102 // Interrupt vector. Has same type as game states (see above.)
103 //
104
105 vector game_state_routine
106 cinv @ 788
107
108 //
109 // Location to which the old interrupt vector is saved before replacement.
110 //
111
112 vector game_state_routine
113 save_cinv
114
115 // ----------------------------------------------------------------
116 // Utility Routines
117 // ----------------------------------------------------------------
118
119 routine read_stick
120 inputs joy2
121 outputs delta
122 trashes a, x, z, n
123 {
124 ld x, joy2
125 ld a, x
126 and a, 1 // up
127 if z {
128 copy $ffd8, delta // -40
129 } else {
130 ld a, x
131 and a, 2 // down
132 if z {
133 copy word 40, delta
134 } else {
135 ld a, x
136 and a, 4 // left
137 if z {
138 copy $ffff, delta // -1
139 } else {
140 ld a, x
141 and a, 8 // right
142 if z {
143 copy word 1, delta
144 } else {
145 copy word 0, delta
146 }
147 }
148 }
149 }
150 }
151
152 // You can repeatedly (i.e. as part of actor logic or an IRQ handler)
153 // call this routine.
154 // Upon return, if carry is set, the button was pressed then released.
155
156 define check_button routine
157 inputs joy2
158 outputs c
159 trashes a, z, n
160 static byte button_down : 0
161 {
162 ld a, button_down
163 if z {
164 ld a, joy2
165 and a, $10
166 if z {
167 ld a, 1
168 st a, button_down
169 }
170 st off, c
171 } else {
172 ld a, joy2
173 and a, $10
174 if not z {
175 ld a, 0
176 st a, button_down
177 st on, c
178 } else {
179 st off, c
180 }
181 }
182 }
183
184 routine clear_screen
185 outputs screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
186 trashes a, y, c, n, z
187 {
188 ld y, 0
189 repeat {
190 ld a, 1
191 st a, colormap1 + y
192 st a, colormap2 + y
193 st a, colormap3 + y
194 st a, colormap4 + y
195
196 ld a, 32
197 st a, screen1 + y
198 st a, screen2 + y
199 st a, screen3 + y
200 st a, screen4 + y
201
202 inc y
203 cmp y, 250
204 } until z
205 }
206
207 routine calculate_new_position
208 inputs pos, delta
209 outputs new_pos
210 trashes a, c, n, z, v
211 {
212 copy pos, new_pos
213 st off, c
214 add new_pos, delta
215 }
216
217 define check_new_position_in_bounds routine
218 inputs new_pos
219 outputs c
220 trashes a, z, n, v
221 static word compare_target : 0
222 {
223 copy 1000, compare_target
224 st on, c
225 sub compare_target, new_pos
226
227 if not c {
228 copy word 0, compare_target
229 st on, c
230 sub compare_target, new_pos
231 if not c {
232 st off, c
233 } else {
234 st on, c
235 }
236 } else {
237 st on, c
238 }
239 }
240
241 routine init_game
242 inputs actor_pos, actor_delta, actor_logic
243 outputs actor_pos, actor_delta, actor_logic
244 trashes pos, a, y, z, n, c, v
245 {
246 ld y, 0
247 copy word 0, pos
248 repeat {
249 copy pos, actor_pos + y
250 copy word 40, actor_delta + y
251 copy enemy_logic, actor_logic + y
252
253 st off, c
254 add pos, word 7
255
256 inc y
257 cmp y, 16
258 } until z
259
260 ld y, 0
261 copy word 0, actor_pos + y
262 copy word 0, actor_delta + y
263 copy player_logic, actor_logic + y
264 }
265
266 // ----------------------------------------------------------------
267 // Actor Logics
268 // ----------------------------------------------------------------
269
270 define player_logic logic_routine
271 {
272 call read_stick
273
274 call calculate_new_position
275 call check_new_position_in_bounds
276
277 if c {
278 copy ^screen, ptr
279 st off, c
280 add ptr, new_pos
281 ld y, 0
282
283 // check collision.
284 ld a, [ptr] + y
285 // if "collision" is with your own self, treat it as if it's blank space!
286 cmp a, 81
287 if z {
288 ld a, 32
289 }
290 cmp a, 32
291 if z {
292 copy ^screen, ptr
293 st off, c
294 add ptr, pos
295 copy 32, [ptr] + y
296
297 copy new_pos, pos
298
299 copy ^screen, ptr
300 st off, c
301 add ptr, pos
302 copy 81, [ptr] + y
303
304 st off, c
305 } else {
306 st on, c
307 }
308
309 // FIXME these trashes, strictly speaking, probably shouldn't be needed,
310 // but currently the compiler cares a little too much about values that are
311 // initialized in one branch of an `if`, but not the other, but are trashed
312 // at the end of the routine anyway.
313 trash ptr
314 trash y
315 trash v
316 } else {
317 st off, c
318 }
319 }
320
321 define enemy_logic logic_routine
322 static word compare_target : 0
323 {
324 call calculate_new_position
325 call check_new_position_in_bounds
326
327 if c {
328 copy ^screen, ptr
329 st off, c
330 add ptr, new_pos
331 ld y, 0
332
333 // check collision.
334 ld a, [ptr] + y
335 // if "collision" is with your own self, treat it as if it's blank space!
336 cmp a, 82
337 if z {
338 ld a, 32
339 }
340 cmp a, 32
341 if z {
342 copy ^screen, ptr
343 st off, c
344 add ptr, pos
345 copy 32, [ptr] + y
346
347 copy new_pos, pos
348
349 copy ^screen, ptr
350 st off, c
351 add ptr, pos
352 copy 82, [ptr] + y
353
354 st off, c
355 } else {
356 st on, c
357 }
358
359 // FIXME these trashes, strictly speaking, probably shouldn't be needed,
360 // but currently the compiler cares too much about values that are
361 // initialized in one branch of an `if`, but not the other, but trashed
362 // at the end of the routine anyway.
363 trash ptr
364 trash y
365 } else {
366 copy delta, compare_target
367 st on, c
368 sub compare_target, word 40
369 if not z {
370 copy word 40, delta
371 } else {
372 copy $ffd8, delta
373 }
374 }
375
376 st off, c
377 }
378
379 // ----------------------------------------------------------------
380 // Game States
381 // ----------------------------------------------------------------
382
383 define game_state_title_screen game_state_routine
384 {
385 ld y, 0
386 repeat {
387
388 // First we "clip" the index to 0-31 to ensure we don't
389 // read outside the bounds of the table:
390 ld a, y
391 and a, 31
392 ld y, a
393
394 ld a, press_fire_msg + y
395
396 st on, c
397 sub a, 64 // yuck. oh well
398
399 st a, screen1 + y
400 inc y
401 cmp y, 18
402 } until z
403
404 st off, c
405 call check_button
406
407 if c {
408 call clear_screen
409 call init_game
410 copy game_state_play, dispatch_game_state
411 }
412
413 goto save_cinv
414 }
415
416 define game_state_play game_state_routine
417 static byte save_x : 0
418 {
419 ld x, 0
420 repeat {
421 copy actor_pos + x, pos
422 copy actor_delta + x, delta
423
424 st x, save_x
425
426 copy actor_logic + x, dispatch_logic
427 call dispatch_logic
428
429 if c {
430 // Player died! Want no dead! Break out of the loop (this is a bit awkward.)
431 call clear_screen
432 copy game_state_game_over, dispatch_game_state
433 ld x, 15
434 } else {
435 ld x, save_x
436 }
437
438 copy pos, actor_pos + x
439 copy delta, actor_delta + x
440
441 inc x
442 cmp x, 16
443 } until z
444
445 goto save_cinv
446 }
447
448 define game_state_game_over game_state_routine
449 {
450 st off, c
451 call check_button
452
453 if c {
454 call clear_screen
455 call init_game
456 copy game_state_title_screen, dispatch_game_state
457 }
458
459 goto save_cinv
460 }
461
462 // *************************
463 // * Main Game Loop Driver *
464 // *************************
465
466 define our_cinv game_state_routine
467 {
468 goto dispatch_game_state
469 }
470
471 routine main
472 inputs cinv
473 outputs cinv, save_cinv, pos, dispatch_game_state,
474 screen1, screen2, screen3, screen4, colormap1, colormap2, colormap3, colormap4
475 trashes a, y, n, c, z, vic_border, vic_bg
476 {
477 ld a, 5
478 st a, vic_border
479 ld a, 0
480 st a, vic_bg
481 ld y, 0
482
483 call clear_screen
484
485 copy game_state_title_screen, dispatch_game_state
486
487 copy word 0, pos
488 with interrupts off {
489 copy cinv, save_cinv
490 copy our_cinv, cinv
491 }
492
493 repeat { } forever
494 }
1111 // a future version of SixtyPical.
1212 //
1313
14 vector cinv
14 vector routine
1515 inputs vic_border
1616 outputs vic_border
1717 trashes z, n
18 @ 788
18 cinv @ 788
1919
20 vector save_cinv
20 vector routine
2121 inputs vic_border
2222 outputs vic_border
2323 trashes z, n
24 save_cinv
2425
2526 routine our_cinv
2627 inputs vic_border
6161 if self.token == token:
6262 self.scan()
6363 else:
64 raise SixtyPicalSyntaxError(self.scanner.line_number, "Expected '{}', but found '{}'".format(
64 raise SixtyPicalSyntaxError(self.line_number, "Expected '{}', but found '{}'".format(
6565 token, self.token
6666 ))
6767
7373
7474 def check_type(self, type):
7575 if not self.type == type:
76 raise SixtyPicalSyntaxError(self.scanner.line_number, "Expected {}, but found '{}'".format(
76 raise SixtyPicalSyntaxError(self.line_number, "Expected {}, but found '{}'".format(
7777 self.type, self.token
7878 ))
7979