shave some bytes by refactoring PrintByID

This commit is contained in:
4am 2021-06-12 22:07:26 -04:00
parent 154aea3cd9
commit c6df2ec549
97 changed files with 256 additions and 316 deletions

View File

@ -2,8 +2,8 @@ ADStyle
; We are now fairly confident that the RWTS in memory
; is normal enough to call, Advanced Demuffin style.
jsr IncProgress
lda #s_diskrwts
jsr PrintByID
!byte s_diskrwts
;
; Check for protections in early boot that
; might indicate intentional bad sectors
@ -15,27 +15,27 @@ ADStyle
bcs +
lda #$05
sta gDisplayBytes
lda #s_lockitup
jsr PrintByID
!byte s_lockitup
+
jsr xSunburst
bcs +
lda #$04
sta gDisplayBytes
lda #s_sunburst
jsr PrintByID
!byte s_sunburst
+
jsr xOptimumRes
bcs +
lda #TRUE
sta gIsOptimum
lda #s_optimum
jsr PrintByID
!byte s_optimum
+
jsr xSVE
bcs +
lda #s_sve
jsr PrintByID
!byte s_sve
lda #$CA
sta $BE5B
lda #$B6
@ -52,8 +52,8 @@ ADStyle
bcs +
lda #$01
sta gDisplayBytes
lda #s_rps
jsr PrintByID
!byte s_rps
+
jsr xB660
jsr xB4BB

View File

@ -108,8 +108,8 @@ checksector
jmp FatalError ; decided the read error is fatal
.optional
lda #s_optbad ; say we're skipping this
jsr PrintByID ; optional sector
jsr PrintByID ; say we're skipping this optional sector
!byte s_optbad
; /!\ execution falls through here
nextsector
@ -150,10 +150,10 @@ Pass
; we've written the entire cracked disk as a file on the RAM disk,
; now a second pass to write that file out to the target disk drive
lda #s_writingto
jsr PrintByID
lda #s_slotanddrive
!byte s_writingto
jsr PrintByID
!byte s_slotanddrive
jsr SwapProDOS ; ProDOS out -> in
jsr WriteRAMToDisk
; C=1 if error, and A=MLI error code
@ -173,17 +173,19 @@ Pass
!byte $2C
@passVerify
lda #s_pass ; 'verification complete'
sta +
jsr PrintByID
+ !byte $FD ; SMC
jmp TheEnd
Cancel
lda #s_canceled
jsr PrintByID
!byte s_canceled
jmp TheEnd
FatalError
lda #s_fail
jsr PrintByID
!byte s_fail
lda gTrack
cmp #$22
bne @TheEnd
@ -195,6 +197,6 @@ FatalError
cmp #$0C
bne @TheEnd
@failont22s0f
lda #s_fatal220f
jsr PrintByID
!byte s_fatal220f
@TheEnd jmp TheEnd

View File

