mirror of
https://github.com/a2-4am/passport.git
synced 2025-01-09 17:31:02 +00:00
verify RW18 (WIP)
This commit is contained in:
parent
09b58e2c58
commit
b080cbf31c
@ -67,6 +67,11 @@
|
|||||||
; reset before each operation
|
; reset before each operation
|
||||||
; set in IDBootloader() after reading T00,S00
|
; set in IDBootloader() after reading T00,S00
|
||||||
|
|
||||||
|
;gIsRW18
|
||||||
|
!byte FALSE ; 0=true, 1=false
|
||||||
|
; reset before each operation
|
||||||
|
; set in IDBootFailure() after reading T00
|
||||||
|
|
||||||
FIRSTFILTER
|
FIRSTFILTER
|
||||||
;gPossibleB4BBBasic
|
;gPossibleB4BBBasic
|
||||||
!byte FALSE ; 0=true, 1=false
|
!byte FALSE ; 0=true, 1=false
|
||||||
|
@ -145,8 +145,10 @@ gIsInfocom18 = gPossibleB4BBBasic-$01 ; byte
|
|||||||
gIs13Sector = gIsInfocom18-$01 ; byte
|
gIs13Sector = gIsInfocom18-$01 ; byte
|
||||||
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
|
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
|
||||||
gMECCFastloadType = gIs13Sector-$01 ; byte
|
gMECCFastloadType = gIs13Sector-$01 ; byte
|
||||||
|
;gIsRW18 is a special case whose ID is not in the regular inspection path
|
||||||
|
gIsRW18 = gMECCFastloadType-$01 ; byte
|
||||||
|
|
||||||
gOnAClearDayYouCanReadForever = gMECCFastloadType-$01 ; byte
|
gOnAClearDayYouCanReadForever = gIsRW18-$01 ; byte
|
||||||
gTargetType = gOnAClearDayYouCanReadForever-$01 ; byte
|
gTargetType = gOnAClearDayYouCanReadForever-$01 ; byte
|
||||||
gRAMDiskRef = gTargetType-$01 ; byte
|
gRAMDiskRef = gTargetType-$01 ; byte
|
||||||
gHardDiskRef = gRAMDiskRef-$01 ; byte
|
gHardDiskRef = gRAMDiskRef-$01 ; byte
|
||||||
@ -222,6 +224,7 @@ ConstructStandardDelivery = jConstructStandardDelivery
|
|||||||
!warn "gIsRDOS13=",gIsRDOS13
|
!warn "gIsRDOS13=",gIsRDOS13
|
||||||
!warn "gIsInfocom18=",gIsInfocom18
|
!warn "gIsInfocom18=",gIsInfocom18
|
||||||
!warn "gIs13Sector=",gIs13Sector
|
!warn "gIs13Sector=",gIs13Sector
|
||||||
|
!warn "gIsRW18=",gIsRW18
|
||||||
!warn "gOnAClearDayYouCanReadForever=",gOnAClearDayYouCanReadForever
|
!warn "gOnAClearDayYouCanReadForever=",gOnAClearDayYouCanReadForever
|
||||||
!warn "gTargetType=",gTargetType
|
!warn "gTargetType=",gTargetType
|
||||||
!warn "gRAMDiskRef=",gRAMDiskRef
|
!warn "gRAMDiskRef=",gRAMDiskRef
|
||||||
|
@ -19,6 +19,7 @@ ReadWithRWTS
|
|||||||
jmp Cancel
|
jmp Cancel
|
||||||
.checkinfocom
|
.checkinfocom
|
||||||
lda gIsInfocom18
|
lda gIsInfocom18
|
||||||
|
and gIsRW18
|
||||||
bne checksector
|
bne checksector
|
||||||
jsr VerifyInfocom18
|
jsr VerifyInfocom18
|
||||||
bcc .passtrack
|
bcc .passtrack
|
||||||
|
@ -40,6 +40,10 @@ IDBootloader
|
|||||||
ldx gIsInfocom18
|
ldx gIsInfocom18
|
||||||
beq .printinfo
|
beq .printinfo
|
||||||
|
|
||||||
|
lda #s_rw18
|
||||||
|
ldx gIsRW18
|
||||||
|
beq .printinfo
|
||||||
|
|
||||||
.check13
|
.check13
|
||||||
lda gIs13Sector
|
lda gIs13Sector
|
||||||
bne .sanity
|
bne .sanity
|
||||||
@ -341,7 +345,9 @@ PrereadT00Partial
|
|||||||
; when the initial read failed
|
; when the initial read failed
|
||||||
; identifies Infocom 18-sector side B disks
|
; identifies Infocom 18-sector side B disks
|
||||||
; and pure 13-sector disks
|
; and pure 13-sector disks
|
||||||
|
; and Broderbund RW18 disks
|
||||||
; doubles as Infocom verification routine after ID
|
; doubles as Infocom verification routine after ID
|
||||||
|
; triples as RW18 verification routine after ID
|
||||||
; written by qkumba
|
; written by qkumba
|
||||||
;
|
;
|
||||||
; in: nothing
|
; in: nothing
|
||||||
@ -372,7 +378,8 @@ VerifyInfocom18
|
|||||||
dec modsrc
|
dec modsrc
|
||||||
beq .no
|
beq .no
|
||||||
lda gIsInfocom18
|
lda gIsInfocom18
|
||||||
beq .no ; if in Infocom mode already then we have a true failure
|
and gIsRW18
|
||||||
|
beq .no ; if in Infocom/RW18 mode already then we have a true failure
|
||||||
bne .retry13 ; otherwise, try to identify 13-sector instead
|
bne .retry13 ; otherwise, try to identify 13-sector instead
|
||||||
; the issue being that both have a D5 AA AD sequence
|
; the issue being that both have a D5 AA AD sequence
|
||||||
|
|
||||||
@ -381,6 +388,8 @@ VerifyInfocom18
|
|||||||
-- cmp #$D5
|
-- cmp #$D5
|
||||||
bne ---
|
bne ---
|
||||||
jsr ReadNib
|
jsr ReadNib
|
||||||
|
cmp #$9D
|
||||||
|
beq .RW18
|
||||||
cmp #$AA
|
cmp #$AA
|
||||||
bne --
|
bne --
|
||||||
jsr ReadNib
|
jsr ReadNib
|
||||||
@ -431,6 +440,14 @@ VerifyInfocom18
|
|||||||
lda $C0E8
|
lda $C0E8
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
.RW18
|
||||||
|
jsr .rw18pro
|
||||||
|
bne --
|
||||||
|
ldx gIsRW18
|
||||||
|
beq .verifyrw18
|
||||||
|
sta gIsRW18
|
||||||
|
bne .checkmode ; always taken
|
||||||
|
|
||||||
;build 5-and-3 decoding table
|
;build 5-and-3 decoding table
|
||||||
;for 13-sector support
|
;for 13-sector support
|
||||||
|
|
||||||
@ -453,6 +470,88 @@ VerifyInfocom18
|
|||||||
sty gIs13Sector
|
sty gIs13Sector
|
||||||
beq .checkmode ; always taken
|
beq .checkmode ; always taken
|
||||||
|
|
||||||
|
.verifyrw18
|
||||||
|
ldx #$06 ; six sectors, three times the usual size
|
||||||
|
stx tmp ; sector counter
|
||||||
|
bne +
|
||||||
|
--- jsr ReadNib
|
||||||
|
-- cmp #$D5
|
||||||
|
bne ---
|
||||||
|
jsr ReadNib
|
||||||
|
cmp #$9D
|
||||||
|
bne --
|
||||||
|
jsr .rw18pro
|
||||||
|
bne .badrw18
|
||||||
|
+ ldy #4
|
||||||
|
- dey
|
||||||
|
beq .badrw18
|
||||||
|
jsr ReadNib6
|
||||||
|
eor #$A5
|
||||||
|
bne -
|
||||||
|
sta $3A
|
||||||
|
tay
|
||||||
|
-- ldx $C0EC
|
||||||
|
bpl --
|
||||||
|
eor $3A
|
||||||
|
eor $BA00,x
|
||||||
|
sta $2F
|
||||||
|
lda $BA00,x
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
sta $30
|
||||||
|
- ldx $C0EC
|
||||||
|
bpl -
|
||||||
|
and #$C0
|
||||||
|
ora $BA00,x
|
||||||
|
sta $3A
|
||||||
|
lda $30
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
- ldx $C0EC
|
||||||
|
bpl -
|
||||||
|
sta $30
|
||||||
|
and #$C0
|
||||||
|
ora $BA00,x
|
||||||
|
sta $3B
|
||||||
|
lda $30
|
||||||
|
asl
|
||||||
|
- ldx $C0EC
|
||||||
|
bpl -
|
||||||
|
asl
|
||||||
|
ora $BA00,x
|
||||||
|
eor $3B
|
||||||
|
eor $2F
|
||||||
|
iny
|
||||||
|
bne --
|
||||||
|
- ldx $C0EC
|
||||||
|
bpl -
|
||||||
|
eor $BA00,x
|
||||||
|
eor $3A
|
||||||
|
and #$3F
|
||||||
|
bne .badrw18
|
||||||
|
jsr ReadNib
|
||||||
|
cmp #$D4
|
||||||
|
bne .badrw18
|
||||||
|
dec tmp
|
||||||
|
bne ---
|
||||||
|
jmp .checkmode
|
||||||
|
|
||||||
|
.badrw18
|
||||||
|
jmp .badsect
|
||||||
|
|
||||||
|
.rw18pro
|
||||||
|
jsr ReadNib6 ; region (half)
|
||||||
|
sta $2C
|
||||||
|
jsr ReadNib6 ; region (half)
|
||||||
|
sta $2D
|
||||||
|
jsr ReadNib6 ; checksum
|
||||||
|
eor $2C
|
||||||
|
eor $2D
|
||||||
|
bne .badrw18
|
||||||
|
jsr ReadNib6 ; epilogue
|
||||||
|
eor #$AA
|
||||||
|
rts
|
||||||
|
|
||||||
read13
|
read13
|
||||||
lda $C0E9
|
lda $C0E9
|
||||||
lda #$1C ; retry count
|
lda #$1C ; retry count
|
||||||
|
@ -165,6 +165,7 @@ Reaction
|
|||||||
sta gIsProtDOS
|
sta gIsProtDOS
|
||||||
sta gIsInfocom18
|
sta gIsInfocom18
|
||||||
sta gIs13Sector
|
sta gIs13Sector
|
||||||
|
sta gIsRW18
|
||||||
lda #$00
|
lda #$00
|
||||||
sta gTrack
|
sta gTrack
|
||||||
sta gSector
|
sta gSector
|
||||||
@ -440,31 +441,31 @@ LastMover
|
|||||||
!warn "LowPoint=", HIGHPOINT - (LastMover - FirstMover)
|
!warn "LowPoint=", HIGHPOINT - (LastMover - FirstMover)
|
||||||
}
|
}
|
||||||
|
|
||||||
!warn "CleanExit=",CleanExit
|
!warn "^!set CleanExit=",CleanExit
|
||||||
!warn "WaitForKey=",WaitForKey
|
!warn "^!set WaitForKey=",WaitForKey
|
||||||
!warn "OpenFile=",OpenFile
|
!warn "^!set OpenFile=",OpenFile
|
||||||
!warn "ReadFile=",ReadFile
|
!warn "^!set ReadFile=",ReadFile
|
||||||
!warn "CloseFile=",CloseFile
|
!warn "^!set CloseFile=",CloseFile
|
||||||
!warn "GetVolumeName=",GetVolumeName
|
!warn "^!set GetVolumeName=",GetVolumeName
|
||||||
!warn "OnlineReturn=",OnlineReturn
|
!warn "^!set OnlineReturn=",OnlineReturn
|
||||||
!warn "VolumeName=",VolumeName
|
!warn "^!set VolumeName=",VolumeName
|
||||||
!warn "RAMDiskImagePath=",RAMDiskImagePath
|
!warn "^!set RAMDiskImagePath=",RAMDiskImagePath
|
||||||
!warn "GetVolumeInfo=",GetVolumeInfo
|
!warn "^!set GetVolumeInfo=",GetVolumeInfo
|
||||||
!warn "mliparam=",mliparam
|
!warn "^!set mliparam=",mliparam
|
||||||
!warn "access=",access
|
!warn "^!set access=",access
|
||||||
!warn "filetype=",filetype
|
!warn "^!set filetype=",filetype
|
||||||
!warn "auxtype=",auxtype
|
!warn "^!set auxtype=",auxtype
|
||||||
!warn "blocks=",blocks
|
!warn "^!set blocks=",blocks
|
||||||
!warn "PREFSFILE=",PREFSFILE
|
!warn "^!set PREFSFILE=",PREFSFILE
|
||||||
!warn "PREFSBUFFER=",PREFSBUFFER
|
!warn "^!set PREFSBUFFER=",PREFSBUFFER
|
||||||
!warn "PREFSREADLEN=",PREFSREADLEN
|
!warn "^!set PREFSREADLEN=",PREFSREADLEN
|
||||||
!warn "PREFSVER=",PREFSVER
|
!warn "^!set PREFSVER=",PREFSVER
|
||||||
!warn "SavePrefs=",SavePrefs
|
!warn "^!set SavePrefs=",SavePrefs
|
||||||
!warn "ValidatePrefs=",ValidatePrefs
|
!warn "^!set ValidatePrefs=",ValidatePrefs
|
||||||
!warn "kForceLower=",kForceLower
|
!warn "^!set kForceLower=",kForceLower
|
||||||
!warn "PrintByID=",PrintByID
|
!warn "^!set PrintByID=",PrintByID
|
||||||
!warn "DiskIIArray=",DiskIIArray
|
!warn "^!set DiskIIArray=",DiskIIArray
|
||||||
!warn "HardDiskArray=",HardDiskArray
|
!warn "^!set HardDiskArray=",HardDiskArray
|
||||||
!warn "ThisSlot=",ThisSlot
|
!warn "^!set ThisSlot=",ThisSlot
|
||||||
!warn "CheckCache=",CheckCache
|
!warn "^!set CheckCache=",CheckCache
|
||||||
}
|
}
|
||||||
|
@ -162,6 +162,7 @@ StringTableLow
|
|||||||
!byte <.targetdisk
|
!byte <.targetdisk
|
||||||
!byte <.targetfile
|
!byte <.targetfile
|
||||||
!byte <.targetcffa
|
!byte <.targetcffa
|
||||||
|
!byte <.rw18
|
||||||
|
|
||||||
StringTableHigh
|
StringTableHigh
|
||||||
!byte >.header
|
!byte >.header
|
||||||
@ -307,6 +308,7 @@ StringTableHigh
|
|||||||
!byte >.targetdisk
|
!byte >.targetdisk
|
||||||
!byte >.targetfile
|
!byte >.targetfile
|
||||||
!byte >.targetcffa
|
!byte >.targetcffa
|
||||||
|
!byte >.rw18
|
||||||
|
|
||||||
;
|
;
|
||||||
; Text can contain substitution strings, which
|
; Text can contain substitution strings, which
|
||||||
@ -342,7 +344,7 @@ StringTableHigh
|
|||||||
.passport
|
.passport
|
||||||
!text "Passport ",$00
|
!text "Passport ",$00
|
||||||
.header
|
.header
|
||||||
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-04-19",$00
|
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-04-20",$00
|
||||||
.bar9
|
.bar9
|
||||||
!text "_________",$00
|
!text "_________",$00
|
||||||
.bar18
|
.bar18
|
||||||
@ -715,4 +717,6 @@ StringTableHigh
|
|||||||
!text "T00,S01 Erasing site license information",$00
|
!text "T00,S01 Erasing site license information",$00
|
||||||
.badblock
|
.badblock
|
||||||
!text "@",s_found,"bad block @",s_protectioncheck,$00
|
!text "@",s_found,"bad block @",s_protectioncheck,$00
|
||||||
|
.rw18
|
||||||
|
!text "@",s_found,"RW18-sector format",$8D,$00
|
||||||
}
|
}
|
||||||
|
@ -145,3 +145,4 @@ s_writingto = $8B
|
|||||||
s_targetdisk = $8C
|
s_targetdisk = $8C
|
||||||
s_targetfile = $8D
|
s_targetfile = $8D
|
||||||
s_targetcffa = $8E
|
s_targetcffa = $8E
|
||||||
|
s_rw18 = $8F
|
||||||
|
@ -250,6 +250,21 @@ ReadNib
|
|||||||
bpl -
|
bpl -
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
;-------------------------------
|
||||||
|
; ReadNib6
|
||||||
|
; read a single nibble from S6,D1
|
||||||
|
; return corresponding 6-bit value
|
||||||
|
;
|
||||||
|
; in: S6,D1 must be spun up and ready to read
|
||||||
|
; out: A contains 6-bit value
|
||||||
|
; X contains nibble value
|
||||||
|
;-------------------------------
|
||||||
|
ReadNib6
|
||||||
|
jsr ReadNib
|
||||||
|
tax
|
||||||
|
lda $BA00,x
|
||||||
|
rts
|
||||||
|
|
||||||
;-------------------------------
|
;-------------------------------
|
||||||
; Read4x4
|
; Read4x4
|
||||||
; read a 4-4-encoded value from S6,D1
|
; read a 4-4-encoded value from S6,D1
|
||||||
|
@ -50,7 +50,7 @@ for /f "tokens=4,* delims=:(" %%q in ('find "mliparam=" ..\build\out.txt') do ec
|
|||||||
for /f "tokens=4,* delims=:(" %%q in ('find "OpenFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
for /f "tokens=4,* delims=:(" %%q in ('find "OpenFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||||
for /f "tokens=4,* delims=:(" %%q in ('find "ReadFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
for /f "tokens=4,* delims=:(" %%q in ('find "ReadFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||||
for /f "tokens=4,* delims=:(" %%q in ('find "CloseFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
for /f "tokens=4,* delims=:(" %%q in ('find "CloseFile=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||||
for /f "tokens=4,* delims=:(" %%q in ('find "CheckCache=" ..\build\out.txt') do echo %%q > ..\build\vars.a
|
for /f "tokens=4,* delims=:(" %%q in ('find "CheckCache=" ..\build\out.txt') do echo %%q >> ..\build\vars.a
|
||||||
cd ..\build
|
cd ..\build
|
||||||
%EXOMIZER% raw -q -P23 -T4 -b passport.tmp -o passport.pak
|
%EXOMIZER% raw -q -P23 -T4 -b passport.tmp -o passport.pak
|
||||||
cd ..\src
|
cd ..\src
|
||||||
|
Loading…
x
Reference in New Issue
Block a user