mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-27 17:29:49 +00:00
snake_boxer5: initial commit
This commit is contained in:
parent
c563ad6dd3
commit
12448e1d75
44
games/sb/snake_boxer5/Makefile
Normal file
44
games/sb/snake_boxer5/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
|
||||
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
|
||||
LINKER_SCRIPTS = ../../../linker_scripts
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
DOS33_RAW = ../../../utils/dos33fs-utils/dos33_raw
|
||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
|
||||
all: snake_boxer5.dsk
|
||||
|
||||
####
|
||||
|
||||
snake_boxer5.dsk: HELLO SNAKE_BOXER5
|
||||
cp $(EMPTY_DISK) snake_boxer5.dsk
|
||||
$(DOS33) -y snake_boxer5.dsk SAVE A HELLO
|
||||
$(DOS33) -y snake_boxer5.dsk BSAVE -a 0x6000 SNAKE_BOXER5
|
||||
|
||||
###
|
||||
|
||||
SNAKE_BOXER5: snake_boxer5.o
|
||||
ld65 -o SNAKE_BOXER5 snake_boxer5.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
|
||||
|
||||
snake_boxer5.o: snake_boxer5.s ../zx02_optim.s \
|
||||
../zp.inc ../hardware.inc\
|
||||
graphics/videlectrix.gr.zx02 \
|
||||
graphics/gameplay.gr.zx02
|
||||
ca65 -o snake_boxer5.o snake_boxer5.s -l snake_boxer5.lst
|
||||
|
||||
graphics/videlectrix.gr.zx02:
|
||||
cd graphics && make
|
||||
|
||||
|
||||
####
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *.lst *.o HELLO SNAKE_BOXER5
|
||||
|
43
games/sb/snake_boxer5/graphics/Makefile
Normal file
43
games/sb/snake_boxer5/graphics/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
include ../../../../Makefile.inc
|
||||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
|
||||
PNG2GR = ../../../../utils/gr-utils/png2gr
|
||||
PNG2SPRITES = ../../../../utils/gr-utils/png2sprites
|
||||
|
||||
all: videlectrix.gr.zx02 \
|
||||
gameplay.gr.zx02
|
||||
|
||||
####
|
||||
|
||||
sundae_sprites.inc: a2_sundae_sprites.png a2_sundae_masks.png
|
||||
$(PNG2SPRITES) a2_sundae_sprites.png tree1_sprite 0 0 6 20 > sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_sprites.png tree2_sprite 7 0 5 18 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_sprites.png cherry_sprite 13 0 3 12 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_sprites.png sundae1_sprite 0 24 15 24 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_masks.png tree1_mask 0 0 6 20 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_masks.png tree2_mask 7 0 5 18 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_masks.png cherry_mask 13 0 3 12 >> sundae_sprites.inc
|
||||
$(PNG2SPRITES) a2_sundae_masks.png sundae1_mask 0 24 15 24 >> sundae_sprites.inc
|
||||
|
||||
####
|
||||
|
||||
videlectrix.gr.zx02: videlectrix.gr
|
||||
$(ZX02) videlectrix.gr videlectrix.gr.zx02
|
||||
|
||||
videlectrix.gr: videlectrix.png
|
||||
$(PNG2GR) videlectrix.png videlectrix.gr
|
||||
|
||||
####
|
||||
|
||||
gameplay.gr.zx02: gameplay.gr
|
||||
$(ZX02) gameplay.gr gameplay.gr.zx02
|
||||
|
||||
gameplay.gr: gameplay.png
|
||||
$(PNG2GR) gameplay.png gameplay.gr
|
||||
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst *.zx02 *.gr *.inc
|
||||
|
BIN
games/sb/snake_boxer5/graphics/gameplay.png
Normal file
BIN
games/sb/snake_boxer5/graphics/gameplay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 837 B |
BIN
games/sb/snake_boxer5/graphics/videlectrix.png
Normal file
BIN
games/sb/snake_boxer5/graphics/videlectrix.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 717 B |
2
games/sb/snake_boxer5/hello.bas
Normal file
2
games/sb/snake_boxer5/hello.bas
Normal file
@ -0,0 +1,2 @@
|
||||
5 HOME
|
||||
10 PRINT CHR$(4);"BRUN SNAKE_BOXER5"
|
272
games/sb/snake_boxer5/snake_boxer5.s
Normal file
272
games/sb/snake_boxer5/snake_boxer5.s
Normal file
@ -0,0 +1,272 @@
|
||||
; Snake Boxer 5
|
||||
|
||||
; more Videlectrix nonsense
|
||||
;
|
||||
; by deater (Vince Weaver) <vince@deater.net>
|
||||
|
||||
|
||||
.include "../zp.inc"
|
||||
.include "../hardware.inc"
|
||||
|
||||
|
||||
sundae_driver:
|
||||
|
||||
;===================
|
||||
; set graphics mode
|
||||
;===================
|
||||
jsr HOME
|
||||
|
||||
bit LORES
|
||||
bit FULLGR
|
||||
bit SET_GR
|
||||
bit PAGE1
|
||||
|
||||
lda #$4
|
||||
sta DRAW_PAGE
|
||||
|
||||
lda #$0
|
||||
sta FRAME
|
||||
sta FRAMEH
|
||||
sta DISP_PAGE
|
||||
|
||||
;===================
|
||||
; Intro
|
||||
;===================
|
||||
; TODO: animation
|
||||
|
||||
intro:
|
||||
|
||||
lda #<videlectrix_data
|
||||
sta ZX0_src
|
||||
lda #>videlectrix_data
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$4 ; load at $400
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
|
||||
|
||||
;===================
|
||||
; TITLE SCREEN
|
||||
;===================
|
||||
|
||||
title_screen:
|
||||
|
||||
lda #<gameplay_data
|
||||
sta ZX0_src
|
||||
lda #>gameplay_data
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$4 ; load at $400
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
jsr wait_until_keypress
|
||||
.if 0
|
||||
;===================
|
||||
; Setup Gameplay
|
||||
;===================
|
||||
|
||||
lda #17
|
||||
sta CHERRY_X
|
||||
lda #8
|
||||
sta CHERRY_Y
|
||||
|
||||
lda #4
|
||||
sta TREE1_X
|
||||
lda #0
|
||||
sta TREE1_Y
|
||||
|
||||
lda #32
|
||||
sta TREE2_X
|
||||
lda #10
|
||||
sta TREE2_Y
|
||||
|
||||
lda #13
|
||||
sta SUNDAE_X
|
||||
lda #24
|
||||
sta SUNDAE_Y
|
||||
|
||||
|
||||
|
||||
|
||||
; load graphic to $c00
|
||||
|
||||
lda #<bg_data
|
||||
sta ZX0_src
|
||||
lda #>bg_data
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$c ; load at $c00
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
game_loop:
|
||||
;=======================
|
||||
; copy over background
|
||||
|
||||
jsr gr_copy_to_current
|
||||
|
||||
;========================
|
||||
; draw things
|
||||
|
||||
jsr draw_cherry
|
||||
jsr draw_tree1
|
||||
jsr draw_tree2
|
||||
jsr draw_sundae
|
||||
|
||||
|
||||
;========================
|
||||
; move
|
||||
|
||||
inc SUNDAE_X
|
||||
inc TREE1_Y
|
||||
inc TREE1_Y
|
||||
inc TREE2_Y
|
||||
inc TREE2_Y
|
||||
inc CHERRY_Y
|
||||
inc CHERRY_Y
|
||||
|
||||
;========================
|
||||
; page flip
|
||||
|
||||
jsr page_flip
|
||||
|
||||
jsr wait_until_keypress
|
||||
|
||||
jmp game_loop
|
||||
|
||||
|
||||
|
||||
;======================
|
||||
; game over
|
||||
;======================
|
||||
|
||||
james_screen:
|
||||
|
||||
lda #<james_data
|
||||
sta ZX0_src
|
||||
lda #>james_data
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$4 ; load at $400
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
|
||||
jsr wait_until_keypress
|
||||
.endif
|
||||
|
||||
done:
|
||||
jmp done
|
||||
|
||||
|
||||
|
||||
|
||||
wait_until_keypress:
|
||||
lda KEYPRESS ; 4
|
||||
bpl wait_until_keypress ; 3
|
||||
bit KEYRESET ; clear the keyboard buffer
|
||||
|
||||
rts
|
||||
|
||||
.include "../zx02_optim.s"
|
||||
|
||||
.include "../gr_offsets.s"
|
||||
.include "../gr_pageflip.s"
|
||||
.include "../gr_copy.s"
|
||||
.include "../gr_putsprite_mask.s"
|
||||
|
||||
.if 0
|
||||
;====================
|
||||
; draw cherry
|
||||
draw_cherry:
|
||||
lda CHERRY_X
|
||||
sta XPOS
|
||||
lda CHERRY_Y
|
||||
sta YPOS
|
||||
|
||||
lda #<cherry_mask
|
||||
sta MASKL
|
||||
lda #>cherry_mask
|
||||
sta MASKH
|
||||
|
||||
lda #<cherry_sprite
|
||||
sta INL
|
||||
lda #>cherry_sprite
|
||||
sta INH
|
||||
jsr gr_put_sprite_mask
|
||||
rts
|
||||
|
||||
;====================
|
||||
; draw tree1
|
||||
draw_tree1:
|
||||
lda TREE1_X
|
||||
sta XPOS
|
||||
lda TREE1_Y
|
||||
sta YPOS
|
||||
|
||||
lda #<tree1_mask
|
||||
sta MASKL
|
||||
lda #>tree1_mask
|
||||
sta MASKH
|
||||
|
||||
lda #<tree1_sprite
|
||||
sta INL
|
||||
lda #>tree1_sprite
|
||||
sta INH
|
||||
jsr gr_put_sprite_mask
|
||||
rts
|
||||
|
||||
;====================
|
||||
; draw tree2
|
||||
draw_tree2:
|
||||
lda TREE2_X
|
||||
sta XPOS
|
||||
lda TREE2_Y
|
||||
sta YPOS
|
||||
|
||||
lda #<tree2_mask
|
||||
sta MASKL
|
||||
lda #>tree2_mask
|
||||
sta MASKH
|
||||
|
||||
lda #<tree2_sprite
|
||||
sta INL
|
||||
lda #>tree2_sprite
|
||||
sta INH
|
||||
jsr gr_put_sprite_mask
|
||||
rts
|
||||
|
||||
;====================
|
||||
; draw sundae
|
||||
draw_sundae:
|
||||
lda SUNDAE_X
|
||||
sta XPOS
|
||||
lda SUNDAE_Y
|
||||
sta YPOS
|
||||
|
||||
lda #<sundae1_mask
|
||||
sta MASKL
|
||||
lda #>sundae1_mask
|
||||
sta MASKH
|
||||
|
||||
lda #<sundae1_sprite
|
||||
sta INL
|
||||
lda #>sundae1_sprite
|
||||
sta INH
|
||||
jsr gr_put_sprite_mask
|
||||
rts
|
||||
|
||||
.endif
|
||||
|
||||
|
||||
videlectrix_data:
|
||||
.incbin "graphics/videlectrix.gr.zx02"
|
||||
|
||||
gameplay_data:
|
||||
.incbin "graphics/gameplay.gr.zx02"
|
||||
|
Loading…
Reference in New Issue
Block a user