Skip to content
Permalink
Browse files
Added quick 'n dirty "temp" variable corruption workaround (how could…
… I have overlooked this potential issue for so long??)
  • Loading branch information
Ramsis-SNES committed Dec 17, 2015
1 parent cf569df commit 0d06003774619236534a22d7e37d88c2a37d6df9
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/lib_quicksetup.inc.asm
@@ -21,6 +21,15 @@ VBlank:
phk ; set Data Bank = Program Bank
plb

lda temp+6 ; push temp variables on the stack (used in scrolling routines)
pha
lda temp+4
pha
lda temp+2
pha
lda temp
pha

sep #A_8BIT ; A = 8 bit

jsr DoScrolling
@@ -107,6 +116,15 @@ VBlank:

rep #AXY_8BIT ; A/X/Y = 16 bit

pla ; restore temp variables
sta temp
pla
sta temp+2
pla
sta temp+4
pla
sta temp+6

ply ; restore 16 bit registers
plx
pla

0 comments on commit 0d06003

Please sign in to comment.