From 47760bf7a253976355641e00e2385cd5f33bc624 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 23 Jan 2024 21:53:01 -0500 Subject: [PATCH] lovebyte2024: some prototypes --- demos/lovebyte2024/countdown15/Makefile | 2 +- demos/lovebyte2024/countdown15/file_id.diz | 16 +++++ demos/lovebyte2024/puffball_32/Makefile | 49 ++++++++++++++ demos/lovebyte2024/puffball_32/README | 13 ++++ demos/lovebyte2024/puffball_32/file_id.diz | 9 +++ demos/lovebyte2024/puffball_32/hello.bas | 7 ++ demos/lovebyte2024/puffball_32/puffball.s | 79 ++++++++++++++++++++++ demos/lovebyte2024/spiral_32/Makefile | 49 ++++++++++++++ demos/lovebyte2024/spiral_32/README | 13 ++++ demos/lovebyte2024/spiral_32/file_id.diz | 9 +++ demos/lovebyte2024/spiral_32/hello.bas | 7 ++ demos/lovebyte2024/spiral_32/spiral_32.s | 59 ++++++++++++++++ 12 files changed, 311 insertions(+), 1 deletion(-) create mode 100644 demos/lovebyte2024/countdown15/file_id.diz create mode 100644 demos/lovebyte2024/puffball_32/Makefile create mode 100644 demos/lovebyte2024/puffball_32/README create mode 100644 demos/lovebyte2024/puffball_32/file_id.diz create mode 100644 demos/lovebyte2024/puffball_32/hello.bas create mode 100644 demos/lovebyte2024/puffball_32/puffball.s create mode 100644 demos/lovebyte2024/spiral_32/Makefile create mode 100644 demos/lovebyte2024/spiral_32/README create mode 100644 demos/lovebyte2024/spiral_32/file_id.diz create mode 100644 demos/lovebyte2024/spiral_32/hello.bas create mode 100644 demos/lovebyte2024/spiral_32/spiral_32.s diff --git a/demos/lovebyte2024/countdown15/Makefile b/demos/lovebyte2024/countdown15/Makefile index bdfb06a3..83206846 100644 --- a/demos/lovebyte2024/countdown15/Makefile +++ b/demos/lovebyte2024/countdown15/Makefile @@ -22,7 +22,7 @@ lovebyte15.zip: LOVEBYTE_15 lovebyte_15.s file_id.diz lovebyte_15.dsk cp lovebyte_15.s ./lovebyte_15 cp file_id.diz ./lovebyte_15 cp lovebyte_15.dsk ./lovebyte_15 - cp dsr_720p.mp4 ./lovebyte_15 +# cp dsr_720p.mp4 ./lovebyte_15 zip -r lovebyte15.zip lovebyte_15 ### diff --git a/demos/lovebyte2024/countdown15/file_id.diz b/demos/lovebyte2024/countdown15/file_id.diz new file mode 100644 index 00000000..fc22cfba --- /dev/null +++ b/demos/lovebyte2024/countdown15/file_id.diz @@ -0,0 +1,16 @@ +.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. +8 8 +8 Lovebyte Countdown 2024 --- #15 8 +8 8 +'oOo'oOo'oOo'oOo'oOo'oOo'oOo'oOo'oOo' + +250-byte Intro for Apple II +by Deater / dSr + +Some speaker sound, some shapetables +(ROM vector drawing), some lores/text +scrolling through system memory to +make pretty background patterns. + +This is based off of the intro + "dsr scroll" from Outline 2022 diff --git a/demos/lovebyte2024/puffball_32/Makefile b/demos/lovebyte2024/puffball_32/Makefile new file mode 100644 index 00000000..67db03ea --- /dev/null +++ b/demos/lovebyte2024/puffball_32/Makefile @@ -0,0 +1,49 @@ +include ../../../Makefile.inc + +DOS33 = ../../../utils/dos33fs-utils/dos33 +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft +EMPTYDISK = ../../../empty_disk/empty.dsk +LINKERSCRIPTS = ../../../linker_scripts/ + +all: puffball.dsk + +puffball.dsk: HELLO PUFFBALL + cp $(EMPTYDISK) puffball.dsk + $(DOS33) -y puffball.dsk SAVE A HELLO + $(DOS33) -y puffball.dsk BSAVE -a 0xe7 PUFFBALL + +### + +submit: puffball.zip + +puffball.zip: PUFFBALL puffball.s file_id.diz puffball.dsk + mkdir -p lovebyte2024_puffball + cp PUFFBALL ./lovebyte2024_puffball + cp puffball.s ./lovebyte2024_puffball + cp file_id.diz ./lovebyte2024_puffball + cp puffball.dsk ./lovebyte2024_puffball + cp monitor.txt ./lovebyte2024_puffball + cp puffball_screen.png ./lovebyte2024_puffball + cp puffball_720p.mp4 ./lovebyte2024_puffball + zip -r puffball.zip lovebyte2024_puffball + +#### + + +#### + +HELLO: hello.bas + $(TOKENIZE) < hello.bas > HELLO + +### + +PUFFBALL: puffball.o + ld65 -o PUFFBALL puffball.o -C $(LINKERSCRIPTS)/apple2_e7_zp.inc + +puffball.o: puffball.s + ca65 -o puffball.o puffball.s -l puffball.lst + +#### + +clean: + rm -f *~ *.o *.lst HELLO PUFFBALL *.zip diff --git a/demos/lovebyte2024/puffball_32/README b/demos/lovebyte2024/puffball_32/README new file mode 100644 index 00000000..061846e5 --- /dev/null +++ b/demos/lovebyte2024/puffball_32/README @@ -0,0 +1,13 @@ +This is yet another tiny Apple II hires/shapetable intro. + +It loads at $E7 (HGR_SCALE) so that we set that value +for free from the first instruction (in this case JSR so $20). + +I thought this looked like woven cloth at times, hence the name. + +I found this one while searching for pleasant looking patterns +in the ROM to display that were easy to load. Specifically patterns +that have a 0 value after one or two bytes, as those are smaller shapes. +In this case this is rotation value $E2 at address $E2E2 which is +easy to load. + diff --git a/demos/lovebyte2024/puffball_32/file_id.diz b/demos/lovebyte2024/puffball_32/file_id.diz new file mode 100644 index 00000000..fda3f5ae --- /dev/null +++ b/demos/lovebyte2024/puffball_32/file_id.diz @@ -0,0 +1,9 @@ +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==- +Weave15 +-------------------------------------- +Hi-res Xdraw Pattern +by Deater / dSr + +15-byte Intro for Apple II +Lovebyte 2023 +-------------------------------------- diff --git a/demos/lovebyte2024/puffball_32/hello.bas b/demos/lovebyte2024/puffball_32/hello.bas new file mode 100644 index 00000000..bef10c43 --- /dev/null +++ b/demos/lovebyte2024/puffball_32/hello.bas @@ -0,0 +1,7 @@ +5 HOME +10 PRINT " PUFFBALL" +20 PRINT CHR$(4)"CATALOG" +25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN PUFFBALL'" +30 GET A$ +35 PRINT +40 PRINT CHR$(4)"BRUN PUFFBALL" diff --git a/demos/lovebyte2024/puffball_32/puffball.s b/demos/lovebyte2024/puffball_32/puffball.s new file mode 100644 index 00000000..a8e03024 --- /dev/null +++ b/demos/lovebyte2024/puffball_32/puffball.s @@ -0,0 +1,79 @@ +; Puffball + +; 31 byte rotating Apple II shapetables + +; for Lovebyte 2024 + +; by Vince `deater` Weaver / DsR + +; zero page locations +GBASL = $26 +GBASH = $27 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_COLLISION = $E8 +HGR_ROTATION = $00 ; usually $F9 but can't here + +; ROM locations +HGR2 = $F3D8 +HPOSN = $F411 +XDRAW0 = $F65D +XDRAW1 = $F661 +HPLOT0 = $F457 + +.zeropage +.globalzp blip + +puffball: + ; we load at $E7 so HGR_SIZE set to $20 (first byte of JSR) + + jsr HGR2 ; Hi-res, full screen ; $E7/$E8/$E9 + ; Y=0, A=0 after this call + + nop ; EA HGR_COLLISION) ; $EA + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + +tiny_loop: + ; A=0 here from both cases + + ; we need the following values to start at center + ; directly would need to set 16 bytes + ; GBASL=$28 + ; GBASH=$42 + ; HGR_HORIZ=20 + ; HMASK=$81 + + tay ; ldy #0 ; $EB + ldx #140 ; $EC/$ED + lda #96 ; $EE/$EF + jsr HPOSN ; set screen position to X= (y,x) Y=(a) ; $F0/$F1/$F2 + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? + +blip: + ldx #our_shape ; ; $F5/$F6 + inc HGR_ROTATION ; $F7/$F8 + lda HGR_ROTATION ; $F9/$FA + and #$3f ; $FB/$FC + bne ee ; $FD/$FE + dec blip+1 ;(blip+1) ; $FF/$100 +ee: + jsr XDRAW0 ; XDRAW 1 AT X,Y ; $101/$102/$103 + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + beq tiny_loop ; bra ; $104/$105 + + +our_shape=$E2E2 + +; values at $E2DF + +;our_shape: +;.byte $11,$f0,$03,$20,$00 diff --git a/demos/lovebyte2024/spiral_32/Makefile b/demos/lovebyte2024/spiral_32/Makefile new file mode 100644 index 00000000..c0b1a312 --- /dev/null +++ b/demos/lovebyte2024/spiral_32/Makefile @@ -0,0 +1,49 @@ +include ../../../Makefile.inc + +DOS33 = ../../../utils/dos33fs-utils/dos33 +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft +EMPTYDISK = ../../../empty_disk/empty.dsk +LINKERSCRIPTS = ../../../linker_scripts/ + +all: spiral_32.dsk + +spiral_32.dsk: HELLO SPIRAL_32 + cp $(EMPTYDISK) spiral_32.dsk + $(DOS33) -y spiral_32.dsk SAVE A HELLO + $(DOS33) -y spiral_32.dsk BSAVE -a 0xc00 SPIRAL_32 + +### + +submit: spiral_32.zip + +spiral_32.zip: SPIRAL_32 spiral_32.s file_id.diz spiral_32.dsk + mkdir -p lovebyte2023_spiral_32 + cp SPIRAL_32 ./lovebyte2023_spiral_32 + cp spiral_32.s ./lovebyte2023_spiral_32 + cp file_id.diz ./lovebyte2023_spiral_32 + cp spiral_32.dsk ./lovebyte2023_spiral_32 + cp monitor.txt ./lovebyte2023_spiral_32 + cp spiral_32_screen.png ./lovebyte2023_spiral_32 + cp spiral_32_720p.mp4 ./lovebyte2023_spiral_32 + zip -r spiral_32.zip lovebyte2023_spiral_32 + +#### + + +#### + +HELLO: hello.bas + $(TOKENIZE) < hello.bas > HELLO + +### + +SPIRAL_32: spiral_32.o + ld65 -o SPIRAL_32 spiral_32.o -C $(LINKERSCRIPTS)/apple2_c00.inc + +spiral_32.o: spiral_32.s + ca65 -o spiral_32.o spiral_32.s -l spiral_32.lst + +#### + +clean: + rm -f *~ *.o *.lst HELLO SPIRAL_32 *.zip diff --git a/demos/lovebyte2024/spiral_32/README b/demos/lovebyte2024/spiral_32/README new file mode 100644 index 00000000..061846e5 --- /dev/null +++ b/demos/lovebyte2024/spiral_32/README @@ -0,0 +1,13 @@ +This is yet another tiny Apple II hires/shapetable intro. + +It loads at $E7 (HGR_SCALE) so that we set that value +for free from the first instruction (in this case JSR so $20). + +I thought this looked like woven cloth at times, hence the name. + +I found this one while searching for pleasant looking patterns +in the ROM to display that were easy to load. Specifically patterns +that have a 0 value after one or two bytes, as those are smaller shapes. +In this case this is rotation value $E2 at address $E2E2 which is +easy to load. + diff --git a/demos/lovebyte2024/spiral_32/file_id.diz b/demos/lovebyte2024/spiral_32/file_id.diz new file mode 100644 index 00000000..fda3f5ae --- /dev/null +++ b/demos/lovebyte2024/spiral_32/file_id.diz @@ -0,0 +1,9 @@ +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==- +Weave15 +-------------------------------------- +Hi-res Xdraw Pattern +by Deater / dSr + +15-byte Intro for Apple II +Lovebyte 2023 +-------------------------------------- diff --git a/demos/lovebyte2024/spiral_32/hello.bas b/demos/lovebyte2024/spiral_32/hello.bas new file mode 100644 index 00000000..f0e1d71c --- /dev/null +++ b/demos/lovebyte2024/spiral_32/hello.bas @@ -0,0 +1,7 @@ +5 HOME +10 PRINT " SPIRAL_32" +20 PRINT CHR$(4)"CATALOG" +25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN SPIRAL_32'" +30 GET A$ +35 PRINT +40 PRINT CHR$(4)"BRUN SPIRAL_32" diff --git a/demos/lovebyte2024/spiral_32/spiral_32.s b/demos/lovebyte2024/spiral_32/spiral_32.s new file mode 100644 index 00000000..e79679ca --- /dev/null +++ b/demos/lovebyte2024/spiral_32/spiral_32.s @@ -0,0 +1,59 @@ +; Xdraw test + +; use to prototype small xdraw effects + +; by Vince `deater` Weaver / DsR + +; zero page locations +GBASL = $26 +GBASH = $27 +HGR_SCALE = $E7 +HGR_ROTATION = $F9 + +; ROM locations +HGR2 = $F3D8 +HPOSN = $F411 +XDRAW0 = $F65D +XDRAW1 = $F661 +HPLOT0 = $F457 + +xdraw_test: + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + iny +; sty HGR_SCALE + sty HGR_ROTATION + + ; A and Y are 0 here. + ; X is left behind by the boot process? + +tiny_loop: + tay ; ldy #0 ; A always 0 here + ldx #140 + lda #96 + jsr HPOSN ; set screen position to X= (y,x) Y=(a) + ; saves X,Y,A to zero page + ; after Y= orig X/7 + ; A and X are ?? + + ldx #our_shape ; + inc HGR_ROTATION + lda HGR_ROTATION + and #$7f + sta HGR_SCALE + + jsr XDRAW0 ; XDRAW 1 AT X,Y + ; Both A and X are 0 at exit + ; Z flag set on exit + ; Y varies + + beq tiny_loop ; bra + + +our_shape = $E2DF + +;our_shape: +;.byte $1a,$2d,$00