mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-13 03:29:32 +00:00
sb: more ill-advised nonsense
This commit is contained in:
parent
5cfabce59c
commit
7d3be99107
|
@ -11,10 +11,11 @@ all: sb.dsk
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
sb.dsk: HELLO SB
|
sb.dsk: HELLO SB DUCK_POND
|
||||||
cp $(EMPTY_DISK) sb.dsk
|
cp $(EMPTY_DISK) sb.dsk
|
||||||
$(DOS33) -y sb.dsk SAVE A HELLO
|
$(DOS33) -y sb.dsk SAVE A HELLO
|
||||||
$(DOS33) -y sb.dsk BSAVE -a 0x0c00 SB
|
$(DOS33) -y sb.dsk BSAVE -a 0x0c00 SB
|
||||||
|
$(DOS33) -y sb.dsk BSAVE -a 0x1000 DUCK_POND
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
@ -27,10 +28,20 @@ sb.o: sb.s zx02_optim.s \
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
DUCK_POND: duck_pond.o
|
||||||
|
ld65 -o DUCK_POND duck_pond.o -C $(LINKER_SCRIPTS)/apple2_1000.inc
|
||||||
|
|
||||||
|
duck_pond.o: duck_pond.s zx02_optim.s \
|
||||||
|
zp.inc hardware.inc
|
||||||
|
ca65 -o duck_pond.o duck_pond.s -l duck_pond.lst
|
||||||
|
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
HELLO: hello.bas
|
HELLO: hello.bas
|
||||||
$(TOKENIZE) < hello.bas > HELLO
|
$(TOKENIZE) < hello.bas > HELLO
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.lst *.o SB *~
|
rm -f *.lst *.o SB DUCK_POND *~
|
||||||
|
|
93
games/sb/duck_pond.s
Normal file
93
games/sb/duck_pond.s
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
; gr duck pond
|
||||||
|
;
|
||||||
|
; by deater (Vince Weaver) <vince@deater.net>
|
||||||
|
|
||||||
|
|
||||||
|
; todo
|
||||||
|
; videlectrix/ f to feed message
|
||||||
|
; F feeds
|
||||||
|
; A anvil (what happens when land on duck)
|
||||||
|
; Y drain pond
|
||||||
|
; ESC exit
|
||||||
|
; S spawn new duck
|
||||||
|
; N night (twilight?)
|
||||||
|
; J jump in pond
|
||||||
|
|
||||||
|
; how show score?
|
||||||
|
|
||||||
|
.include "zp.inc"
|
||||||
|
.include "hardware.inc"
|
||||||
|
|
||||||
|
|
||||||
|
duck_pond:
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; set graphics mode
|
||||||
|
;===================
|
||||||
|
jsr HOME
|
||||||
|
|
||||||
|
bit LORES
|
||||||
|
bit FULLGR
|
||||||
|
bit SET_GR
|
||||||
|
bit PAGE0
|
||||||
|
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; Load graphics
|
||||||
|
;===================
|
||||||
|
load_loop:
|
||||||
|
|
||||||
|
;=============================
|
||||||
|
|
||||||
|
|
||||||
|
;==========================
|
||||||
|
; Load Image
|
||||||
|
;===========================
|
||||||
|
|
||||||
|
load_image:
|
||||||
|
|
||||||
|
lda #<title_data
|
||||||
|
sta ZX0_src
|
||||||
|
lda #>title_data
|
||||||
|
sta ZX0_src+1
|
||||||
|
|
||||||
|
lda #$4
|
||||||
|
|
||||||
|
jsr full_decomp
|
||||||
|
|
||||||
|
|
||||||
|
wait_until_keypress:
|
||||||
|
lda KEYPRESS ; 4
|
||||||
|
bpl wait_until_keypress ; 3
|
||||||
|
bit KEYRESET ; clear the keyboard buffer
|
||||||
|
|
||||||
|
which_ok:
|
||||||
|
|
||||||
|
lda #<main_data
|
||||||
|
sta ZX0_src
|
||||||
|
lda #>main_data
|
||||||
|
sta ZX0_src+1
|
||||||
|
|
||||||
|
lda #$4
|
||||||
|
|
||||||
|
jsr full_decomp
|
||||||
|
|
||||||
|
|
||||||
|
wait_until_keypress2:
|
||||||
|
lda KEYPRESS ; 4
|
||||||
|
bpl wait_until_keypress2 ; 3
|
||||||
|
bit KEYRESET ; clear the keyboard buffer
|
||||||
|
|
||||||
|
jmp load_loop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.include "zx02_optim.s"
|
||||||
|
|
||||||
|
|
||||||
|
title_data:
|
||||||
|
.incbin "graphics/a2_duckpond_title.gr.zx02"
|
||||||
|
|
||||||
|
main_data:
|
||||||
|
.incbin "graphics/a2_duckpond.gr.zx02"
|
|
@ -1,13 +1,15 @@
|
||||||
include ../../../Makefile.inc
|
include ../../../Makefile.inc
|
||||||
|
|
||||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
|
ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f
|
||||||
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
|
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
|
||||||
LINKER_SCRIPTS = ../../../linker_scripts
|
LINKER_SCRIPTS = ../../../linker_scripts
|
||||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
PNG2GR = ../../../utils/gr-utils/png2gr
|
||||||
|
|
||||||
all: strongbad_sample.hgr.zx02
|
all: strongbad_sample.hgr.zx02 \
|
||||||
|
a2_duckpond_title.gr.zx02 a2_duckpond.gr.zx02
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
@ -17,6 +19,24 @@ strongbad_sample.hgr.zx02: strongbad_sample.hgr
|
||||||
strongbad_sample.hgr: strongbad_sample.png
|
strongbad_sample.hgr: strongbad_sample.png
|
||||||
$(PNG_TO_HGR) strongbad_sample.png > strongbad_sample.hgr
|
$(PNG_TO_HGR) strongbad_sample.png > strongbad_sample.hgr
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
a2_duckpond_title.gr.zx02: a2_duckpond_title.gr
|
||||||
|
$(ZX02) a2_duckpond_title.gr a2_duckpond_title.gr.zx02
|
||||||
|
|
||||||
|
a2_duckpond_title.gr: a2_duckpond_title.png
|
||||||
|
$(PNG2GR) a2_duckpond_title.png a2_duckpond_title.gr
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
a2_duckpond.gr.zx02: a2_duckpond.gr
|
||||||
|
$(ZX02) a2_duckpond.gr a2_duckpond.gr.zx02
|
||||||
|
|
||||||
|
a2_duckpond.gr: a2_duckpond.png
|
||||||
|
$(PNG2GR) a2_duckpond.png a2_duckpond.gr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
BIN
games/sb/graphics/a2_duckpond.png
Normal file
BIN
games/sb/graphics/a2_duckpond.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.0 KiB |
BIN
games/sb/graphics/a2_duckpond_title.png
Normal file
BIN
games/sb/graphics/a2_duckpond_title.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -1,2 +1,2 @@
|
||||||
5 HOME
|
5 HOME
|
||||||
105 PRINT CHR$ (4)"BRUN SB"
|
105 PRINT CHR$ (4)"CATALOG"
|
||||||
|
|
|
@ -36,13 +36,18 @@ load_image:
|
||||||
|
|
||||||
; size in ldsizeh:ldsizel (f1/f0)
|
; size in ldsizeh:ldsizel (f1/f0)
|
||||||
|
|
||||||
; comp_data = $a000
|
lda #<comp_data
|
||||||
out_addr = $2000
|
sta ZX0_src
|
||||||
|
lda #>comp_data
|
||||||
|
sta ZX0_src+1
|
||||||
|
|
||||||
|
|
||||||
|
lda #$20
|
||||||
|
|
||||||
|
|
||||||
jsr full_decomp
|
jsr full_decomp
|
||||||
|
|
||||||
rts
|
; rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,20 +20,36 @@ bitr = ZP+6
|
||||||
pntr = ZP+7
|
pntr = ZP+7
|
||||||
|
|
||||||
; Initial values for offset, source, destination and bitr
|
; Initial values for offset, source, destination and bitr
|
||||||
zx0_ini_block:
|
;zx0_ini_block:
|
||||||
.byte $00, $00, <comp_data, >comp_data, <out_addr, >out_addr, $80
|
; .byte $00, $00
|
||||||
|
;comp_data:
|
||||||
|
; .byte $0, $0
|
||||||
|
;out_addr:
|
||||||
|
; .byte $0, $0
|
||||||
|
; .byte $80
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
; Decompress ZX0 data (6502 optimized format)
|
; Decompress ZX0 data (6502 optimized format)
|
||||||
|
|
||||||
|
; destination page in A
|
||||||
full_decomp:
|
full_decomp:
|
||||||
; Get initialization block
|
sta ZX0_dst+1
|
||||||
ldy #7
|
|
||||||
|
|
||||||
copy_init: lda zx0_ini_block-1, y
|
lda #0
|
||||||
sta offset-1, y
|
sta ZX0_dst
|
||||||
dey
|
sta offset
|
||||||
bne copy_init
|
sta offset+1
|
||||||
|
|
||||||
|
lda #$80
|
||||||
|
sta bitr
|
||||||
|
|
||||||
|
; Get initialization block
|
||||||
|
; ldy #7
|
||||||
|
|
||||||
|
;copy_init: lda zx0_ini_block-1, y
|
||||||
|
; sta offset-1, y
|
||||||
|
; dey
|
||||||
|
; bne copy_init
|
||||||
|
|
||||||
; Decode literal: Ccopy next N bytes from compressed file
|
; Decode literal: Ccopy next N bytes from compressed file
|
||||||
; Elias(length) byte[1] byte[2] ... byte[N]
|
; Elias(length) byte[1] byte[2] ... byte[N]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user