diff --git a/polly/Makefile b/polly/Makefile new file mode 100644 index 00000000..7c64f92f --- /dev/null +++ b/polly/Makefile @@ -0,0 +1,34 @@ +include ../Makefile.inc + +DOS33 = ../dos33fs-utils/dos33 +PNG_TO_40x96 = ../gr-utils/png_to_40x96 +PNG_TO_40x48D = ../gr-utils/png_to_40x48d +PNG2RLE = ../gr-utils/png2rle +B2D = ../bmp2dhr/b2d + +all: polly.dsk + +polly.dsk: HELLO POLLY + cp empty.dsk polly.dsk + $(DOS33) -y polly.dsk SAVE A HELLO + $(DOS33) -y polly.dsk BSAVE -a 0x1000 POLLY + + +POLLY: polly.o + ld65 -o POLLY polly.o -C ../linker_scripts/apple2_1000.inc + +polly.o: polly.s + ca65 -o polly.o polly.s -l polly.lst + +### + + +HELLO: hello.bas + ../asoft_basic-utils/tokenize_asoft < hello.bas > HELLO + +#### + +clean: + rm -f *~ *.o *.lst HELLO POLLY + + diff --git a/polly/empty.dsk b/polly/empty.dsk new file mode 100644 index 00000000..b34eb519 Binary files /dev/null and b/polly/empty.dsk differ diff --git a/polly/hello.bas b/polly/hello.bas new file mode 100644 index 00000000..faae582f --- /dev/null +++ b/polly/hello.bas @@ -0,0 +1,4 @@ +5 HOME +100 PRINT "SOME SOUNDS BASED ON" +110 PRINT "POLLYWOG" +120 PRINT CHR$(4);"CATALOG" diff --git a/polly/polly.s b/polly/polly.s new file mode 100644 index 00000000..ca865aad --- /dev/null +++ b/polly/polly.s @@ -0,0 +1,51 @@ + + + +; Soft Switches +KEYPRESS= $C000 +KEYRESET= $C010 + + +test_sound: + + lda KEYPRESS + bpl test_sound + bit KEYRESET + + jsr play_note + jmp test_sound + + + + +play_note: + lda #$83 + sta smc1+1 + sta smc2+1 +note_loop: +smc2: + ldx #$83 +smc1: +l86cb: cpx #$95 + beq l86e9 + bcc l86d8 + lda $C056 ; (lores) + nop + jmp l86dd +l86d8: lda $C057 ; (hires) + nop + nop +l86dd: inx + bne l86f1 + lda $C030 ; speaker + inc smc1+1 + bne note_loop + rts +l86e9: lda $c030 ; speaker + lda $00 + jmp l86dd +l86f1: lda $ffff + lda $ffff + lda $00 + jmp l86cb +