mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-09 11:54:59 +00:00
space_bars: more infrastructure
This commit is contained in:
parent
0d8fa4ea5a
commit
a46ab96d51
@ -14,7 +14,8 @@ space_bars.dsk: SPACE_BARS
|
|||||||
SPACE_BARS: space_bars.o
|
SPACE_BARS: space_bars.o
|
||||||
ld65 -o SPACE_BARS space_bars.o -C ../linker_scripts/apple2_1000.inc
|
ld65 -o SPACE_BARS space_bars.o -C ../linker_scripts/apple2_1000.inc
|
||||||
|
|
||||||
space_bars.o: space_bars.s instructions.s gr_copy.s text_print.s title.s \
|
space_bars.o: space_bars.s instructions.s game.s \
|
||||||
|
game_over.s gr_copy.s text_print.s title.s \
|
||||||
spacebars_title.inc
|
spacebars_title.inc
|
||||||
ca65 -o space_bars.o space_bars.s -l space_bars.lst
|
ca65 -o space_bars.o space_bars.s -l space_bars.lst
|
||||||
|
|
||||||
|
27
space_bars/game.s
Normal file
27
space_bars/game.s
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
;================================
|
||||||
|
; Show some instructions
|
||||||
|
; return when a key is pressed
|
||||||
|
;================================
|
||||||
|
|
||||||
|
game:
|
||||||
|
;===================
|
||||||
|
; init screen
|
||||||
|
bit LORES
|
||||||
|
bit SET_GR
|
||||||
|
bit FULLGR
|
||||||
|
bit KEYRESET
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; init vars
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta DRAW_PAGE
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
jsr clear_gr
|
||||||
|
|
||||||
|
|
||||||
|
jsr wait_until_keypressed ; tail call?
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
35
space_bars/game_over.s
Normal file
35
space_bars/game_over.s
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
;================================
|
||||||
|
; Print Game Over
|
||||||
|
;================================
|
||||||
|
|
||||||
|
game_over:
|
||||||
|
;===================
|
||||||
|
; init screen
|
||||||
|
jsr TEXT
|
||||||
|
jsr HOME
|
||||||
|
bit KEYRESET
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; init vars
|
||||||
|
|
||||||
|
lda #0
|
||||||
|
sta DRAW_PAGE
|
||||||
|
|
||||||
|
lda #<game_over_text
|
||||||
|
sta OUTL
|
||||||
|
lda #>game_over_text
|
||||||
|
sta OUTH
|
||||||
|
|
||||||
|
jsr move_and_print
|
||||||
|
|
||||||
|
jsr wait_until_keypressed ; tail call?
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
; 0 1 2 3
|
||||||
|
; 0123456789012345678901234567890123456789
|
||||||
|
game_over_text:
|
||||||
|
|
||||||
|
.byte 11, 10, "*** GAME OVER ***",0
|
||||||
|
|
||||||
|
|
Binary file not shown.
@ -65,12 +65,16 @@ WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
|||||||
; Rasterbars
|
; Rasterbars
|
||||||
;==================
|
;==================
|
||||||
|
|
||||||
|
jsr game
|
||||||
|
|
||||||
;==================
|
;==================
|
||||||
; Game Over
|
; Game Over
|
||||||
;==================
|
;==================
|
||||||
|
|
||||||
game_over:
|
jsr game_over
|
||||||
jmp game_over
|
|
||||||
|
loop_forever:
|
||||||
|
jmp loop_forever
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -122,7 +126,9 @@ gr_offsets:
|
|||||||
.include "gr_copy.s"
|
.include "gr_copy.s"
|
||||||
.include "title.s"
|
.include "title.s"
|
||||||
.include "instructions.s"
|
.include "instructions.s"
|
||||||
|
.include "game.s"
|
||||||
.include "text_print.s"
|
.include "text_print.s"
|
||||||
|
.include "game_over.s"
|
||||||
|
|
||||||
.include "spacebars_title.inc"
|
.include "spacebars_title.inc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user