@ -44,8 +44,8 @@ foundadvent
; original disk.
;
!zone {
lda #s_advent
jsr PrintByID
!byte s_advent
jsr CopyUniversal
;hook read address prologue

View File

@ -102,10 +102,10 @@ VerifyInfocom18
bit gMode ; verify-mode already?
bpl + ; yes, continue
lda #%00000000 ;
lda #%00000000
sta gMode ; no, switch to verify-mode
lda #s_toverify
jsr PrintByID ; and say so
!byte s_toverify
+ clc ; all clear
lda $C0E8

View File

@ -25,8 +25,8 @@ IDDavidson
sta $B92E
bcs .exit ; passport-test-suite/Word Attack Plus Spanish.woz [C=0] matches
; if the read didn't work, give up
lda #s_davidson
jsr PrintByID
!byte s_davidson
lda #TRUE
sta gIsDavidson
clc

View File

@ -48,8 +48,8 @@ foundea
; original disk.
;
!zone {
lda #s_eab0
jsr PrintByID
!byte s_eab0
jsr CopyUniversal
; mark track $22 as "optional" in sector map

View File

@ -50,7 +50,9 @@ IDBootloader
lda #s_13sector
.printinfo
sta +
jsr PrintByID
+ !byte $FD ; SMC
jmp UseUniversal
.sanity
@ -96,7 +98,9 @@ IDBootloader
lda #s_dosb0
.printdos
sta +
jsr PrintByID
+ !byte $FD ; SMC
jmp TraceDOS33
;
; Try to identify a variant bootloader that calls to $08B3
@ -106,8 +110,8 @@ IDBootloader
.notdos33
jsr ID8b3
bcs +
lda #s_jsr8b3
jsr PrintByID
!byte s_jsr8b3
lda #TRUE
sta gIs8b3
jmp Trace8B3
@ -119,8 +123,8 @@ IDBootloader
bcs .notmecc
lda #ID_MECC_UNK
sta gMECCFastloadType
lda #s_mecc
jsr PrintByID
!byte s_mecc
jsr PrereadT00
bcs .notmecc
jsr IDMECC1
@ -150,8 +154,8 @@ IDBootloader
;
jsr IDSpecDel
bcs +
lda #s_specdel
jsr PrintByID
!byte s_specdel
jmp TraceSpecDel
;
; Try to identify Laureate Learning Systems bootloader.
@ -159,8 +163,8 @@ IDBootloader
;
+ jsr IDLaureate
bcs +
lda #s_laureate
jsr PrintByID
!byte s_laureate
lda #TRUE
sta gIsLaureate
lda #$0B
@ -188,13 +192,13 @@ IDBootloader
;
+ jsr IDDOS32
bcs +
lda #s_dos32b0
jsr PrintByID
!byte s_dos32b0
jmp TraceDOS32
+ jsr IDDOS32LO
bcs +
lda #s_dos32b0
jsr PrintByID
!byte s_dos32b0
jmp TraceDOS32LO
;
; Try to detect whether there is code in the boot sector
@ -203,8 +207,8 @@ IDBootloader
;
+ jsr IDEncoded44
bcs +
lda #s_encoded44
jsr PrintByID
!byte s_encoded44
jmp TheEnd
;
; Try to detect whether there is code in the boot sector
@ -216,16 +220,16 @@ IDBootloader
;
+ jsr IDEncoded53
bcs +
lda #s_encoded53
jsr PrintByID
!byte s_encoded53
jmp TheEnd
;
; ProDOS (all versions)
;
+ jsr IDProDOS
bcs +
lda #s_prodosb0
jsr PrintByID
!byte s_prodosb0
lda #TRUE
sta gIsProDOS
jsr IDVolumeName
@ -239,8 +243,8 @@ IDBootloader
bcs +
lda #$0B
sta gDisplayBytes
lda #s_dinkeydos
jsr PrintByID
!byte s_dinkeydos
lda #TRUE
sta gIsDinkeyDOS
;
@ -248,8 +252,8 @@ IDBootloader
;
+ jsr IDPascal
bcs +
lda #s_pascalb0
jsr PrintByID
!byte s_pascalb0
lda #TRUE
sta gIsPascal
jsr IDVolumeName
@ -258,8 +262,8 @@ IDBootloader
;
+ jsr IDDavid
bcs +
lda #s_daviddos
jsr PrintByID
!byte s_daviddos
lda #TRUE
sta gIsDavidDOS
;
@ -267,8 +271,8 @@ IDBootloader
;
+ jsr IDDatasoft
bcs +
lda #s_datasoftb0
jsr PrintByID
!byte s_datasoftb0
lda #TRUE
sta gIsDatasoft
;
@ -276,8 +280,8 @@ IDBootloader
;
+ jsr IDTSR
bcs +
lda #s_tsr
jsr PrintByID
!byte s_tsr
lda #TRUE
sta gIsTSR
;
@ -286,24 +290,24 @@ IDBootloader
;
+ jsr IDMicrograms
bcs +
lda #s_micrograms
jsr PrintByID
!byte s_micrograms
;
; Quick-DOS
; (just for display)
;
+ jsr IDQuickDOS
bcs +
lda #s_quickdos
jsr PrintByID
!byte s_quickdos
;
; RDOS
; (just for display)
;
+ jsr IDRDOS
bcs +
lda #s_rdos
jsr PrintByID
!byte s_rdos
;
; Dav Holle encrypted bootloader
@ -311,8 +315,8 @@ IDBootloader
;
+ jsr IDHolle
bcs +
lda #s_holle
jsr PrintByID
!byte s_holle
lda #TRUE
sta gIsHolle
;
@ -320,8 +324,8 @@ IDBootloader
;
+ jsr ID555
bcs +
lda #s_555
jsr PrintByID
!byte s_555
jmp Do555
+ jmp UseUniversal

View File

@ -42,9 +42,9 @@ PanglosDOS
bcc + ; passport-test-suite/Stepwise Multiple Regression.woz [C=0] matches
.jmpexit1
jmp .exit
+ lda #s_gathering
+
jsr PrintByID
!byte s_gathering
;$230 (560) bytes for address keys
;$230 (560) bytes for data keys

View File

@ -21,8 +21,8 @@ ProtectedDOS
lda $B706 ; decryption key
sta .key+1
sta gDisplayBytes+1
lda #s_protdos
jsr PrintByID
!byte s_protdos
;
; decrypt RWTS in memory

View File

@ -23,13 +23,13 @@ Trace
ldy $B6FB
cpy #$4C
bne ++
+ sta $B6FA,x ; hi byte of callback
+ sta $B6FA,x ; hi byte of callback
pla
sta $B6F9,x ; lo byte of callback
sta $B6F9,x ; lo byte of callback
jmp $B600
++ pla
lda #s_canttrace ; unknown disk controller
jsr PrintByID
jsr PrintByID ; unknown disk controller
!byte s_canttrace
jmp UseUniversal
}

View File

@ -200,10 +200,10 @@ TraceDOS32LO
!byte $A9,$EA ;LDA #$EA
!byte $20,$26,$03 ;JSR $0326
bcs .fail ; passport-test-suite/Eggs-It.woz [C=0] matches
lda #s_choplifter
jsr PrintByID
lda #s_diskrwts
!byte s_choplifter
jsr PrintByID
!byte s_diskrwts
jmp Choplifter
; something did not match, not comfortable tracing,
@ -221,8 +221,8 @@ TraceDOS32LO
bcs .fail
lda #TRUE
sta gIsRDOS13
lda #s_rdos13
jsr PrintByID
!byte s_rdos13
lda #<.RDOS13Hook
sta jCallRWTS+1
@ -323,8 +323,8 @@ TraceDOS32d
bcs + ; passport-test-suite/Robotwar.woz [C=0] matches
lda #$08
sta gDisplayBytes
lda #s_muse
jsr PrintByID
!byte s_muse
; read the rest of the disk with the original RWTS
+

View File

@ -171,8 +171,8 @@ _Inspect1a
bcs .x6b
lda #$0A
sta gDisplayBytes
lda #s_milliken
jsr PrintByID
!byte s_milliken
lda #kSectorOptional
sta T02S05
;

View File

@ -171,8 +171,8 @@ SDsuccess
bit gMode ; don't say we're writing a bootloader in verify-only mode,
bpl + ; that's scary
lda #s_bootwrite
jsr PrintByID
!byte s_bootwrite
+
; now manually write out track 0 with Standard Delivery
; bootloader

View File

@ -59,8 +59,8 @@ IDVolumeName
.print
; X (now the volume name length) is preserved by the PrintByID call
lda #s_volumename
jsr PrintByID
!byte s_volumename
; print the volume name
.offset ldy #$d1 ; set at runtime

View File

@ -6,8 +6,8 @@ WaitForKey
cmp #"*"
bne +
jsr TEXT
lda #s_reset
jsr PrintByID
!byte s_reset
jmp $FF59
+ cmp #$E1
bcc +

View File

@ -39,17 +39,17 @@ modify
pha
sty modtmp
bit gMode
bpl @exitnomod ; verify mode -> no modify
lda #s_modify
bpl @exitnomod ; verify mode -> no modify
jsr PrintByID
!byte s_modify
ldy #0
- lda (moddest), y
jsr PrintByte
iny
cpy modtmp
bne -
lda #s_modifyto
jsr PrintByID
!byte s_modifyto
ldy #0
- iny
lda (modsrc), y

View File

@ -47,10 +47,10 @@ MainMenu
txs
jsr Cleanup ; RAM/HD files might be left open after Ctrl-Reset
jsr ClearScreen
lda #s_header
jsr PrintByID
lda #s_mainmenu
!byte s_header
jsr PrintByID
!byte s_mainmenu
bit gTargetType
bmi @usingHardDisk
bvs @usingCFFA
@ -61,7 +61,9 @@ MainMenu
!byte $2C
@usingHardDisk
lda #s_targetfile
sta +
jsr PrintByID
+ !byte $FD ; SMC
@getkey
jsr WaitForKey
cmp #$80
@ -144,8 +146,8 @@ Reaction
sta RAMDiskImagePath ; this is not fatal, but we'll mark the RAM
; disk as unavailable so we don't bother with it
@printReading
lda #s_reading
jsr PrintByID
!byte s_reading
lda #$B2
ldx #$00
ldy #$0D
@ -156,14 +158,14 @@ Reaction
bcc @idBootloader
jsr IDBootFailure ; /src/id/bootfailure
bcc @idBootloader
lda #s_fatal0000
jsr PrintByID
!byte s_fatal0000
; /!\ execution falls through here
TheEnd
jsr Cleanup
lda #s_done
jsr PrintByID
!byte s_done
jsr WaitForKey
cmp #$9B
beq CleanExit
@ -180,8 +182,8 @@ HandleRedoWithIgnore
HandleRedo
jsr ShowInitialProgressScreen
lda #s_reading
jsr PrintByID
!byte s_reading
; /!\ execution falls through here
;-------------------------------
@ -194,8 +196,8 @@ HandleRedo
; Exits via ReadWithRWTS
;-------------------------------
RestartScan
lda #s_restart
jsr PrintByID
!byte s_restart
jsr RestartProgress
jsr IncProgress
ldx #$FF
@ -414,6 +416,7 @@ _byte_skip_hi:
!source "id/holle.a"
!source "id/phoenix.a"
!source "id/555.a"
!source "id/bootfailure.a"
!source "print.a"
!source "compare.a"
!source "modify.a"
@ -433,7 +436,6 @@ _byte_skip_hi:
!source "adstyle.a"
!source "universalstyle.a"
!source "crackme.a"
!source "id/bootfailure.a"
AnalyzeT00 ; placeholder to identify stack of packed data
!bin "../build/t00only.pak"

View File

@ -17,11 +17,9 @@
!byte $C9,$A5 ; CMP #$A5
bcs .exit ; passport-test-suite/Game Frame One.woz [C=0] matches
sta gDisplayBytes
pha
jsr inx8
lda #s_a5count
jsr PrintByID
pla
!byte s_a5count
ldy #$02
jsr modify
!byte $D0,$7B ; BNE +$7B

View File

@ -32,10 +32,8 @@
!byte $A9
bcs .exit
sta gDisplayBytes
pha
lda #s_a6bc95
jsr PrintByID
pla
!byte s_a6bc95
ldy #$01
jsr modify
!byte $60 ; RTS

View File

@ -20,8 +20,8 @@
!byte $00 ; BRK
!byte $6C,$B9,$00; JMP ($00B9)
bcs + ; passport-test-suite/Moebius.woz [C=0] matches
lda #s_aacount
jsr PrintByID
!byte s_aacount
lda gDisplayBytes
ldy #$01
jsr modify

View File

@ -26,10 +26,8 @@
!byte $D9,$32 ;BPL -$FB
bcs .exit ; passport-test-suite/S.A.G.A. 6.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_advint
jsr PrintByID
pla
!byte s_advint
ldy #$03
jsr modify
!byte $D1 ;CLC

View File

@ -28,10 +28,8 @@
@searchend
bcs .exit ; passport-test-suite/Photar.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_bytrack
jsr PrintByID
pla
!byte s_bytrack
ldy #$01
jsr modify
!byte $60

View File

@ -29,9 +29,8 @@
!byte $C9,$D5 ; CMP #$D5
!byte $F0,$12 ; BEQ +$12
bcs .exit ; passport-test-suite/Beginning Map and Geography Skills.woz [C=0] matches
lda #s_d5timing
jsr PrintByID
lda #$03
!byte s_d5timing
ldx #$58
ldy #$02
jsr modify ; then set T00,S03,$58 =

View File

@ -36,8 +36,8 @@
!byte $4E,$06,$BB
bcs .no
sta gDisplayBytes
lda #s_bb03
jsr PrintByID
!byte s_bb03
lda gIsDavidDOS
beq .variant2
lda #$01

View File

@ -32,10 +32,8 @@
!byte $BD,$89,$C0
bcs .exit ; passport-test-suite/Odd One Out 1990.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_bbf9
jsr PrintByID
pla
!byte s_bbf9
ldy #$02
jsr modify
!byte $18,$60

View File

@ -18,10 +18,8 @@
!byte $8D,$18,$18
bcs .exit ; passport-test-suite/Elementary Vol. 2 v3.2 limited backup.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_bootcounter
jsr PrintByID
pla
!byte s_bootcounter
ldy #$03
jsr modify ; then set T01,S00,$00 =
!byte $4C,$03,$1B

View File

@ -22,10 +22,8 @@
!byte $EA ; NOP
bcs .exit
sta gDisplayBytes
pha
lda #s_bytrack
jsr PrintByID
pla
!byte s_bytrack
ldy #$0A
jsr modify ; then set T00,S08,$5A =
!byte $48 ; PHA

View File

@ -103,8 +103,8 @@ Choplifter
iny
bne -
lda #s_bootwrite
jsr PrintByID
!byte s_bootwrite
lda #$00
sta gTrack
jsr WriteTrackNA

View File

@ -42,8 +42,8 @@
!byte $85,$04 ; STA $04
!byte $20,$28,$40; JSR $4028
bcs .exit ; passport-test-suite/Squire.woz [C=0] matches
lda #s_corrupter
jsr PrintByID
!byte s_corrupter
lda #$0E
ldy #$01
jsr modify

View File

@ -51,10 +51,8 @@
!byte $6D ; ADC
bcs .exit ; passport-test-suite/RoboMath.woz [C=0] matches
sta gDisplayBytes ; passport-test-suite/Notecard Maker.woz [C=0] matches
pha
lda #s_d5d5f7
jsr PrintByID
pla
!byte s_d5d5f7
ldy #$01
jsr modify
!byte $60 ; RTS

View File

@ -34,11 +34,9 @@
jsr compare ; and T00,S03,$9A ==
JMP $B6B3
bcs .exit ; passport-test-suite/MIRV.woz [C=0] matches
pha
sta gDisplayBytes
lda #s_dakin5
jsr PrintByID
pla
!byte s_dakin5
ldy #$03
jsr modify ; then set T00,S03,$9A =
!byte $C9,$AA

View File

@ -12,10 +12,8 @@
!byte $5D,$D4,$80,$49,00,$19
bcs .exit ; passport-test-suite/Tomahawk.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_datasoft
jsr PrintByID
pla
!byte s_datasoft
ldy #$01
jsr modify
!byte $C0

View File

@ -21,10 +21,9 @@
!byte $AD,$E9,$C0
!byte $AD,$EE,$C0
bcs .exit ; passport-test-suite/Fathoms 40.woz [C=0] matches
sta gDisplayBytes
lda #s_datasoft
jsr PrintByID
!byte s_datasoft
lda #$01
ldx #$48
ldy #$02

View File

@ -26,10 +26,8 @@
!byte $20,$D2,$25; JSR $25D2
!byte $4C,$74,$08; JMP $0874
bcs + ; passport-test-suite/Word Attack Plus Spanish.woz [C=0] matches
pha
lda #s_badblock
jsr PrintByID
pla
!byte s_badblock
ldx #$04
ldy #$01
jsr modify

View File

@ -18,10 +18,8 @@
!byte $08,$80,$00,$FD,$1C,$D1,$0D,$EC
bcs .exit ; passport-test-suite/Read 'N Roll.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_badblock
jsr PrintByID
pla
!byte s_badblock
inx
ldy #$01
jsr modify

View File

@ -59,8 +59,8 @@
.veryyes
sta gDisplayBytes
lda #s_diskvol
jsr PrintByID ; preserves X
jsr PrintByID ; preserves registers
!byte s_diskvol
lda #$08
inx

View File

@ -25,8 +25,8 @@
lda #$38
sta $1656 ; #BASEPAGE+6
lda #s_rwtswrite
jsr PrintByID
!byte s_rwtswrite
; If original disk loads boot1 into $B700, Standard Delivery only needs to
; load boot1+RWTS (into $B700..$BFFF) and transfer control to boot1 at $B700.
@ -59,8 +59,8 @@
ldx #ID_DOS32
+ jsr ConstructStandardDelivery
lda #s_bootwrite
jsr PrintByID
!byte s_bootwrite
inc gPatchCount
.exit
}

