Skip to content

Commit 06c2f5c

Browse files
mbrukneragurtovoy
authored andcommitted
fix: tiles off command causes system lockup (#93)
The tiles off path skipped the ply that balances the phy at entry to TileSwitch, corrupting the return address on the hardware stack.
1 parent efcf610 commit 06c2f5c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

source/system.f256/module.interfaces/graphics/gcontrol.asm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ TileSwitch:
188188
lda #GCMD_TileCtl
189189
jsr GXGraphicDraw
190190
plx
191-
bpl TilesCtrlLoop ; nothing else.
191+
bpl _TileSwitchDone ; OFF: skip size/scroll setup
192192

193193
lda #GCMD_TileSize ; set size of tile map.
194194
ldx TileMapWidth
@@ -199,6 +199,7 @@ TileSwitch:
199199
jsr _TileResetScroll
200200
lda #GCMD_TileScrollY
201201
jsr _TileResetScroll
202+
_TileSwitchDone:
202203
ply
203204
bra TilesCtrlLoop
204205

0 commit comments

Comments
 (0)