From 827ac2dda7bcd058b76ae8b5b153c46fd95b217c Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 15 Jul 2019 01:24:29 -0400 Subject: [PATCH] ootw: getting silly with audio --- ootw/Makefile | 14 ++- ootw/audio.s | 197 +++++++++++++++++++++++++++++++++++++ ootw/ootw_audio/NOTES | 10 ++ ootw/ootw_audio/mytuba.btc | Bin 0 -> 3840 bytes 4 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 ootw/audio.s create mode 100644 ootw/ootw_audio/NOTES create mode 100644 ootw/ootw_audio/mytuba.btc diff --git a/ootw/Makefile b/ootw/Makefile index bda85784..7c5af603 100644 --- a/ootw/Makefile +++ b/ootw/Makefile @@ -7,13 +7,14 @@ PNG2LZ4 = ../gr-utils/png2lz4 all: ootw.dsk -ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2 OOTW_C3 +ootw.dsk: HELLO LOADER INTRO OOTW OOTW_C2 OOTW_C3 AUDIO_TEST $(DOS33) -y ootw.dsk SAVE A HELLO $(DOS33) -y ootw.dsk BSAVE -a 0x1400 LOADER $(DOS33) -y ootw.dsk BSAVE -a 0x1700 INTRO $(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW $(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW_C2 $(DOS33) -y ootw.dsk BSAVE -a 0x1700 OOTW_C3 + $(DOS33) -y ootw.dsk BSAVE -a 0x1700 AUDIO_TEST # $(DOS33) -y ootw.dsk BSAVE -a 0x2000 COMPRESS-TEST @@ -77,6 +78,15 @@ ootw_c3.o: ootw_c3.s \ #### +AUDIO_TEST: audio.o + ld65 -o AUDIO_TEST audio.o -C ../linker_scripts/apple2_1700.inc + +audio.o: audio.s + ca65 -o audio.o audio.s -l audio.lst + + +#### + INTRO: intro.o ld65 -o INTRO intro.o -C ../linker_scripts/apple2_1700_9000.inc @@ -208,6 +218,6 @@ compress_test.o: compress_test.s lz4_decode.s compress_test.inc clean: rm -f *~ *.o *.lst *.lz4 HELLO OOTW OOTW_C2 INTRO LOADER \ - COMPRESS-TEST \ + COMPRESS-TEST AUDIO_TEST \ intro_data_01 intro_data_04 intro_data_06 \ intro_data_08 intro_data_09 diff --git a/ootw/audio.s b/ootw/audio.s new file mode 100644 index 00000000..3be04c87 --- /dev/null +++ b/ootw/audio.s @@ -0,0 +1,197 @@ +; Based on BTC.SYSTEM by Oliver Schmidt + +spkr = $C030 +btc_lo = $FE +btc_hi = $FF + + +;**************************************************************** +;* Audio playback * +;**************************************************************** +playaud: + lda #>audio + STA btc_hi + lda #