View File

@ -37,10 +37,8 @@
;
bcs .exit ; passport-test-suite/Garfield Trivia Game.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_e7everywhere
jsr PrintByID
pla
!byte s_e7everywhere
ldy #$02
jsr modify
!byte $18,$60 ; CLC/RTS

View File

@ -121,8 +121,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #7
@ -153,8 +153,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #11
@ -175,8 +175,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #11
@ -197,8 +197,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
pla
jsr inx5
ldy #1
@ -213,10 +213,8 @@
!byte $F0,$03 ;BEQ +$03
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
jsr inx6
ldy #1
jsr modify
@ -229,10 +227,8 @@
!byte $D0,$DB ;BNE -$DB
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
jsr inx4
ldy #1
jsr modify
@ -369,10 +365,8 @@
!byte $48 ;PHA
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
inx
ldy #1
jsr modify
@ -390,8 +384,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #12
@ -415,8 +409,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #24
@ -505,10 +499,8 @@
!byte $5E,$0D
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
inx
inx
ldy #1
@ -548,8 +540,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #25

View File

@ -20,10 +20,8 @@ EARTHWARE
!byte $4C,$89,$B6
bcs @exit ; passport-test-suite/Zoo Master.woz [C=0] here
sta gDisplayBytes
pha
lda #s_bytrack
jsr PrintByID
pla
!byte s_bytrack
ldy #$03
jsr modify
!byte $BD,$8C,$C0

