add compile-time flag gOnAClearDayYouCanReadForever to reread every sector until it succeeds

This commit is contained in:
4am 2017-01-14 10:13:06 -05:00
parent a55d74b994
commit 0b7b6f09d1
3 changed files with 14 additions and 1 deletions

View File

@ -764,6 +764,10 @@ gIsProtDOS
!byte FALSE ; 0=true, 1=false
; set after reading T00
gOnAClearDayYouCanReadForever
!byte FALSE ; 0=true, 1=false
; compile-time flag, no way to change at runtime
!source "applyglobals.a"
!source "universalrwts.a"
LastMover

View File

@ -19,9 +19,14 @@ ReadSector
lda gIsProtDOS
beq _protread
setuprwts
ldy #<gRWTSParams
lda #>gRWTSParams
callrwts jsr $FF00 ; modified at runtime (see Inspect1)
bcc endread
lda gOnAClearDayYouCanReadForever
beq setuprwts
endread
rts
;
@ -54,6 +59,10 @@ go
lda #<gRWTSParams
ldy #>gRWTSParams
jsr $BA00 ; note non-standard entry point
bcc endprotread
lda gOnAClearDayYouCanReadForever
beq go
endprotread
rts
gRWTSParams ; used to read each sector

View File

@ -179,7 +179,7 @@ StringTable
; can be set directly before calling PrintByID.
;
header
!text "Passport by 4am 2017-01-11",00
!text "Passport by 4am 2017-01-14",00
mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "