force main-memory reads in LoadFileDirect

This commit is contained in:
Peter Ferrie 2020-11-24 16:49:02 -08:00
parent 419f171290
commit 83f7e02279
3 changed files with 11 additions and 0 deletions

View File

@ -149,6 +149,7 @@ iCurBlockLo = $D401
iCurBlockHi = $D403
iProDOS_enter = $D678
LoadFileDirect = $DB01
iAuxReq = $DB27
launchpatch = $D616
iAddToPath = $FEC3
itraverse = $D8E0

View File

@ -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

View File

@ -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