View File

@ -34,8 +34,8 @@ ERRORD51
pha
jsr inx6
stx @highBytePtr+1
lda #s_badblock
jsr PrintByID
!byte s_badblock
pla
tax
pla

View File

@ -103,10 +103,8 @@
!byte $BC,$8C,$C0
bcs .exit ; passport-test-suite/Maniac Mansion.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_fbff
jsr PrintByID
pla
!byte s_fbff
ldy #$05
jsr modify
!byte $A9,$FF

View File

@ -34,10 +34,8 @@
inx
inx
sta gDisplayBytes
pha
lda #s_fbff
jsr PrintByID
pla
!byte s_fbff
ldy #$01
jsr modify
!byte $A2 ; change encrypted BNE +4 to +5D so code exits with Death Counter > 0

View File

@ -34,8 +34,8 @@
.a lda $FDFD,y ; set at runtime
adc #$0A ; calculate new branch offset (note: carry still guaranteed to be clear here)
sta .branch ; store offset in patch bytes below
lda #s_fbff
jsr PrintByID
!byte s_fbff
lda gDisplayBytes
ldy #$03
jsr modify

View File

@ -18,10 +18,8 @@
!byte $39,$36
bcs .exit ; passport-test-suite/Essential Grammar.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_poke
jsr PrintByID
pla
!byte s_poke
ldy #$12
jsr modify
!byte $34,$34,$01,$30,$02,$31,$30,$03

View File

