mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-04 18:29:30 +00:00
ksp_theme: fix interrupt bug on older Apple IIs
This commit is contained in:
parent
762ebf13fe
commit
42e4f41997
|
@ -352,7 +352,8 @@ forever_loop:
|
||||||
; Then it sets up the stack like an interrupt and calls 0x3fe
|
; Then it sets up the stack like an interrupt and calls 0x3fe
|
||||||
|
|
||||||
interrupt_handler:
|
interrupt_handler:
|
||||||
pha ; save A
|
; pha ; save A
|
||||||
|
; A saved by firmware to $45
|
||||||
txa
|
txa
|
||||||
pha
|
pha
|
||||||
tya
|
tya
|
||||||
|
@ -549,10 +550,13 @@ done_left_interrupt:
|
||||||
|
|
||||||
done_interrupt:
|
done_interrupt:
|
||||||
pla
|
pla
|
||||||
tay
|
tay ; restore Y
|
||||||
pla
|
|
||||||
tax
|
|
||||||
pla
|
pla
|
||||||
|
tax ; restore X
|
||||||
|
|
||||||
|
lda $45 ; restore A
|
||||||
|
|
||||||
rti
|
rti
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -338,8 +338,13 @@ forever_loop:
|
||||||
; Then it sets up the stack like an interrupt and calls 0x3fe
|
; Then it sets up the stack like an interrupt and calls 0x3fe
|
||||||
|
|
||||||
interrupt_handler:
|
interrupt_handler:
|
||||||
pha ; save A
|
; pha ; firmware saves A to $45 for us
|
||||||
; Should we save X and Y too?
|
txa ; save X
|
||||||
|
pha
|
||||||
|
tya
|
||||||
|
pha ; save Y
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bit $C404 ; can clear 6522 interrupt by reading T1C-L
|
bit $C404 ; can clear 6522 interrupt by reading T1C-L
|
||||||
|
|
||||||
|
@ -437,6 +442,12 @@ not_done:
|
||||||
|
|
||||||
done_interrupt:
|
done_interrupt:
|
||||||
pla
|
pla
|
||||||
|
tay ; restore y
|
||||||
|
pla
|
||||||
|
tax ; restore X
|
||||||
|
|
||||||
|
lda $45 ; restore A
|
||||||
|
|
||||||
rti
|
rti
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user