peasant: urgh I forgot to update the right IRQ vector

This commit is contained in:
Vince Weaver 2021-09-27 22:37:34 -04:00
parent e770eeb205
commit 1ab7f2ecf3

View File

@ -44,9 +44,9 @@ ssi263_speech_init:
lda #<ssi263_speech_irq ; point IRQ handler to our code
sta $3fe
sta $fffe
lda #>ssi263_speech_irq
sta $3ff
sta $ffff
; set defaults
@ -84,6 +84,8 @@ ssi263_speech_init:
ssi263_speech_shutdown:
sei
jsr ssi263_disable
rts
@ -195,6 +197,26 @@ no_oflo:
speech_end:
jsr ssi263_disable
end_interrupt:
pla
tay ; restore Y
pla
tax ; restore X
pla ; restore A
interrupt_smc:
; lda $45 ; restore A (II+/IIe)
plp ; restore flags
rti ; return from interrupt
ssi263_disable:
; If at the end, turn everything off
; Toggle CTL while DR set to disable A/!R
@ -222,21 +244,7 @@ speech_end:
ldx #VIA6522_IER2
jsr ssi263_write_chip
end_interrupt:
pla
tay ; restore Y
pla
tax ; restore X
pla ; restore A
interrupt_smc:
; lda $45 ; restore A (II+/IIe)
plp ; restore flags
rti ; return from interrupt
rts
speech_busy: .byte $00
speech_playing: .byte $00