back up less of the stack

This commit is contained in:
4am 2019-09-10 13:50:36 -04:00
parent 22e1dcc014
commit 27ec2ebd4e
3 changed files with 6 additions and 6 deletions

View File

@ -53,12 +53,12 @@ RestoreStackNextTime
; caller.
lda #$18 ; reset to 'clc' opcode so we don't try to
sta RestoreStackNextTime ; restore the same stack twice
ldx #1
ldx #$F1
- lda $DF00,x ; restore stack
sta $100,x
inx
bne -
ldx $DF00 ; restore stack pointer
ldx $DFF0 ; restore stack pointer
txs
+READ_RAM1_WRITE_RAM1
rts ; and return to caller

View File

@ -17,8 +17,8 @@
; D400..D5FF - ProRWTS code
; D600..D9FF - HGR font data
; DA00..DD5C - ProRWTS glue code
; DD5D..DEFF - unused
; DF00..DFFF - backup of stack (during gameplay and self-running demos)
; DD5D..DFEF - unused
; DFF0..DFFF - backup of stack (during gameplay and self-running demos)
;------------------------------------------------------------------------------
; soft switches

View File

@ -173,13 +173,13 @@ gCurrentlyVisibleSlideshowIndex
Launch
+READ_RAM2_WRITE_RAM2
jsr SaveOrRestoreScreenHoles ; save screen hole contents
ldx #1
ldx #$F1
- lda $100,x
sta $DF00,x ; back up stack
inx
bne -
tsx ; back up stack pointer
stx $DF00
stx $DFF0
lda #$38 ; 'sec' opcode to tell |Reenter| to
sta RestoreStackNextTime ; restore the stack and stack pointer