peasant: work on getting trogdor scene to run again

having to deal with 6522 irq being set for music
This commit is contained in:
Vince Weaver 2021-09-27 22:26:37 -04:00
parent fc7aced25c
commit e770eeb205
6 changed files with 25 additions and 41 deletions

View File

@ -12,7 +12,7 @@
; A = slot of mockingboard
detect_ssi263:
sta ssi263_slot ; store for later
sta MOCKINGBOARD_SLOT ; store for later
and #$7
ora #$c0 ; turn slot number into address
@ -134,4 +134,4 @@ ssid_wc_smc1:
irq_count: .byte $00
irq1backup: .byte $00
irq2backup: .byte $00
ssi263_slot: .byte $00

View File

@ -30,6 +30,7 @@ rc_smc1:
ssi263_speech_init:
sei ; disable interrupts
lda MOCKINGBOARD_SLOT
and #$7
ora #$c0 ; turn slot number into address
sta wc_smc1+2 ; update the read/write routines
@ -70,7 +71,6 @@ ssi263_speech_init:
ldx #SSI263_I
jsr ssi263_write_chip
cli ; enable interrupts
@ -147,7 +147,7 @@ ssi263_speech_irq:
tya
pha ; save Y
inc $0404 ; irq indicator on screen
; inc $0404 ; irq indicator on screen
; be sure it was a 6522#2 interrupt
ldx #VIA6522_IFR2
@ -232,7 +232,7 @@ end_interrupt:
pla ; restore A
interrupt_smc:
lda $45 ; restore A (II+/IIe)
; lda $45 ; restore A (II+/IIe)
plp ; restore flags

View File

@ -12,17 +12,12 @@
trogdor:
lda #0
sta GAME_OVER
jsr setup_speech
jsr hgr_make_tables
jsr hgr2
lda #0
sta FRAME
jsr hgr_make_tables ; needed?
jsr hgr2 ; needed?
; update score
jsr update_score
@ -73,10 +68,17 @@ trogdor_cave:
;==================================
; text to speech, where available!
lda SOUND_STATUS
and #SOUND_SSI263
beq skip_speech
speech_loop:
; trogdor
lda #4 ; assume slot #4 for now
jsr ssi263_speech_init
lda #<trogdor_honestly
sta SPEECH_PTRL
lda #>trogdor_honestly
@ -87,10 +89,12 @@ speech_loop:
wait_for_speech:
lda speech_busy
bmi wait_for_speech
bpl done_speech
skip_speech:
jsr wait_until_keypress
; jsr wait_until_keypress
done_speech:
jsr hgr_partial_restore

View File

@ -1,24 +1,3 @@
setup_speech:
; jsr HOME
; lda #4 ; assume slot #4 for now
; jsr detect_ssi263
; lda irq_count
; clc
; adc #'A' ; hack to show if detected or not
; sta $400 ; (B is detected, A is not)
lda #4 ; assume slot #4 for now
jsr ssi263_speech_init
rts
;.include "ssi263_detect.s"
;.include "ssi263_simple_speech.s"
; the document
; "Phonetic Speech Dictionary for the SC-01 Speech Synthesizer"

View File

@ -174,7 +174,7 @@ dont_enable_mc:
;===========================
detect_ssi:
lda MB_ADDR_H
and #$87 ; slot
and #$07 ; slot
jsr detect_ssi263
lda irq_count

View File

@ -1,11 +1,12 @@
JS_BUTTON_STATE = $04
JOYSTICK_ENABLED= $05
SOUND_STATUS = $06
JS_BUTTON_STATE = $03
JOYSTICK_ENABLED= $04
SOUND_STATUS = $05
SOUND_DISABLED = $80
SOUND_IN_LC = $01 ; sound in language card
SOUND_MOCKINGBOARD = $02 ; mockingboard detected
SOUND_SSI263 = $04 ; SSI-263 speech chip detected
MOCKINGBOARD_SLOT = $06
DISP_PAGE = $07 ; only in videlectrix intro?
DRAW_PAGE = $08
NIBCOUNT = $09