@ -37,10 +37,8 @@
bcs .exit ; passport-test-suite/Super Taxman II.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_hallabs
jsr PrintByID
pla
!byte s_hallabs
ldy #$01
jsr modify
RTS

View File

@ -26,8 +26,8 @@
sta gDisplayBytes+1
lda #$01
sta gDisplayBytes+2
lda #s_beforedos
jsr PrintByID
!byte s_beforedos
lda #$01
inx ; #$96 because both compare and PrintByID preserve X

View File

@ -32,8 +32,8 @@
LDA $C089,X
;
bcs .exit ; passport-test-suite/Good Thinking - Cause and Effect Level Two.woz [C=0] matches
lda #s_hoffman
jsr PrintByID
!byte s_hoffman
lda #$0C
ldy #$01
jsr modify ; then set T00,S0C,$00 =

View File

@ -130,8 +130,8 @@
sta .decrypt1_store+2
sta .decrypt2+2
lda #s_decryptrwts
jsr PrintByID
!byte s_decryptrwts
inc gPatchCount
lda #$4C
.decrypt1

View File

@ -28,8 +28,8 @@
sta gDisplayBytes ; address (hi)
lda #$12
sta gDisplayBytes+1 ; address (lo)
lda #s_beforedos
jsr PrintByID
!byte s_beforedos
lda #$00
ldx #$EC
ldy #$02

View File

@ -14,11 +14,10 @@
jsr compare ; and T00,S0D,$4D ==
!byte $4C,$8E,$AE
bcs .exit
lda #s_jmpae8e
jsr PrintByID
lda #$0D
inx
ldy #$02
!byte s_jmpae8e
inx ; X=#$4E
dey ; Y=#$01
jsr modify ; then set T00,S0D,$4E =
!byte $80,$A1
.exit

View File

@ -51,8 +51,8 @@
lda #$00
sta gDisplayBytes+1 ; address (lo)
tax
lda #s_beforedos
jsr PrintByID
!byte s_beforedos
lda #$03
tay
jsr modify ; then set T02,S03,$00 =

View File

@ -28,8 +28,8 @@
sta gDisplayBytes ; address (hi)
lda #$12
sta gDisplayBytes+1 ; address (lo)
lda #s_beforedos
jsr PrintByID
!byte s_beforedos
lda #$00
ldx #$F6
ldy #$02

View File

@ -59,14 +59,12 @@
!byte $AD,$FF,$CF; LDA $CFFF
bcs .exit ; passport-test-suite/Snooper Troops Case 2.woz [C=0] matches
.found
pha
lda #$B4
sta gDisplayBytes ; address (hi)
lda #$BB
sta gDisplayBytes+1 ; address (lo)
lda #s_beforedos
ldy #$B4
sty gDisplayBytes ; address (hi)
ldy #$BB
sty gDisplayBytes+1 ; address (lo)
jsr PrintByID
pla
!byte s_beforedos
inx
ldy #$03
jsr modify ; then set offset+1 to

View File

@ -22,8 +22,8 @@
sta gDisplayBytes ; address (hi)
lda #$00
sta gDisplayBytes+1 ; address (lo)
lda #s_beforedos
jsr PrintByID
!byte s_beforedos
lda #$0C
;X is preserved, still #$84
ldy #$03

View File

@ -28,9 +28,8 @@ _jmpb660
!byte $4C,$60,$B6
bcs .exit ; passport-test-suite/Analogies Tutorial.woz [C=0] matches
sta gDisplayBytes
lda #s_jmpb660
jsr PrintByID
lda #$02
!byte s_jmpb660
ldx #$F6
ldy #$03
jsr modify ; then set T00,S02,$F6 =

View File

@ -156,8 +156,8 @@ _jmpbbfe
sta $1560, y
dey
bpl -
lda #s_lockitupserial
jsr PrintByID
!byte s_lockitupserial
.exit
}

View File

@ -19,9 +19,8 @@ _jmpbcf0
!byte $4C,$F0,$BC
bcs .exit ; passport-test-suite/Easy as ABC.woz [C=0] matches
sta gDisplayBytes
lda #s_jmpbcf0
jsr PrintByID
lda #$03
!byte s_jmpbcf0
ldy #$08
jsr modify ; then set T00,S03,$94 =
!byte $EA

View File

@ -34,10 +34,9 @@
bcs .exit ; passport-test-suite/Library Magic.woz [C=0] matches
.yes
sta gDisplayBytes
lda #s_jmpbeca ; passport-test-suite/Spelling Rules.woz [C=0] also reaches here
sta gDisplayBytes ; passport-test-suite/Spelling Rules.woz [C=0] also reaches here
jsr PrintByID
lda #$02
!byte s_jmpbeca
ldy #$0D
jsr modify ; then set T00,S02,$F4 =
!byte $A0,$56

View File

@ -26,9 +26,8 @@
!byte $4E,$38,$86; LSR $8638
!byte $DD,$3B,$86
bcs + ; passport-test-suite/Moon Bingo.woz [C=0] matches
lda #s_d5d5f7
jsr PrintByID
lda gDisplayBytes
!byte s_d5d5f7
ldx #$04
ldy #$01
jsr modify

View File

@ -14,7 +14,7 @@
jsr compare
!byte $20,$CC,$B6
bcs .exit
lda #$00
txa
ldx #$CC
ldy #$08
jsr compare
@ -24,9 +24,8 @@
!byte $F0
bcs .exit
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$00
!byte s_bytrack
ldx #$D1
ldy #$01
jsr modify

View File

@ -21,14 +21,11 @@
!byte $60
bcs .exit ; passport-test-suite/Clue Master Detective.woz [C=0] matches
sta gDisplayBytes
pha
lda #$01
sta gDisplayBytes+1
lda #s_diskvol0x
jsr PrintByID
pla
jsr inx6
ldy #$01
sty gDisplayBytes+1
jsr PrintByID
!byte s_diskvol0x
jsr inx6
jsr modify
!byte $00
.exit

View File

@ -26,9 +26,8 @@
!byte $90
bcs .exit
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$08
!byte s_bytrack
ldx #$B8
ldy #$01
jsr modify

View File

