fn: initial implementation

This commit is contained in:
Vince Weaver 2023-05-01 21:14:07 -04:00
parent 7b07bfc0a3
commit ee73d1f55b
6 changed files with 164 additions and 3 deletions

View File

@ -11,11 +11,13 @@ all: sb.dsk
####
sb.dsk: HELLO SB DUCK_POND
sb.dsk: HELLO TITLE DUCK_POND SB FN
cp $(EMPTY_DISK) sb.dsk
$(DOS33) -y sb.dsk SAVE A HELLO
$(DOS33) -y sb.dsk BSAVE -a 0x0c00 SB
$(DOS33) -y sb.dsk BSAVE -a 0x0c00 TITLE
$(DOS33) -y sb.dsk BSAVE -a 0x1000 DUCK_POND
$(DOS33) -y sb.dsk BSAVE -a 0x0c00 SB
$(DOS33) -y sb.dsk BSAVE -a 0x6000 FN
####
@ -26,6 +28,30 @@ sb.o: sb.s zx02_optim.s \
zp.inc hardware.inc
ca65 -o sb.o sb.s -l sb.lst
####
FN: fn.o
ld65 -o FN fn.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
fn.o: fn.s zx02_optim.s \
zp.inc hardware.inc \
fn_graphics/a2_fortnight.hgr.zx02 \
fn_graphics/a2_fortnight_rat1.hgr.zx02 \
fn_graphics/a2_fortnight_rat2.hgr.zx02
ca65 -o fn.o fn.s -l fn.lst
####
TITLE: title.o
ld65 -o TITLE title.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
title.o: title.s zx02_optim.s \
zp.inc hardware.inc
ca65 -o title.o title.s -l title.lst
####
DUCK_POND: duck_pond.o
@ -47,4 +73,4 @@ HELLO: hello.bas
####
clean:
rm -f *.lst *.o SB DUCK_POND *~
rm -f *.lst *.o TITLE SB FN DUCK_POND *~

89
games/sb/fn.s Normal file
View File

@ -0,0 +1,89 @@
; Animation from SBEMAIL #152
;
; Yet Another HR project
;
; by deater (Vince Weaver) <vince@deater.net>
.include "zp.inc"
.include "hardware.inc"
fortnight_start:
;===================
; set graphics mode
;===================
jsr HOME
bit HIRES
bit FULLGR
bit SET_GR
bit PAGE1
;==========================
; Floppy Animation
;===========================
floppy_animation:
lda #<fn_image
sta ZX0_src
lda #>fn_image
sta ZX0_src+1
lda #$20
jsr full_decomp
jsr wait_until_keypress
;==========================
; "breakdancing" rat
;==========================
load_rats:
lda #<rat1_image
sta ZX0_src
lda #>rat1_image
sta ZX0_src+1
lda #$20
jsr full_decomp
lda #<rat2_image
sta ZX0_src
lda #>rat2_image
sta ZX0_src+1
lda #$40
jsr full_decomp
rat_loop:
bit PAGE1
jsr wait_until_keypress
bit PAGE2
jsr wait_until_keypress
jmp rat_loop
wait_until_keypress:
lda KEYPRESS ; 4
bpl wait_until_keypress ; 3
bit KEYRESET ; clear the keyboard buffer
rts
.include "zx02_optim.s"
fn_image:
.incbin "fn_graphics/a2_fortnight.hgr.zx02"
rat1_image:
.incbin "fn_graphics/a2_fortnight_rat1.hgr.zx02"
rat2_image:
.incbin "fn_graphics/a2_fortnight_rat2.hgr.zx02"

View File

@ -0,0 +1,46 @@
include ../../../Makefile.inc
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
LINKER_SCRIPTS = ../../../linker_scripts
DOS33 = ../../../utils/dos33fs-utils/dos33
EMPTY_DISK = ../../../empty_disk/empty.dsk
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
PNG2GR = ../../../utils/gr-utils/png2gr
PNG2SPRITES = ../../../utils/gr-utils/png2sprites
all: a2_fortnight.hgr.zx02 \
a2_fortnight_rat1.hgr.zx02 \
a2_fortnight_rat2.hgr.zx02
####
a2_fortnight.hgr.zx02: a2_fortnight.hgr
$(ZX02) a2_fortnight.hgr a2_fortnight.hgr.zx02
a2_fortnight.hgr: a2_fortnight.png
$(PNG_TO_HGR) a2_fortnight.png > a2_fortnight.hgr
####
a2_fortnight_rat1.hgr.zx02: a2_fortnight_rat1.hgr
$(ZX02) a2_fortnight_rat1.hgr a2_fortnight_rat1.hgr.zx02
a2_fortnight_rat1.hgr: a2_fortnight_rat1.png
$(PNG_TO_HGR) a2_fortnight_rat1.png > a2_fortnight_rat1.hgr
####
a2_fortnight_rat2.hgr.zx02: a2_fortnight_rat2.hgr
$(ZX02) a2_fortnight_rat2.hgr a2_fortnight_rat2.hgr.zx02
a2_fortnight_rat2.hgr: a2_fortnight_rat2.png
$(PNG_TO_HGR) a2_fortnight_rat2.png > a2_fortnight_rat2.hgr
####
clean:
rm -f *~ *.o *.lst

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB