diff --git a/src/4cade.a b/src/4cade.a index 5e52054f3..6cee76d71 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -172,7 +172,7 @@ COPYSRC = * !source "src/hw.accel.lc2.a" STACKBASE = * LCRAM2_END = STACKBASE + 15 - !if LCRAM2_END > DisableAccelerator { + !if LCRAM2_END >= DisableAccelerator { !error "code is too large: ends at ", LCRAM2_END } FONTDST = (LCRAM2_END + 255) and -256 @@ -191,7 +191,7 @@ EvenLasterMover !set PASS2=1 !warn "ProRWTS ends at ", hdddataend - 1 !warn "STACK at ", STACKBASE - !warn "LCRAM2 ends at ", LCRAM2_END - 1 + !warn "LCRAM2 ends at ", LCRAM2_END !warn "RELBASE = ", $10000 - (LastMover - FirstMover) } } diff --git a/src/constants.a b/src/constants.a index 66a747667..99f2d9dc6 100644 --- a/src/constants.a +++ b/src/constants.a @@ -6,9 +6,9 @@ ; YE OLDE GRAND UNIFIED MEMORY MAP ; ; LC RAM BANK 1 -; D000..E7E3 - persistent data structures (gGlobalPrefsStore, gGamesListStore) +; D000..E7F9 - persistent data structures (gGlobalPrefsStore, gGamesListStore) ; ...unused... -; E92B..FFF1 - main program code +; E91E..FFF1 - main program code ; FFF2..FFF9 - API functions and global constants available for main program ; code, prelaunchers, transition effects, &c. ; (Wait/UnwaitForVBL, MockingboardStuff, MachineStatus) @@ -17,9 +17,9 @@ ; LC RAM BANK 2 ; D000..D3FF - ProRWTS data ; D400..D66F - ProRWTS code -; D670..DB9B - HGR font code & ProRWTS glue code -; DB9C..DBAA - backup of stack (during gameplay and self-running demos) -; ...unused... +; D670..DBA2 - HGR font code & ProRWTS glue code +; DBA3..DBB2 - backup of stack (during gameplay and self-running demos) +; ...unused... yes, just one byte to spare ; DBB4..DBFF - (de)acceleration function ; DC00..DFFF - HGR font data ;------------------------------------------------------------------------------ @@ -141,3 +141,7 @@ IS_IIGS = %00100000 ; /!\ do not use this to gate SHR, use SUPP HAS_VIDHD = %00010000 SUPPORTS_SHR = %00110000 CHEATS_ENABLED = %00001000 + +; hacks +LoadFileDirect = $DAFB +launchpatch = $D613 \ No newline at end of file diff --git a/src/glue.launch.a b/src/glue.launch.a index 75d7e9314..2016d8f70 100644 --- a/src/glue.launch.a +++ b/src/glue.launch.a @@ -253,4 +253,9 @@ PlayGame ; execution falls through here Launch jsr SwitchToBank2 + lda #$BD + sta launchpatch + jsr saveslot ; set proper slot information + lda #$9D + sta launchpatch jmp LaunchInternal diff --git a/src/glue.prorwts2.lc2.a b/src/glue.prorwts2.lc2.a index 6d7d5ccbd..4ab01bddb 100644 --- a/src/glue.prorwts2.lc2.a +++ b/src/glue.prorwts2.lc2.a @@ -15,8 +15,8 @@ LoadFileAuxInternal !if RELBASE != $2000 { !ifdef PASS2 { } else { ;PASS2 - !if * != $DAFD { - !error "LoadFileDirect=",*, ", adjust !if and fix Berzap" + !if * != LoadFileDirect { + !error "LoadFileDirect=",*, ", fix constants.a" } } } diff --git a/src/prelaunch/berzap.a b/src/prelaunch/berzap.a index a0cccd8e2..e4bb436e4 100644 --- a/src/prelaunch/berzap.a +++ b/src/prelaunch/berzap.a @@ -36,7 +36,7 @@ callback2 pha lda #berzap_mb - jsr $DAFD ; ahem, LoadFileDirect + jsr LoadFileDirect pla sta $D403 pla diff --git a/src/prorwts2.a b/src/prorwts2.a index b47ae0561..35f2dd2cf 100644 --- a/src/prorwts2.a +++ b/src/prorwts2.a @@ -2747,8 +2747,6 @@ encbufpatch1 } ;allow_subdir = 1 !if allow_aux = 0 { rts - } else { ;allow_aux = 1 - beq hddrdwrdone } ;allow_aux = 0 } ;one_shot = 0 } else { ;aligned_read = 1 @@ -3264,6 +3262,13 @@ saveslot lda scrn_array, x initpatch lda ($48), y pla + +!ifdef PASS2 { +} else { ;PASS2 + !if * != launchpatch { + !error "launchpatch=",*, ", fix constants.a" + } +} sta scrn_array, x inx tya