@ -79,8 +79,8 @@
; last-mod date
!byte $02, $00 ; header pointer
bcs .noinfo
lda #s_idinfo
jsr PrintByID
!byte s_idinfo
ldy #$00
tya
.erase sta (BASEPAGE << 8) + $100, y

View File

@ -27,9 +27,8 @@
!byte $B5,$42 ; LDA $42,X
bcs .exit ; passport-test-suite/Rosie the Counting Rabbit.woz [C=0] matches
sta gDisplayBytes
lda #s_runhello
jsr PrintByID
lda gDisplayBytes
!byte s_runhello
inx
ldy #$06
jsr modify

View File

@ -33,9 +33,8 @@
!byte $4C,$5D,$3E; JMP $3E5D
bcs .exit
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$00
!byte s_bytrack
ldx #$BD
ldy #$01
jsr modify ; then set T00,S00,$BD =

View File

@ -21,10 +21,8 @@
!byte $BD,$8C,$C0; LDA $C08C,X
bcs .exit ; passport-test-suite/Miner 2049er.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_microfun
jsr PrintByID
pla
!byte s_microfun
ldy #$02
jsr modify
!byte $18 ; CLC

View File

@ -16,9 +16,8 @@
!byte $20,$B6,$B6
bcs .exit ; passport-test-suite/The Function Game.woz [C=0] matches
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$06
!byte s_bytrack
ldy #$01
jsr modify ; then set T00,S06,$F2 =
!byte $2C

View File

@ -76,8 +76,8 @@
!byte $D1
.badread
lda #s_optbad ; say read failure
jsr PrintByID
jsr PrintByID ; say read failure
!byte s_optbad
.jmpexit1
jmp .exit
@ -236,8 +236,8 @@
jmp .exit
.dotrack0
lda #s_construct
jsr PrintByID
!byte s_construct
lda .address+1
bmi .domerge
cmp #3

View File

@ -34,8 +34,8 @@
!byte $E9,$11 ; SBC #$11
!byte $85,$5D ; STA $5D
bcs + ; passport-test-suite/Ultima V.woz [C=0] matches
lda #s_origin
jsr PrintByID
!byte s_origin
inc gPatchCount
+ dec .sector+1
bpl .sector

View File

@ -23,10 +23,8 @@
!byte $4C,$E3,$93 ; JMP $93E3
bcs .exit ; passport-test-suite/Polywriter.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_pdi
jsr PrintByID
pla
!byte s_pdi
jsr inx0C
ldy #$02
jsr modify

View File

@ -27,10 +27,8 @@
inx
inx
sta gDisplayBytes
pha
lda #s_fbff
jsr PrintByID
pla
!byte s_fbff
ldy #$01
jsr modify
!byte $B2 ; change encrypted BNE +4 to +5D so code exits with Death Counter > 0
@ -46,11 +44,9 @@
!byte $AE ; LDX
bcs .exit ; passport-test-suite/The Crimson Crown.woz [C=0] matches
sta gDisplayBytes
pha
jsr inx9
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
ldy #$01
jsr modify
!byte $50 ; change BEQ to BVC which acts as a branch-always

View File

@ -21,8 +21,8 @@
!byte $4A
!byte $C9,$6A
bcs + ; passport-test-suite/Investigating Plant Growth.woz [C=0] matches
lda #s_lsr6a
jsr PrintByID
!byte s_lsr6a
inc gPatchCount
+
lda .sector+1
@ -34,8 +34,8 @@
!byte $BD,$8C,$C0
!byte $C9,$08
bcs .nextsector ; passport-test-suite/Investigating Plant Growth.woz [C=0] matches
lda #s_bcs08
jsr PrintByID
!byte s_bcs08
inc gPatchCount
.nextsector
dec .sector+1

View File

@ -84,8 +84,8 @@
iny
cpy #$03
bne .serialloop
lda #s_protserial
jsr PrintByID
!byte s_protserial
lda gTrack
beq .track0
@ -124,8 +124,8 @@
;
bit gMode
bpl +
lda #s_decryptrwts
jsr PrintByID
!byte s_decryptrwts
+ ldx #BASEPAGE
inx
stx .a+2

View File

@ -59,8 +59,8 @@
jsr modify
!byte $96
lda #s_rwtswrite
jsr PrintByID
!byte s_rwtswrite
lda #<((BASEPAGE * $100) + $6B9 - $16)
sta modsrc
lda #>((BASEPAGE * $100) + $6B9 - $16)
@ -88,8 +88,8 @@
ldx #ID_RDOS13
jsr ConstructStandardDelivery
lda #s_bootwrite
jsr PrintByID
!byte s_bootwrite
jmp .exit

View File

@ -31,10 +31,8 @@ _rol1e
!byte $A5,$1E
bcs .exit ; passport-test-suite/Crypto Cube.woz [C=0] matches
sta gDisplayBytes
lda #s_rol1e
jsr PrintByID
lda #$03
ldy #$02
!byte s_rol1e
jsr modify ; then set T00,S03,$64 =
!byte $A9,$F7
.exit

View File

@ -41,8 +41,8 @@
jsr -
bcs .endlsr ; passport-test-suite/GATO v1.3.woz [C=0] matches
.yeslsr
lda #s_lsr6a
jsr PrintByID
!byte s_lsr6a
inc gPatchCount
.endlsr
@ -85,8 +85,8 @@
!byte $B0
bcs .endbcs ; passport-test-suite/Roadwar 2000.woz [C=0] matches
.yesbcs
lda #s_bcs08
jsr PrintByID
!byte s_bcs08
inc gPatchCount
.endbcs
@ -116,8 +116,8 @@
!byte $D0,$00
bcs .endbne0 ; passport-test-suite/Horses.woz [C=0] matches
.yesbne0
lda #s_cmpbne0
jsr PrintByID
!byte s_cmpbne0
inc gPatchCount
.endbne0
@ -136,8 +136,8 @@
!byte $C9,$AA
!byte $EA,$EA
bcs .endnopnop ; passport-test-suite/La Guillotine.woz [C=0] matches
lda #s_cmpnopnop
jsr PrintByID
!byte s_cmpnopnop
inc gPatchCount
.endnopnop
.exit

