mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2024-11-28 20:49:38 +00:00
Restore shadow reg instead of overwriting
This commit is contained in:
parent
df32442fff
commit
57f57ce533
@ -150,17 +150,17 @@ jmp_rtn_1 jmp l_jmp_rtn-base ; Could inline the code and
|
|||||||
; 8 or 16 lines in order to give the system time to handle interrupts.
|
; 8 or 16 lines in order to give the system time to handle interrupts.
|
||||||
enable_int ldal stk_save+1 ; restore the stack
|
enable_int ldal stk_save+1 ; restore the stack
|
||||||
tcs
|
tcs
|
||||||
sep #$20 ; 8-bit mode
|
sep #$30 ; 8-bit mode
|
||||||
ldal STATE_REG ; Read Bank 0 / Write Bank 0
|
ldal STATE_REG
|
||||||
and #$CF
|
tax ; Save the value
|
||||||
|
and #$CF ; Read Bank 0 / Write Bank 0
|
||||||
stal STATE_REG
|
stal STATE_REG
|
||||||
cli
|
cli
|
||||||
nop ; Give a couple of cycles
|
nop ; Give a couple of cycles
|
||||||
sei
|
sei
|
||||||
ldal STATE_REG
|
txa ; Restore the state
|
||||||
ora #$10 ; Read Bank 0 / Write Bank 1
|
|
||||||
stal STATE_REG
|
stal STATE_REG
|
||||||
rep #$20
|
rep #$30
|
||||||
bra entry_1
|
bra entry_1
|
||||||
|
|
||||||
; This is the spot that needs to be page-aligned. In addition to simplifying the entry address
|
; This is the spot that needs to be page-aligned. In addition to simplifying the entry address
|
||||||
|
Loading…
Reference in New Issue
Block a user