From 2ed3a07465d4ed43d4797fe2a2c924a26a0ba830 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Fri, 27 Jan 2023 17:06:11 -0500 Subject: [PATCH] lovebyte23: breakthrough on the agony --- graphics/hgr/shape_table/Makefile | 14 ++++++-- graphics/hgr/shape_table/agony2.s | 55 +++++++++++++++++++++++++++++++ graphics/hgr/transitions/ooze32.s | 5 +++ linker_scripts/apple2_45_zp.inc | 12 +++++++ 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 graphics/hgr/shape_table/agony2.s create mode 100644 linker_scripts/apple2_45_zp.inc diff --git a/graphics/hgr/shape_table/Makefile b/graphics/hgr/shape_table/Makefile index 68bb8198..753dc22a 100644 --- a/graphics/hgr/shape_table/Makefile +++ b/graphics/hgr/shape_table/Makefile @@ -10,7 +10,7 @@ all: shape_table.dsk shape_table.dsk: HELLO APPLE.BAS GEARS.BAS \ APPLE2 GEARS LINE32 PATTERN PATTERN_LOGO SQUARE_WAVE \ AGONY17 HERRING16 STRIPE17 COOL_WAVE TEETH32 TICK_TOCK \ - GEARS_TINY + GEARS_TINY AGONY2 cp $(EMPTYDISK) shape_table.dsk $(DOS33) -y shape_table.dsk SAVE A HELLO $(DOS33) -y shape_table.dsk SAVE A GEARS.BAS @@ -20,6 +20,7 @@ shape_table.dsk: HELLO APPLE.BAS GEARS.BAS \ $(DOS33) -y shape_table.dsk BSAVE -a 0xc00 APPLE2 $(DOS33) -y shape_table.dsk BSAVE -a 0xc00 LINE32 $(DOS33) -y shape_table.dsk BSAVE -a 0xe7 AGONY17 + $(DOS33) -y shape_table.dsk BSAVE -a 0xe7 AGONY2 $(DOS33) -y shape_table.dsk BSAVE -a 0xe7 STRIPE17 $(DOS33) -y shape_table.dsk BSAVE -a 0xc00 HERRING16 $(DOS33) -y shape_table.dsk BSAVE -a 0xc00 PATTERN @@ -125,6 +126,15 @@ agony17.o: agony17.s ### +AGONY2: agony2.o + ld65 -o AGONY2 agony2.o -C $(LINKERSCRIPTS)/apple2_e7_zp.inc + +agony2.o: agony2.s + ca65 -o agony2.o agony2.s -l agony2.lst + + +### + STRIPE17: stripe17.o ld65 -o STRIPE17 stripe17.o -C $(LINKERSCRIPTS)/apple2_e7_zp.inc @@ -163,4 +173,4 @@ pattern_logo.o: pattern_logo.s clean: rm -f *~ *.o *.lst HELLO GEAR.BAS GEARS PATTERN APPLE.BAS \ PATTERN_LOGO COOL_WAVE SQUARE_WAVE TEETH32 TICK_TOCK \ - HERRING16 STRIPE17 AGONY17 LINE32 APPLE2 GEARS_TINY + HERRING16 STRIPE17 AGONY17 LINE32 APPLE2 GEARS_TINY AGONY2 diff --git a/graphics/hgr/shape_table/agony2.s b/graphics/hgr/shape_table/agony2.s new file mode 100644 index 00000000..0ee9edb9 --- /dev/null +++ b/graphics/hgr/shape_table/agony2.s @@ -0,0 +1,55 @@ +; 17B weird line pattern + +; Really wanted this to be 16B :( + +; zero page locations +GBASL = $26 +GBASH = $27 +HGR_SCALE = $E7 +HGR_COLLISIONS = $EA + +; ROM locations +HGR2 = $F3D8 +HPOSN = $F411 +XDRAW0 = $F65D +XDRAW1 = $F661 +HPLOT0 = $F457 + +RESTORE2 = $FF42 + +agony17: + + ; we load at zero page $E7 which is HGR_SCALE + ; this means the scale is $20 (JSR) + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + ; set GBASL/GBASH + ; we really have to call this, otherwise it won't run + ; on some real hardware depending on setup of zero page at boot + + jsr HPLOT0 + +; 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 ?? +tiny_loop: + lda #$E2 + tax + tay + +; ldx #$E2 +; ldy #$E2 + +; lda #2 ; ROT=2 + 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 diff --git a/graphics/hgr/transitions/ooze32.s b/graphics/hgr/transitions/ooze32.s index ff3b2d98..4b56d464 100644 --- a/graphics/hgr/transitions/ooze32.s +++ b/graphics/hgr/transitions/ooze32.s @@ -1,5 +1,10 @@ ; Ooze32 +; interesting looking effect found accidentally +; when trying to do something else + +; by Vince `deater` Weaver + ; zero page GBASL = $26 GBASH = $27 diff --git a/linker_scripts/apple2_45_zp.inc b/linker_scripts/apple2_45_zp.inc new file mode 100644 index 00000000..dadbf163 --- /dev/null +++ b/linker_scripts/apple2_45_zp.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $45, size = $90, type = rw; + RAM: start = $45, size = $8E00, file = %O; +} + +SEGMENTS { +CODE: load = RAM, type = ro; +#RODATA: load = RAM, type = ro; +#DATA: load = RAM, type = rw; +#BSS: load = RAM, type = bss, define = yes; +ZEROPAGE: load = ZP, type = ro; +}