diff --git a/src/constants.a b/src/constants.a index 37233c2f3..55b39980f 100644 --- a/src/constants.a +++ b/src/constants.a @@ -149,6 +149,7 @@ iCurBlockLo = $D401 iCurBlockHi = $D403 iProDOS_enter = $D678 LoadFileDirect = $DB01 +iAuxReq = $DB27 launchpatch = $D616 iAddToPath = $FEC3 itraverse = $D8E0 diff --git a/src/glue.prorwts2.lc2.a b/src/glue.prorwts2.lc2.a index 4ab01bddb..c68bfcc3b 100644 --- a/src/glue.prorwts2.lc2.a +++ b/src/glue.prorwts2.lc2.a @@ -35,6 +35,14 @@ LoadFileAuxInternal +ST16 ldrlo + lda #$FF ; read entire file (ProRWTS2 will figure out exact size) sta sizehi +!if RELBASE != $2000 { + !ifdef PASS2 { + } else { ;PASS2 + !if *+1 != iAuxReq { + !error "iAuxReq=",*+1, ", fix constants.a" + } + } +} @auxreq lda #0 sta auxreq diff --git a/src/macros.a b/src/macros.a index f7cb53f9a..6c5a8dd09 100755 --- a/src/macros.a +++ b/src/macros.a @@ -372,6 +372,8 @@ ; LC RAM 2 MUST BE BANKED IN ; LOW BYTE OF .addr MUST BE $00 !macro LOAD_FILE_AT .filepath, .addr { + lda #0 + sta iAuxReq ; read to main memory lda #>.addr sta ldrhi lda iCurBlockLo