View File

@ -88,10 +88,8 @@
!byte $B0 ;BCS *+xx
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
inx
inx
inx
@ -290,10 +288,8 @@
jsr inx4
bcs ++
+ sta gDisplayBytes
pha
lda #s_sierra
jsr PrintByID
pla
!byte s_sierra
ldy #$01
jsr modify
.patchstyle
@ -313,8 +309,8 @@
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
!byte s_tamper
txa
clc
adc #5
@ -337,10 +333,8 @@
!byte $D0,$30 ;BNE *+$32
bcs +
sta gDisplayBytes
pha
lda #s_tamper
jsr PrintByID
pla
!byte s_tamper
ldy #$01
jsr modify
!byte $60 ;just return
@ -600,8 +594,8 @@
sta gDisplayBytes
bit gMode ; don't print anything in verify mode
bpl +
lda #s_sierra
jsr PrintByID
!byte s_sierra
+
.page9
lda $D103,x

View File

@ -142,10 +142,8 @@
!byte $A9,$20 ;LDA #$20
!byte $85,$02 ;STA $02
bcs +
pha
lda #s_sierra
jsr PrintByID
pla
!byte s_sierra
inx
inx
inx ;patch the second JSR
@ -175,10 +173,8 @@
clc
+ sta .adjust+1
adc #BASEPAGE
pha
lda #s_sierra
jsr PrintByID
pla
!byte s_sierra
ldy #8
jsr SearchSector
!byte $85,WILDCARD ;encoded BNE *+xx

View File

@ -14,7 +14,6 @@
lda gIsRWTS ; if DOS 3.3 RWTS
bne .exit
lda #$03
sta gDisplayBytes
ldx #$92
ldy #$07
jsr compare ; and T00,S03,$92 ==
@ -22,9 +21,9 @@
CMP $C08C,X
!byte $D0,$A9 ; BNE $B942
bcs .exit ; passport-test-suite/Easy as ABC.woz [C=0] matches
lda #s_springboard
sta gDisplayBytes
jsr PrintByID
lda #$03
!byte s_springboard
ldx #$98
ldy #$01
jsr modify ; then set T00,S03,$98 =

View File

@ -29,9 +29,8 @@
!byte $8D,$6C,$7A ; STA $7A6C
!byte $AD,$B1,$78 ; LDA $78B1
bcs .nextsector ; passport-test-suite/Computer Drill and Instruction - Multiplication B.woz [C=0] matches
lda #s_sra
jsr PrintByID
lda .sector+1
!byte s_sra
inx
ldy #$02
jsr modify

View File

@ -22,10 +22,8 @@
bcs + ; passport-test-suite/Epidemic.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_ssi
jsr PrintByID
pla
!byte s_ssi
ldy #$01
jsr modify
!byte $A9 ; LDA #$..

View File

@ -24,9 +24,8 @@
@end_swordthrust
bcs .exit ; passport-test-suite/Swordthrust 1 The King's Testing Ground.woz [C=0] matches
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
lda #$01
!byte s_bytrack
ldx #$81
tay
jsr modify

View File

@ -21,10 +21,10 @@
+ sta gDisplayBytes
adc #BASEPAGE ; carry is guaranteed to be clear here
sta .a+2
lda #s_volumename
jsr PrintByID
!byte s_volumename
ldy #$0B
.a lda $d1AF,Y ; high byte set at runtime (low byte is constant)
.a lda $d1AF,Y ; high byte set at runtime (low byte is constant)
ora #$80
jsr PrintA
dey

View File

@ -27,10 +27,8 @@
!byte $AD,$83,$C0; LDA $C083
bcs .exit ; passport-test-suite/Rendezvous with Rama rev. 2.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_trillium
jsr PrintByID
pla
!byte s_trillium
ldy #$01
jsr modify
!byte $2C ; BIT

View File

@ -19,10 +19,8 @@
!byte $C9,$00
bcs .exit ; passport-test-suite/Nine Princes in Amber.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_trillium
jsr PrintByID
pla
!byte s_trillium
inx
inx
inx

View File

@ -26,10 +26,9 @@
bcs .exit ; passport-test-suite/Dawn Patrol.woz [C=0] here
sta gDisplayBytes
lda #s_bytrack
jsr PrintByID
!byte s_bytrack
lda #$0B
ldx #$A2
ldy #$01
jsr modify ; then set T04,S0B,$A2 =

View File

@ -22,11 +22,9 @@ universale7
lda .sector+2 ; passport-test-suite/Rocky's Boots.woz [C=1] reaches here
and #$0F
pha
sta gDisplayBytes
lda #s_e7
jsr PrintByID
pla
!byte s_e7
ldx #$A3
ldy #$0C
jsr modify

View File

@ -24,10 +24,8 @@
!byte $A9,$00
bcs .exit ; passport-test-suite/PlayWriter.woz [C=0] matches
sta gDisplayBytes
pha
lda #s_badblock
jsr PrintByID
pla
!byte s_badblock
jsr inx4
ldy #$02
jsr modify

View File

@ -15,14 +15,12 @@
!byte $32,$30,$35,$38
bcs .exit ; passport-test-suite/Zoom Grafix 26-JAN-82.woz [C=0] matches
sta gDisplayBytes
pha
lda #$00
sta gDisplayBytes+1
lda #s_diskvol0x
ldy #$00
sty gDisplayBytes+1
jsr PrintByID
!byte s_diskvol0x
jsr inx0B
pla
ldy #$01
iny
jsr modify
!byte $35 ; 'LM = PEEK(KB - 2055)' instead
.exit

View File

