From bf38603ed6041e5f58f9802c34cd0cefc70e4bd5 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 14 Sep 2021 00:40:29 -0400 Subject: [PATCH] ssi263: add some comments --- music/ssi-263/ssi263_detect.s | 6 ++ music/ssi-263/ssi263_test.s | 107 ++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 music/ssi-263/ssi263_test.s diff --git a/music/ssi-263/ssi263_detect.s b/music/ssi-263/ssi263_detect.s index 1b5f3d9e..df8f608f 100644 --- a/music/ssi-263/ssi263_detect.s +++ b/music/ssi-263/ssi263_detect.s @@ -1,3 +1,9 @@ +; This code detects a SSI263 chip on a Mockingboard +; it does this by trying to enable the chip and waiting for +; the SSI-263 to signal an interrupt when done. +; If the interrupt never comes then assume no SSI-263 is present +; The code assumes the SSI-263 is hooked to VIA6522 #2 (?) + ;============================= ;============================= ; detect SSI263 diff --git a/music/ssi-263/ssi263_test.s b/music/ssi-263/ssi263_test.s new file mode 100644 index 00000000..6dfeb0be --- /dev/null +++ b/music/ssi-263/ssi263_test.s @@ -0,0 +1,107 @@ +; +; ssi263_test.s +; +; Used to play speech through the SC-02 / SSI-263 chip +; optionally found on Mockingboard Cards +; +; Jeremy Rand's Apple II bejeweled was a helpful reference + +; Some notes: +; + Sound 1 card - one AY-3-8910 +; + Speech 1 card - one SC-01 chip +; + Sound II card -- two AY-3-8910 +; + Sound/Speech 1 - one SC-01/one AY-3-8910 +; + Mockingboard A - two AY-3-8913 two SSI-263 sockets +; + Mockingboard B - Mockingboard A upgrade with SSI-263 +; + Mockingboard C - Mockingboard A with one SSI-263 + +.include "hardware.inc" + +.include "ssi263.inc" + + +speech_test: + + jsr HOME + + lda #4 ; assume slot #4 for now + jsr detect_ssi263 + + lda irq_count + clc + adc #'A' + sta $400 + + lda #4 ; assume slot #4 for now + jsr ssi263_speech_init + + +speech_loop: + + ; hello + + lda #hello + sta SPEECH_PTRH + + jsr ssi263_speak + + jsr wait_until_keypress + + ; hello2 + + lda #hello2 + sta SPEECH_PTRH + + jsr ssi263_speak + + jsr wait_until_keypress + + jmp speech_loop + +wait_until_keypress: + + lda KEYPRESS + bpl wait_until_keypress + + bit KEYRESET + + rts + + +.include "ssi263_detect.s" + +.include "ssi263_speech.s" + + ; unrefined hello from Programming Guide +hello: + .byte $E9, $5C, $A8, $50, PHONEME_PAUSE ; PA + .byte $E9, $5C, $A8, $50, PHONEME_PAUSE ; PA + .byte $E9, $5C, $A8, $50, PHONEME_HF ; HF + .byte $E9, $5C, $A8, $50, PHONEME_EH ; EH + .byte $E9, $5C, $A8, $50, PHONEME_L ; L + .byte $E9, $5C, $A8, $50, PHONEME_O ; O + .byte $E9, $5C, $A8, $50, PHONEME_PAUSE ; PA + .byte $E9, $5C, $A8, $50, PHONEME_PAUSE ; PA + .byte $FF + + ; refined hello from Programming Guide +hello2: + .byte $E9, $5C, $A8, $68, PHONEME_PAUSE ; PA + .byte $E9, $5C, $A8, $68, PHONEME_PAUSE ; PA + .byte $E9, $50, $D8, $68, PHONEME_EH ; EH + .byte $E9, $52, $88, $38, $6C ; HF + .byte $E9, $5C, $D8, $4A, $4B ; EH1 + .byte $E9, $5A, $C8, $4C, $9B ; UH3 + .byte $E9, $5A, $C8, $48, $22 ; LF + .byte $E9, $5C, $98, $3F, $9B ; UH3 + .byte $E9, $5C, $98, $34, $91 ; O + .byte $E9, $5C, $A8, $2A, $52 ; OU + .byte $E9, $53, $58, $33, $96 ; U + .byte $E9, $50, $C8, $3C, $D6 ; U + .byte $E9, $5C, $C8, $2C, PHONEME_PAUSE ; PA + .byte $E9, $5C, $C8, $0C, PHONEME_PAUSE ; PA + .byte $FF