diff --git a/src/constants.a b/src/constants.a index 7d750d829..a1043fa5d 100644 --- a/src/constants.a +++ b/src/constants.a @@ -10,7 +10,7 @@ ; ...unused... ; E000..E3FF - HGR font data ; ...unused... -; E978..FFEE - main program code +; E96C..FFEE - main program code ; FFEF..FFF9 - API functions and global constants available for main program ; code, prelaunchers, transition effects, &c. ; (LoadFileDirect, Wait/UnwaitForVBL, MockingboardStuff, MachineStatus) @@ -19,8 +19,8 @@ ; LC RAM BANK 2 ; D000..D3FF - ProRWTS data ; D400..D6C3 - ProRWTS code -; D6C4..DAB8 - ProRWTS glue code -; DAB9..DABF - backup of stack (during gameplay and self-running demos) +; D6C4..DAB9 - ProRWTS glue code +; DABA..DABF - backup of stack (during gameplay and self-running demos) ; ...unused... ; DBB4..DBFF - (de)acceleration function ; DC00..DFFF - unused @@ -154,7 +154,7 @@ iCurBlockLo = $D401 ; constant iCurBlockHi = $D403 ; constant launchpatch = $D662 ; glue.launch.a iAddToPath = $FE8F ; Roger Rabbit, avoid, use Infiltrator 2 style instead -itraverse = $D959 ; Roger Rabbit, avoid, use Infiltrator 2 style instead +itraverse = $D964 ; Roger Rabbit, avoid, use Infiltrator 2 style instead ldrlo = $55 ; constant ldrhi = $56 ; constant namlo = $57 ; constant diff --git a/src/prodos.impl.lc2.a b/src/prodos.impl.lc2.a index f5e602ebb..5d5cc0ce5 100644 --- a/src/prodos.impl.lc2.a +++ b/src/prodos.impl.lc2.a @@ -412,6 +412,13 @@ resetval=$f0 @saved_zp !fill (last_zp - first_zp) + 1 +resetRoot +gRootDirectory + +LDADDR 0 ; SMC + sta (reloc + unrhddblocklo - unrelochdd) + 1 + sty (reloc + unrhddblockhi - unrelochdd) + 1 + rts + ;------------------------------------------------------------------------------ ; traverse [private] ; @@ -426,10 +433,7 @@ resetval=$f0 } } traverse -gRootDirectory - +LDADDR 0 ; SMC - sta (reloc + unrhddblocklo - unrelochdd) + 1 - sty (reloc + unrhddblockhi - unrelochdd) + 1 + jsr resetRoot ;search for '/' character in filename diff --git a/src/ui.attract.mode.a b/src/ui.attract.mode.a index e67063d32..df3ca1b37 100644 --- a/src/ui.attract.mode.a +++ b/src/ui.attract.mode.a @@ -90,6 +90,7 @@ MiniAttractMode stx @MiniAttractIndex+1 stx @MiniAttractIndex+3 @loop + jsr resetRoot jsr LoadIndexedFile !word kAttractModeFulFile - !word $6000