diff --git a/demos/l/cometsong_256/Makefile b/demos/l/cometsong_256/Makefile new file mode 100644 index 00000000..c470481d --- /dev/null +++ b/demos/l/cometsong_256/Makefile @@ -0,0 +1,76 @@ +include ../../../Makefile.inc + +DOS33 = ../../../utils/dos33fs-utils/dos33 +EMPTY_DISK = ../../../empty_disk +HGR2PNG = ../../../utils/hgr-utils/png2hgr +LINKER_SCRIPTS = ../../../linker_scripts +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft + +all: cometsong.dsk + +#### + +submit: cometsong_256.zip + +cometsong256.zip: COMETSONG cometsong.s file_id.diz cometsong_256.dsk + mkdir -p lovebyte2022_cometsong_256 + cp COMETSONG ./lovebyte2022_cometsong_256 + cp *.s ./lovebyte2022_cometsong_256 + cp file_id.diz ./lovebyte2022_cometsong_256 + cp cometsong_256.dsk ./lovebyte2022_cometsong_256 + cp cometsong_720p.mp4 ./lovebyte2022_cometsong_256 + zip -r cometsong256.zip lovebyte2022_cometsong_256 + +#### + +cometsong.dsk: HELLO COMETSONG VIZ + cp $(EMPTY_DISK)/empty.dsk ./cometsong.dsk + $(DOS33) -y cometsong.dsk SAVE A HELLO + $(DOS33) -y cometsong.dsk -t BIN -a 0x7E BSAVE COMETSONG +# $(DOS33) -y cometsong.dsk -t BIN -a 0xc00 BSAVE VIZ + +#### + +HELLO: hello.bas + $(TOKENIZE) < hello.bas > HELLO + +#### + +mA2E_2.s: mA2E_2.txt text_to_tiny + ./text_to_tiny mA2E_2.txt > mA2E_2.s + + +#### + +COMETSONG: cometsong.o + ld65 -o COMETSONG cometsong.o -C ./apple2_7e_zp.inc + +cometsong.o: cometsong.s \ + zp.inc hardware.inc \ + mA2E_2.s visual.s \ + mockingboard_init.s play_frame.s \ + ay3_write_regs.s + ca65 -o cometsong.o cometsong.s -l cometsong.lst + +#### + +VIZ: viz.o + ld65 -o VIZ viz.o -C $(LINKER_SCRIPTS)/apple2_c00.inc + +viz.o: viz.s \ + zp.inc hardware.inc + ca65 -o viz.o viz.s -l viz.lst + + +#### + +text_to_tiny: text_to_tiny.o + $(CC) -o text_to_tiny text_to_tiny.o -lm + +text_to_tiny.o: text_to_tiny.c + $(CC) $(CFLAGS) -c text_to_tiny.c + +#### + +clean: + rm -f *~ *.o *.lst COMETSONG VIZ HELLO text_to_tiny mA2E_2.s diff --git a/demos/l/music_256/apple2_7e_zp.inc b/demos/l/cometsong_256/apple2_7e_zp.inc similarity index 100% rename from demos/l/music_256/apple2_7e_zp.inc rename to demos/l/cometsong_256/apple2_7e_zp.inc diff --git a/demos/l/music_256/ay3_write_regs.s b/demos/l/cometsong_256/ay3_write_regs.s similarity index 100% rename from demos/l/music_256/ay3_write_regs.s rename to demos/l/cometsong_256/ay3_write_regs.s diff --git a/demos/l/music_256/d2.s b/demos/l/cometsong_256/cometsong.s similarity index 98% rename from demos/l/music_256/d2.s rename to demos/l/cometsong_256/cometsong.s index eae449cd..a88c434e 100644 --- a/demos/l/music_256/d2.s +++ b/demos/l/cometsong_256/cometsong.s @@ -1,4 +1,4 @@ -; Apple II graphics/music in 1k +; Apple II graphics/music in 256B ; by deater (Vince Weaver) @@ -41,7 +41,7 @@ ;.globalzp frequencies_high .globalzp colors -music_split: +cometsong: ; we can execute these... (as qkumba noticed) ; it's SEC, ASL $0E0E diff --git a/demos/l/cometsong_256/file_id.diz b/demos/l/cometsong_256/file_id.diz new file mode 100644 index 00000000..8f53d030 --- /dev/null +++ b/demos/l/cometsong_256/file_id.diz @@ -0,0 +1,17 @@ +Cometsong +- +3-channel Mockingboard music with Lo-res graphics +256-byte Intro for Apple II, Lovebyte 2022 +by Deater / dSr + +Fitting Mockingboard music in 256B was a challenge. +Note: only plays music out the left stereo channel. +Thanks to mA2E for the music. +Thanks to qkumba for optimization help. + +This code does a lot of tricky things. It loads into the zero page +(which makes memory use less) but the music data overflows into +the low half of the stack (at $100 on 6502). The rest of the code +avoids the use of the stack, so we can use the "PLA" (pull stack +to accumulator) instruction to do an auto-increment load through +the music. This trick saved 15+ bytes. diff --git a/demos/l/music_256/hardware.inc b/demos/l/cometsong_256/hardware.inc similarity index 100% rename from demos/l/music_256/hardware.inc rename to demos/l/cometsong_256/hardware.inc diff --git a/demos/l/cometsong_256/hello.bas b/demos/l/cometsong_256/hello.bas new file mode 100644 index 00000000..1456dd91 --- /dev/null +++ b/demos/l/cometsong_256/hello.bas @@ -0,0 +1,9 @@ +5 HOME +10 PRINT "COMETSONG - 256B INTRO AT LOVEBYTE 2022" +15 PRINT " BY DEATER / DSR" +20 PRINT CHR$(4);"CATALOG" +25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN COMETSONG'" +30 GET A$ +35 PRINT +40 PRINT CHR$(4)"BRUN COMETSONG" + diff --git a/demos/l/music_256/mA2E_2.txt b/demos/l/cometsong_256/mA2E_2.txt similarity index 100% rename from demos/l/music_256/mA2E_2.txt rename to demos/l/cometsong_256/mA2E_2.txt diff --git a/demos/l/music_256/mockingboard_init.s b/demos/l/cometsong_256/mockingboard_init.s similarity index 100% rename from demos/l/music_256/mockingboard_init.s rename to demos/l/cometsong_256/mockingboard_init.s diff --git a/demos/l/music_256/play_frame.s b/demos/l/cometsong_256/play_frame.s similarity index 100% rename from demos/l/music_256/play_frame.s rename to demos/l/cometsong_256/play_frame.s diff --git a/demos/l/music_256/text_to_tiny.c b/demos/l/cometsong_256/text_to_tiny.c similarity index 100% rename from demos/l/music_256/text_to_tiny.c rename to demos/l/cometsong_256/text_to_tiny.c diff --git a/demos/l/music_256/visual.s b/demos/l/cometsong_256/visual.s similarity index 100% rename from demos/l/music_256/visual.s rename to demos/l/cometsong_256/visual.s diff --git a/demos/l/music_256/viz.s b/demos/l/cometsong_256/viz.s similarity index 100% rename from demos/l/music_256/viz.s rename to demos/l/cometsong_256/viz.s diff --git a/demos/l/music_256/zp.inc b/demos/l/cometsong_256/zp.inc similarity index 100% rename from demos/l/music_256/zp.inc rename to demos/l/cometsong_256/zp.inc diff --git a/demos/l/fuzzball_32/fuzzball.s b/demos/l/fuzzball_32/fuzzball.s index 92af775a..4f083a8a 100644 --- a/demos/l/fuzzball_32/fuzzball.s +++ b/demos/l/fuzzball_32/fuzzball.s @@ -1,7 +1,7 @@ ; Fuzzball -- a 32 byte Intro for Apple II -; this one was a mistake, it ends up walking through memory -; using it as a shape table +; this one was an accident, it ends up walking through memory +; a page at a time and using it as a shape table ; by Deater / dSr diff --git a/demos/l/music_256/Makefile b/demos/l/music_256/Makefile deleted file mode 100644 index 48e38af7..00000000 --- a/demos/l/music_256/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -include ../../../Makefile.inc - -DOS33 = ../../../utils/dos33fs-utils/dos33 -EMPTY_DISK = ../../../empty_disk -HGR2PNG = ../../../utils/hgr-utils/png2hgr -LINKER_SCRIPTS = ../../../linker_scripts -TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft - -all: hgr_d2.dsk text_to_tiny - -submit: hgr_d2_1k.zip - -#### - -hgr_d2.dsk: HELLO D2 VIZ - cp $(EMPTY_DISK)/empty.dsk ./hgr_d2.dsk - $(DOS33) -y hgr_d2.dsk SAVE A HELLO - $(DOS33) -y hgr_d2.dsk -t BIN -a 0x7E BSAVE D2 - $(DOS33) -y hgr_d2.dsk -t BIN -a 0xc00 BSAVE VIZ - -#### - -HELLO: hello.bas - $(TOKENIZE) < hello.bas > HELLO - -#### - -peasant_music.s: peasant.txt text_to_tiny - ./text_to_tiny peasant.txt > peasant_music.s - -#### - -mA2E_2.s: mA2E_2.txt text_to_tiny - ./text_to_tiny mA2E_2.txt > mA2E_2.s - - - -#### - -D2: d2.o - ld65 -o D2 d2.o -C ./apple2_7e_zp.inc - -d2.o: d2.s \ - zp.inc hardware.inc \ - mA2E_2.s visual.s \ - mockingboard_init.s play_frame.s \ - ay3_write_regs.s - ca65 -o d2.o d2.s -l d2.lst - -#### - -VIZ: viz.o - ld65 -o VIZ viz.o -C $(LINKER_SCRIPTS)/apple2_c00.inc - -viz.o: viz.s \ - zp.inc hardware.inc - ca65 -o viz.o viz.s -l viz.lst - - -#### - -text_to_tiny: text_to_tiny.o - $(CC) -o text_to_tiny text_to_tiny.o -lm - -text_to_tiny.o: text_to_tiny.c - $(CC) $(CFLAGS) -c text_to_tiny.c - -#### - -clean: - rm -f *~ *.o *.lst D2 VIZ HELLO text_to_tiny mA2E_2.s diff --git a/demos/l/music_256/hello.bas b/demos/l/music_256/hello.bas deleted file mode 100644 index 9bee5b9c..00000000 --- a/demos/l/music_256/hello.bas +++ /dev/null @@ -1,6 +0,0 @@ -5 HOME -10 PRINT "HGR DEMO2 - 1K DEMO AT DEMOSPLASH 2021" -20 PRINT CHR$(4);"CATALOG" -25 PRINT:PRINT "AUTOMATICALLY STARTING" -30 PRINT "]BRUN D2" -40 REM PRINT CHR$(4);"BRUN D2"