From 5a0f1c7e46f40e013a675bed0167daab30ea76c4 Mon Sep 17 00:00:00 2001 From: pjht Date: Fri, 24 Mar 2023 08:04:53 -0500 Subject: [PATCH] Adjust stack when jumping to bootsector to avoid IO space --- rom.68k | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rom.68k b/rom.68k index 40f7362..00b3261 100644 --- a/rom.68k +++ b/rom.68k @@ -22,8 +22,12 @@ romfindret: jmp (a6) | Jump to the ramcode ramcode: - move.b #0x0, (0xF2, a6) | Disable the ROM + move.b #0x0, (0xF3, a6) | Disable the ROM move.l #0x1, (a5) | Enable the RAM at base 0x0 + cmpi.l #0x1000000, d7 + blt.b sp_ok + move.l #0xff0000, d7 + sp_ok: move.l d7, a7 | Load sector 0 to 0x0 move.l #0x0, (0x0, a4) | Set the sector number to 0