mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-31 18:31:48 +00:00
polly: some cool sounds
This commit is contained in:
parent
e20cfbfaf3
commit
3524f3c9a0
34
polly/Makefile
Normal file
34
polly/Makefile
Normal file
@ -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
|
||||
|
||||
|
BIN
polly/empty.dsk
Normal file
BIN
polly/empty.dsk
Normal file
Binary file not shown.
4
polly/hello.bas
Normal file
4
polly/hello.bas
Normal file
@ -0,0 +1,4 @@
|
||||
5 HOME
|
||||
100 PRINT "SOME SOUNDS BASED ON"
|
||||
110 PRINT "POLLYWOG"
|
||||
120 PRINT CHR$(4);"CATALOG"
|
51
polly/polly.s
Normal file
51
polly/polly.s
Normal file
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user