@ -3,26 +3,47 @@ kForceLower !byte $FF ; AND mask for lowercase letters
;-------------------------------
; PrintByID
; Print a string from the string table;
; handles string substitutions and
; Print a string from the string table
; Handles string substitutions and
; auto-uppercases on older machines
; in: A = string ID
; out: X register preserved, others clobbered
; all flags clobbered
; in: string ID (byte) on stack
; out: all registers preserved
; all flags clobbered
; stack set to after params
;-------------------------------
PrintByID
stx .x+1
ldy #0 ; substitution mode flag
sta @tmpa+1
sty @tmpy+1
pla
sta $00
clc
adc #$01
tay
pla
sta $01
adc #$00
pha
tya
pha
@tmpa lda #$FD ; SMC
pha
@tmpy lda #$FD ; SMC
pha
txa
pha
ldy #1
lda ($00), y ; get ID of string to print
tax
lda StringTableLow,x
lda StringTableLow, x
sta @print+1
lda StringTableHigh,x
lda StringTableHigh, x
sta @print+2
dey ; Y=0
@print
lda $FFFF ; modified at runtime
beq .done
cpy #0 ; are we in substitution mode or include mdoe?
bmi .include ; yes, include mode
beq @done
cpy #0 ; are we in substitution mode or include mode?
bmi @include ; yes, include mode
beq @nosub ; no -> branch
ldy #0
cmp #"t" ; "%t" = current track
@ -46,7 +67,7 @@ PrintByID
@printsd
ora #$80
jsr PrintA
bvc .next ; unconditional branch
bvc @next ; unconditional branch
@sub4
cmp #"0" ; "%0" through "%9"
bcc @nosub
@ -55,48 +76,51 @@ PrintByID
sec
sbc #"0"
tax
lda gDisplayBytes,x
lda gDisplayBytes, x
@printbyte
jsr PrintByte
bvc .next ; unconditional branch
bvc @next ; unconditional branch
@nosub
cmp #"%"
bne .stillnosub
bne @stillnosub
iny ; Y=#$01 (substitution mode, next character will be interpreted)
bne .next ; unconditional branch
.stillnosub
bne @next ; unconditional branch
@stillnosub
cmp #"@"
bne +
dey ; Y=#$FF (include mode, next character will be interpreted)
bne .next ; unconditional branch
bne @next ; unconditional branch
+ cmp #$E1
bcc @noforce
and kForceLower
@noforce
jsr COUT
.next
@next
inc @print+1
bne @print
inc @print+2
bne @print ; unconditional branch
.done
.x ldx #$FD ; SMC
@done
pla
tax
pla
tay
pla
rts
.include
sta .a+1
@include
sta @id
lda @print+1
pha
lda @print+2
pha
ldx .x+1
.a lda #$FD ; SMC
jsr PrintByID
@id !byte $FD ; SMC
pla
sta @print+2
pla
sta @print+1
ldy #0
beq .next ; unconditional branch
beq @next ; unconditional branch
;-------------------------------
; PrintByte

View File

@ -9,10 +9,10 @@
;-------------------------------
ShowInitialProgressScreen
jsr ClearScreen
lda #s_header
jsr PrintByID
lda #s_progbar
!byte s_header
jsr PrintByID
!byte s_progbar
lda VPOS
sta TEXTTOP
bne ResetProgress ; always branches
@ -22,8 +22,8 @@ RestartProgress
pha
lda #1
sta VPOS
lda #s_progbar
jsr PrintByID
!byte s_progbar
pla
sta VPOS
jsr $FC22

View File

@ -180,8 +180,8 @@ WriteTrackNA ; entry point used by Special Delivery trac
; we haven't yet printed any 'writing to...' message in the log, so
; figure out what that should look like and do it now
lda #s_writingto
jsr PrintByID
!byte s_writingto
lda gHardDiskRef
beq @maybeWritingToRAMDisk
@ -197,7 +197,9 @@ WriteTrackNA ; entry point used by Special Delivery trac
!byte $2C
@notWritingToRAMDisk
lda #s_slotanddrive ; writing to a slot and drive
sta +
jsr PrintByID
+ !byte $FD ; SMC
@doneSaidWriting
lda #TRUE
@ -228,9 +230,9 @@ FatalWriteError
cpx #MLI_WRITEPROT
beq @print
lda #s_othermli
@print pha
lda #s_writeerr
@print sta +
jsr PrintByID
pla
!byte s_writeerr
jsr PrintByID
+ !byte $FD ; SMC
jmp TheEnd

View File

@ -343,7 +343,7 @@ StringTableHigh
.passport
!text "Passport ",$00
.header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-11",$00
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-12",$00
.bar9
!text "_________",$00
.bar18
@ -561,7 +561,7 @@ StringTableHigh
.jmpae8e
!text "T00,S0D Disk calls a @",s_protectioncheck," at"
!text "$AE8E after initializing DOS",$8D,$00
.diskvol
.diskvol
!text "@",s_rwts,"requires a non-standard",$8D
!text "disk volume number",$8D,$00
.d5d5f7

View File

@ -67,7 +67,9 @@ SwitchToUniv
StartWithUniv
lda #s_builtin
sta +
jsr PrintByID
+ !byte $FD ; SMC
lda #TRUE
sta gTriedUniv
lda #FALSE

View File

@ -41,8 +41,9 @@ SkipTrack
; if we're in 'crack' mode, restart the scan to find the protection code
jmp SetupF7F6SecondRound
@print
@print sta +
jsr PrintByID
+ !byte $FD ; SMC
;
; Skipping T22 on a ProDOS disk might indicate the presence of a
; Gamco Industries protection elsewhere on the disk. Different
@ -129,8 +130,8 @@ SetupF7F6SecondRound
+ dec @a+1
dey
bpl @a
lda #s_f7 ; print that we found the protection track
jsr PrintByID
jsr PrintByID ; print that we found the protection track
!byte s_f7
lda #TRUE
sta gIsF7F6 ; set global to activate expensive patcher
jmp RestartScan

View File

@ -41,8 +41,8 @@ OneTimeSetup
jsr ScanForDiskII ; scan slots for Disk II drives
lda DiskIIArray+5
bne +
lda #s_noslot6 ; no Disk II in slot 6, this is fatal
jsr PrintByID
jsr PrintByID ; no Disk II in slot 6, this is fatal
!byte s_noslot6
jsr WaitForKey
jmp CleanExit
+