Patch to deal with random stack pointer on bootup.

This commit is contained in:
Martin Haye 2021-11-07 07:15:17 -08:00
parent 46f9cafa53
commit f2c9e83eb7
3 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,9 @@
Boot patch
This patch sets the stack pointer very early in the boot process.
It works around the behavior of Jace (and possibly other emu's and maybe some real hardware) that sets a random stack pointer at startup.
801: 38 B0 03
80B: 08 8A 29 70 4A 4A 4A 4A -> 8A A2 FF 9A 08 20 F8 09
900: 3F 09 26
9F8: 00 00 00 00 00 00 00 00 -> AA 29 70 4A 4A 4A 4A 60

View File

@ -32,7 +32,10 @@ pDcmp = $84 ; len 2
decomp = $DF00
init ; Put something interesting on the screen :)
init ; ensure a reasonable stack ptr
ldx #$FF
txs
; Put something interesting on the screen :)
sta clr80Vid
jsr ROM_setnorm
jsr ROM_setkbd