diff --git a/demos/l/fuzzball_32/monitor.txt b/demos/l/fuzzball_32/monitor.txt new file mode 100644 index 00000000..980a36cc --- /dev/null +++ b/demos/l/fuzzball_32/monitor.txt @@ -0,0 +1,4 @@ +CALL -151 +E7: 20 D8 F3 C8 84 E7 A0 00 A2 8C A9 60 20 11 F4 2C +F7: 30 C0 A9 00 A8 20 5D F6 E6 FA 4C ED 00 +E7G diff --git a/demos/l/tinygr_8/monitor.txt b/demos/l/tinygr_8/monitor.txt index fa750de3..ca1dc6da 100644 --- a/demos/l/tinygr_8/monitor.txt +++ b/demos/l/tinygr_8/monitor.txt @@ -1,4 +1,4 @@ CALL -151 -B9: 78 2c 50 c0 20 f0 fd 50 +B9: 78 2C 50 C0 20 F0 FD 50 B9G diff --git a/demos/l/xdraw_diamond_16/Makefile b/demos/l/xdraw_diamond_16/Makefile new file mode 100644 index 00000000..39709345 --- /dev/null +++ b/demos/l/xdraw_diamond_16/Makefile @@ -0,0 +1,46 @@ +include ../../../Makefile.inc + +DOS33 = ../../../utils/dos33fs-utils/dos33 +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft +EMPTYDISK = ../../../empty_disk/empty.dsk + +all: diamond_xdraw16.dsk + +diamond_xdraw16.dsk: HELLO DIAMOND_XDRAW + cp $(EMPTYDISK) diamond_xdraw16.dsk + $(DOS33) -y diamond_xdraw16.dsk SAVE A HELLO + $(DOS33) -y diamond_xdraw16.dsk BSAVE -a 0xE7 DIAMOND_XDRAW + +### + +submit: xdraw16.zip + +xdraw16.zip: DIAMOND_XDRAW diamond_xdraw.s file_id.diz diamond_xdraw16.dsk + mkdir -p lovebyte2021_diamond_xdraw16 + cp DIAMOND_XDRAW ./lovebyte2021_diamond_xdraw16 + cp diamond_xdraw.s ./lovebyte2021_diamond_xdraw16 + cp file_id.diz ./lovebyte2021_diamond_xdraw16 + cp diamond_xdraw16.dsk ./lovebyte2021_diamond_xdraw16 + cp diamond_xdraw_720p.mp4 ./lovebyte2021_diamond_xdraw16 + zip -r xdraw16.zip lovebyte2021_diamond_xdraw16 + +#### + + +#### + +HELLO: hello.bas + $(TOKENIZE) < hello.bas > HELLO + +### + +DIAMOND_XDRAW: diamond_xdraw.o + ld65 -o DIAMOND_XDRAW diamond_xdraw.o -C ./apple2_e7_zp.inc + +diamond_xdraw.o: diamond_xdraw.s + ca65 -o diamond_xdraw.o diamond_xdraw.s -l diamond_xdraw.lst + +#### + +clean: + rm -f *~ *.o *.lst HELLO DIAMOND_XDRAW *.zip diff --git a/demos/l/xdraw_diamond_16/apple2_e7_zp.inc b/demos/l/xdraw_diamond_16/apple2_e7_zp.inc new file mode 100644 index 00000000..f615f797 --- /dev/null +++ b/demos/l/xdraw_diamond_16/apple2_e7_zp.inc @@ -0,0 +1,12 @@ +MEMORY { + ZP: start = $E7, size = $90, type = rw; + RAM: start = $E7, 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; +} diff --git a/demos/l/xdraw_diamond_16/diamond_xdraw.s b/demos/l/xdraw_diamond_16/diamond_xdraw.s new file mode 100644 index 00000000..c37f032f --- /dev/null +++ b/demos/l/xdraw_diamond_16/diamond_xdraw.s @@ -0,0 +1,116 @@ +; Tiny Xdraw + +; repeatedly draws an image from an Apple II shape table + +; can arbitrarily point to any memory location as a source of these +; some look amazing but depend on random machine state +; to be deterministic you should probably stick to +; $E7-$F0 (the program itself) +; $D000-$FFFF (the ROMs) +; shapetables are a bit complicated to explain here, but they are a +; series of bytes ending with a $00 +; (note if you point to a zero, it will be interpreted as an +; action not an end) +; each byte specifies up to 3 actions, DRAW + UP DOWN LEFT RIGHT or +; NODRAW + UP DOWN LEFT RIGHT +; It is vector scaling with SCALE we hardcode to $20 and rotation +; which gets set to 0 after the first iteration, (which is +; why the first shape has arbitrary rotation and gets left) + +; we are xdrawing so it will XOR with the current pixels on the screen + + ; NUP=0 UP=4 zz yyy xxx , does xxx yyy zz + ; NRT=1 RT=5 + ; NDN=2 DN=6 + ; NLT=3 LT=7 + +; zero page locations +HGR_SHAPE = $1A +HGR_SHAPE2 = $1B +HGR_BITS = $1C +GBASL = $26 +GBASH = $27 +A5H = $45 +XREG = $46 +YREG = $47 + ; C0-CF should be clear + ; D0-DF?? D0-D5 = HGR scratch? +HGR_DX = $D0 ; HGLIN +HGR_DX2 = $D1 ; HGLIN +HGR_DY = $D2 ; HGLIN +HGR_QUADRANT = $D3 +HGR_E = $D4 +HGR_E2 = $D5 +HGR_X = $E0 +HGR_X2 = $E1 +HGR_Y = $E2 +HGR_COLOR = $E4 +HGR_HORIZ = $E5 +HGR_SCALE = $E7 +HGR_SHAPE_TABLE = $E8 +HGR_SHAPE_TABLE2= $E9 +HGR_COLLISIONS = $EA +HGR_ROTATION = $F9 +FRAME = $FC +XPOS = $FD +YPOS = $FF + +; ROM calls +HGR2 = $F3D8 +HGR = $F3E2 +HPOSN = $F411 +XDRAW0 = $F65D +XDRAW1 = $F661 +RESTORE = $FF3F + +.zeropage +.globalzp rot_smc + +tiny_xdraw: + + jsr HGR2 ; Hi-res, full screen ; 3 + ; Y=0, A=0 after this call + + ; we load at $E7 which is HGR_SCALE, so HGR_SCALE gets + ; the value of the above JSR instruction ($20) + + + ; A and Y are 0 here. + ; X is left behind by the boot process? + + tax + 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: + + ; values for shape table + ; Y X + ; F0 01 = xdraw16 from lovebyte 2021 + ; E726 = interesting + ; E728 = moving bars + ; E72A = moving lines + ; E7E7 = sorta OK + + lda #$e7 + tax + tay + +; ldx #$e7 ; point to bottom byte of shape address +; ldy #$e7 ; point to top byte of shape address + + ; ROT in A + + ; this will be 0 2nd time through loop, arbitrary otherwise +; lda #0 ; ROT=0 + 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/demos/l/xdraw_diamond_16/diamond_xdraw16.dsk b/demos/l/xdraw_diamond_16/diamond_xdraw16.dsk new file mode 100644 index 00000000..34be4ef5 Binary files /dev/null and b/demos/l/xdraw_diamond_16/diamond_xdraw16.dsk differ diff --git a/demos/l/xdraw_diamond_16/file_id.diz b/demos/l/xdraw_diamond_16/file_id.diz new file mode 100644 index 00000000..64bca99d --- /dev/null +++ b/demos/l/xdraw_diamond_16/file_id.diz @@ -0,0 +1,5 @@ +Diamond Xdraw +- +Hi-res Xdraw Pattern +16-byte Intro for Apple II, Lovebyte 2022 +by Deater / dSr diff --git a/demos/l/xdraw_diamond_16/hello.bas b/demos/l/xdraw_diamond_16/hello.bas new file mode 100644 index 00000000..03c392d8 --- /dev/null +++ b/demos/l/xdraw_diamond_16/hello.bas @@ -0,0 +1,8 @@ +5 HOME +10 PRINT "DIAMOND XDRAW - A 16 BYTE APPLE II INTRO" +15 PRINT " BY DEATER / DSR" +20 PRINT CHR$(4)"CATALOG" +25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN TINY_DIAMOND'" +30 GET A$ +35 PRINT +40 PRINT CHR$(4)"BRUN TINY_DIAMOND" diff --git a/demos/l/xdraw_wave_16/monitor.txt b/demos/l/xdraw_wave_16/monitor.txt new file mode 100644 index 00000000..a9592522 --- /dev/null +++ b/demos/l/xdraw_wave_16/monitor.txt @@ -0,0 +1,5 @@ +CALL -151 +E7: 20 D8 F3 AA 20 11 F4 A0 F0 A9 05 20 5D F6 F0 F7 +E7G + +