diff --git a/src/compare.a b/src/compare.a index bf63c95..7af1c6b 100755 --- a/src/compare.a +++ b/src/compare.a @@ -12,7 +12,7 @@ WILDCARD = $97 ; out: C clear if string found ; or set if not found ; If C is clear, then -; A = sector where string was found +; A = @gDisplayBytes = sector where string was found ; X = starting offset where string was found ; all other registers and flags clobbered ;------------------------------- @@ -151,6 +151,7 @@ match_size2 sec sbc #BASEPAGE clc + sta gDisplayBytes rts ; cold path diff --git a/src/crackme.a b/src/crackme.a index 83dc2c9..787693d 100644 --- a/src/crackme.a +++ b/src/crackme.a @@ -154,9 +154,8 @@ Pass !byte s_writingto jsr PrintByID !byte s_slotanddrive - jsr SwapProDOS ; ProDOS out -> in - jsr WriteRAMToDisk - ; C=1 if error, and A=MLI error code + jsr SwapProDOS ; ProDOS out -> in (preserves registers+flags) + jsr WriteRAMToDisk ; C=1 if error, and A=MLI error code jsr SwapProDOS ; ProDOS in -> out (preserves registers+flags) bit KEY ; preserves C bmi Cancel @@ -176,27 +175,27 @@ Pass sta + jsr PrintByID + !byte $FD ; SMC - jmp TheEnd + bvc .TheEnd ; always branches Cancel jsr PrintByID !byte s_canceled - jmp TheEnd + bvc .TheEnd ; always branches FatalError jsr PrintByID !byte s_fail lda gTrack cmp #$22 - bne @TheEnd + bne .TheEnd lda gSector cmp #$0F beq @failont22s0f ldx gIsDOS32 - bne @TheEnd + bne .TheEnd cmp #$0C - bne @TheEnd + bne .TheEnd @failont22s0f jsr PrintByID !byte s_fatal220f -@TheEnd jmp TheEnd +.TheEnd jmp TheEnd diff --git a/src/patchers/a5count.a b/src/patchers/a5count.a index ca47c4a..57b77a9 100644 --- a/src/patchers/a5count.a +++ b/src/patchers/a5count.a @@ -16,7 +16,6 @@ !byte $4C,$A5,$00; JMP $00A5 !byte $C9,$A5 ; CMP #$A5 bcs .exit ; passport-test-suite/Game Frame One.woz [C=0] matches - sta gDisplayBytes jsr inx8 jsr PrintByID !byte s_a5count diff --git a/src/patchers/a6bc95.a b/src/patchers/a6bc95.a index 74eb75b..021366c 100755 --- a/src/patchers/a6bc95.a +++ b/src/patchers/a6bc95.a @@ -31,7 +31,6 @@ !byte $AE,$F8,$01; LDX $01F8 !byte $A9 bcs .exit - sta gDisplayBytes jsr PrintByID !byte s_a6bc95 ldy #$01 diff --git a/src/patchers/advint.a b/src/patchers/advint.a index f7cc391..96fa0ea 100644 --- a/src/patchers/advint.a +++ b/src/patchers/advint.a @@ -25,7 +25,6 @@ !byte $74,$45,$09 ;LDA $C08C,X !byte $D9,$32 ;BPL -$FB bcs .exit ; passport-test-suite/S.A.G.A. 6.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_advint ldy #$03 diff --git a/src/patchers/artsci.a b/src/patchers/artsci.a index ccb66d0..49d23ac 100644 --- a/src/patchers/artsci.a +++ b/src/patchers/artsci.a @@ -27,7 +27,6 @@ STA ($3C),Y @searchend bcs .exit ; passport-test-suite/Photar.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_bytrack ldy #$01 diff --git a/src/patchers/bbf9.a b/src/patchers/bbf9.a index 2ad9dec..e67e76e 100644 --- a/src/patchers/bbf9.a +++ b/src/patchers/bbf9.a @@ -31,7 +31,6 @@ !byte $A6,WILDCARD !byte $BD,$89,$C0 bcs .exit ; passport-test-suite/Odd One Out 1990.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_bbf9 ldy #$02 diff --git a/src/patchers/c9ff.a b/src/patchers/c9ff.a index 353f9bb..9a26bf2 100644 --- a/src/patchers/c9ff.a +++ b/src/patchers/c9ff.a @@ -31,7 +31,6 @@ !byte $38 ; SEC !byte $60 ; RTS bcs .exit ; passport-test-suite/Mr. Pixel's Programming Paint Set.woz [C=0] matches - sta gDisplayBytes jsr inx9 ldy #$01 jsr modify diff --git a/src/patchers/d5d5f7.a b/src/patchers/d5d5f7.a index 40557aa..1d72d89 100755 --- a/src/patchers/d5d5f7.a +++ b/src/patchers/d5d5f7.a @@ -50,7 +50,7 @@ !byte $18 ; CLC !byte $6D ; ADC bcs .exit ; passport-test-suite/RoboMath.woz [C=0] matches - sta gDisplayBytes ; passport-test-suite/Notecard Maker.woz [C=0] matches + ; passport-test-suite/Notecard Maker.woz [C=0] matches jsr PrintByID !byte s_d5d5f7 ldy #$01 diff --git a/src/patchers/datasoft.a b/src/patchers/datasoft.a index aeeb23b..8f95fb2 100755 --- a/src/patchers/datasoft.a +++ b/src/patchers/datasoft.a @@ -11,7 +11,6 @@ jsr SearchTrack !byte $5D,$D4,$80,$49,00,$19 bcs .exit ; passport-test-suite/Tomahawk.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_datasoft ldy #$01 diff --git a/src/patchers/davidsonforth.a b/src/patchers/davidsonforth.a index dab23c6..e1623f5 100644 --- a/src/patchers/davidsonforth.a +++ b/src/patchers/davidsonforth.a @@ -17,7 +17,6 @@ jsr SearchTrack !byte $08,$80,$00,$FD,$1C,$D1,$0D,$EC bcs .exit ; passport-test-suite/Read 'N Roll.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_badblock inx diff --git a/src/patchers/e7everywhere.a b/src/patchers/e7everywhere.a index 0682194..70837e1 100644 --- a/src/patchers/e7everywhere.a +++ b/src/patchers/e7everywhere.a @@ -36,7 +36,6 @@ !byte $8D ; bcs .exit ; passport-test-suite/Garfield Trivia Game.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_e7everywhere ldy #$02 diff --git a/src/patchers/ea.a b/src/patchers/ea.a index df7808d..670d71d 100644 --- a/src/patchers/ea.a +++ b/src/patchers/ea.a @@ -119,7 +119,6 @@ !byte $07,$01 ;SUB #$4d !byte $0F,$F5,$70 ;BNE $a9f6 bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -151,7 +150,6 @@ !byte $D0,$7C ;BNE +$7C !byte $60 ;RTS bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -173,7 +171,6 @@ !byte $07,$1C ;SUB #$50 !byte $0F,$78,$60 ;BNE $B97B bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -195,7 +192,6 @@ !byte $20,$67,$67 ;JSR $6767 !byte $20,$AA,$BF ;JSR $BFAA bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -212,7 +208,6 @@ !byte $C9,$52 ;CMP #$52 !byte $F0,$03 ;BEQ +$03 bcs + - sta gDisplayBytes jsr PrintByID !byte s_tamper jsr inx6 @@ -226,7 +221,6 @@ !byte $C9,$52 ;CMP #$52 !byte $D0,$DB ;BNE -$DB bcs + - sta gDisplayBytes jsr PrintByID !byte s_tamper jsr inx4 @@ -364,7 +358,6 @@ !byte $E9,$00 ;SBC #$00 !byte $48 ;PHA bcs + - sta gDisplayBytes jsr PrintByID !byte s_tamper inx @@ -382,7 +375,6 @@ !byte $C9,$A0 ;CMP #$A0 !byte $F0 ;BEQ *+xx bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -407,7 +399,6 @@ !byte $04,$F1,$70 ;LDA $a9f2 !byte $07 ;CMP #$xx bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -498,7 +489,6 @@ !byte $5E,$00 !byte $5E,$0D bcs + - sta gDisplayBytes jsr PrintByID !byte s_tamper inx @@ -538,7 +528,6 @@ !byte $D0,$F8 ;BNE $8111 !byte $E6,$98 ;INC $98 bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper diff --git a/src/patchers/errord51.a b/src/patchers/errord51.a index 04f6de0..b134cc2 100644 --- a/src/patchers/errord51.a +++ b/src/patchers/errord51.a @@ -25,7 +25,6 @@ ERRORD51 !byte $8D,WILDCARD,WILDCARD !byte $20 bcs @exit - sta gDisplayBytes pha clc adc #BASEPAGE diff --git a/src/patchers/fbff.a b/src/patchers/fbff.a index 42624ab..5d73de3 100755 --- a/src/patchers/fbff.a +++ b/src/patchers/fbff.a @@ -102,7 +102,6 @@ !byte $F0,WILDCARD !byte $BC,$8C,$C0 bcs .exit ; passport-test-suite/Maniac Mansion.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_fbff ldy #$05 diff --git a/src/patchers/fbffencrypted.a b/src/patchers/fbffencrypted.a index b887b5d..535e955 100644 --- a/src/patchers/fbffencrypted.a +++ b/src/patchers/fbffencrypted.a @@ -29,11 +29,10 @@ !byte $39,$FD ; DEC $02 !byte $2F,$FB ; BNE +4 !byte $39,$FC ; DEC $03 - bcs .exit ; passport-test-suite/Oo-Topos.woz [C=0] matches + bcs .exit ; passport-test-suite/Oo-Topos.woz [C=0] matches inx inx inx - sta gDisplayBytes jsr PrintByID !byte s_fbff ldy #$01 diff --git a/src/patchers/fbffpascal.a b/src/patchers/fbffpascal.a index 1caa53e..95d1f83 100644 --- a/src/patchers/fbffpascal.a +++ b/src/patchers/fbffpascal.a @@ -27,7 +27,6 @@ !byte $AC,$EC,$C0; LDY $C0EC bcs .exit ; passport-test-suite/The Typewriter.woz [C=0] matches stx .a+1 - sta gDisplayBytes adc #BASEPAGE ; carry is guaranteed to be clear here sta .a+2 ldy #$10 ; get the branch offset from the WILDCARD above diff --git a/src/patchers/gamco.a b/src/patchers/gamco.a index 7a5cba4..d5be264 100644 --- a/src/patchers/gamco.a +++ b/src/patchers/gamco.a @@ -17,10 +17,8 @@ !byte $03,$31,$32,$38,$02,$31,$31,$02 !byte $39,$36 bcs .exit ; passport-test-suite/Essential Grammar.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_poke - ldy #$12 jsr modify !byte $34,$34,$01,$30,$02,$31,$30,$03 !byte $32,$33,$34,$03,$31,$36,$39,$02 diff --git a/src/patchers/hallabs.a b/src/patchers/hallabs.a index cee1dec..54836f9 100644 --- a/src/patchers/hallabs.a +++ b/src/patchers/hallabs.a @@ -35,8 +35,6 @@ !byte $20 @search2end bcs .exit ; passport-test-suite/Super Taxman II.woz [C=0] matches - - sta gDisplayBytes jsr PrintByID !byte s_hallabs ldy #$01 diff --git a/src/patchers/leisure.a b/src/patchers/leisure.a index 2b5e80c..c03bed2 100644 --- a/src/patchers/leisure.a +++ b/src/patchers/leisure.a @@ -20,7 +20,6 @@ !byte $D0,$01 !byte $60 bcs .exit ; passport-test-suite/Clue Master Detective.woz [C=0] matches - sta gDisplayBytes ldy #$01 sty gDisplayBytes+1 jsr PrintByID diff --git a/src/patchers/memory.config.a b/src/patchers/memory.config.a index 5ad3f03..492c7d0 100644 --- a/src/patchers/memory.config.a +++ b/src/patchers/memory.config.a @@ -26,7 +26,6 @@ !byte $8D,$08,$C0 ; STA $C008 !byte $B5,$42 ; LDA $42,X bcs .exit ; passport-test-suite/Rosie the Counting Rabbit.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_runhello inx diff --git a/src/patchers/microfun.a b/src/patchers/microfun.a index fe384ce..6a8649e 100644 --- a/src/patchers/microfun.a +++ b/src/patchers/microfun.a @@ -20,7 +20,6 @@ !byte $84,$27 ; STY $27 !byte $BD,$8C,$C0; LDA $C08C,X bcs .exit ; passport-test-suite/Miner 2049er.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_microfun ldy #$02 diff --git a/src/patchers/pdi.a b/src/patchers/pdi.a index d8f2df0..d7e8c51 100644 --- a/src/patchers/pdi.a +++ b/src/patchers/pdi.a @@ -22,7 +22,6 @@ !byte $10,$F7 ; BPL *-9 !byte $4C,$E3,$93 ; JMP $93E3 bcs .exit ; passport-test-suite/Polywriter.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_pdi jsr inx0C diff --git a/src/patchers/polarware.a b/src/patchers/polarware.a index 7a51478..3e4e700 100644 --- a/src/patchers/polarware.a +++ b/src/patchers/polarware.a @@ -26,7 +26,6 @@ inx ; passport-test-suite/The Crimson Crown.woz [C=0] reaches here inx inx - sta gDisplayBytes jsr PrintByID !byte s_fbff ldy #$01 @@ -43,7 +42,6 @@ !byte $F0,$09 ; BEQ +9 !byte $AE ; LDX bcs .exit ; passport-test-suite/The Crimson Crown.woz [C=0] matches - sta gDisplayBytes jsr inx9 jsr PrintByID !byte s_tamper diff --git a/src/patchers/prodosmecc.a b/src/patchers/prodosmecc.a index 0dec2ec..85f1743 100755 --- a/src/patchers/prodosmecc.a +++ b/src/patchers/prodosmecc.a @@ -14,7 +14,6 @@ !byte $50,$54,$58,$5C,$60,$64,$68,$00 !byte $20,$10,$30,WILDCARD,$AA,$EB bcs + ; passport-test-suite/Mystery Objects v1.1.woz [C=0] matches - sta gDisplayBytes jsr inx0B ldy #$01 jsr compare @@ -40,7 +39,6 @@ !byte $24,$38 !byte $60 bcs + ; passport-test-suite/Miner's Cave.woz [C=0] matches - sta gDisplayBytes jsr inx9 ldy #$01 jsr modify @@ -55,7 +53,6 @@ !byte $81,$C0,$28,$D0,$09,$8D,WILDCARD,WILDCARD !byte $C9,$DE,$F0,$02,$18,$24,$38,$60 bcs + ; passport-test-suite/Spelling Press v1.1.woz [C=0] matches - sta gDisplayBytes jsr inx0B jsr inx0B ldy #$01 diff --git a/src/patchers/prodosrwts.a b/src/patchers/prodosrwts.a index 95b58ac..f750fc2 100755 --- a/src/patchers/prodosrwts.a +++ b/src/patchers/prodosrwts.a @@ -20,7 +20,6 @@ _prodosrwts !byte $F0,$01 !byte $38 bcs .exit ; passport-test-suite/Mystery Objects v1.1.woz [C=0] matches - sta gDisplayBytes jsr inx0F ldy #$01 jsr compare diff --git a/src/patchers/rwtsswapmecc.a b/src/patchers/rwtsswapmecc.a index 429ed00..bc5c3d8 100755 --- a/src/patchers/rwtsswapmecc.a +++ b/src/patchers/rwtsswapmecc.a @@ -13,7 +13,6 @@ !byte $A9,$D5 !byte $8D,$7A,$BC bcs + ; passport-test-suite/Word Wizards v1.0.woz [C=0] matches - sta gDisplayBytes jsr inx5 ldy #$01 jsr modify @@ -28,7 +27,6 @@ !byte $A2,$06 !byte $BD bcs + ; passport-test-suite/Zoyon Patrol v1.0.woz [C=0] matches - sta gDisplayBytes jsr inx4 ldy #$01 jsr modify @@ -41,7 +39,6 @@ !byte $D0,$11 !byte $B9 bcs + ; passport-test-suite/MECC Dataquest Composer [C=0] matches - sta gDisplayBytes jsr inx5 ldy #$01 jsr modify @@ -58,7 +55,6 @@ !byte $B9,WILDCARD,WILDCARD !byte $8D,$AC,$D5 bcs + ; passport-test-suite/MECC Dataquest - Europe and Soviet Union.woz [C=0] matches - sta gDisplayBytes ldy #$03 jsr modify !byte $A9,$00 diff --git a/src/patchers/sierra.a b/src/patchers/sierra.a index 2e247cd..9512ff8 100755 --- a/src/patchers/sierra.a +++ b/src/patchers/sierra.a @@ -287,7 +287,7 @@ !byte $BD,$89,$C0 ;LDA $C089,X jsr inx4 bcs ++ -+ sta gDisplayBytes ++ jsr PrintByID !byte s_sierra ldy #$01 @@ -307,7 +307,6 @@ !byte WILDCARD ;INX or DEX !byte $D0,$FB ;BNE *-5 bcs + - sta gDisplayBytes pha jsr PrintByID !byte s_tamper @@ -332,7 +331,6 @@ !byte $CD,WILDCARD,WILDCARD ;CMP $xxxx !byte $D0,$30 ;BNE *+$32 bcs + - sta gDisplayBytes jsr PrintByID !byte s_tamper ldy #$01 diff --git a/src/patchers/sigcheck.a b/src/patchers/sigcheck.a index d309d83..a4ebcfd 100644 --- a/src/patchers/sigcheck.a +++ b/src/patchers/sigcheck.a @@ -19,7 +19,6 @@ !byte $A9,$FF !byte $48 bcs .exit ; passport-test-suite/Advanced Electricity.woz [C=0] matches - sta gDisplayBytes jsr inx8 ldy #$01 jsr modify diff --git a/src/patchers/ssi.a b/src/patchers/ssi.a index 88927ed..503e66d 100644 --- a/src/patchers/ssi.a +++ b/src/patchers/ssi.a @@ -21,7 +21,6 @@ !byte $EA ; NOP bcs + ; passport-test-suite/Epidemic.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_ssi ldy #$01 @@ -35,7 +34,6 @@ !byte $A9,$44 ; LDA #$22 !byte $20 ; JSR ... bcs .exit ; passport-test-suite/Sixgun Shootout.woz [C=0] matches - sta gDisplayBytes ldy #$01 jsr modify !byte $60 ; RTS diff --git a/src/patchers/trillium.a b/src/patchers/trillium.a index 9c5dc87..7f0015a 100644 --- a/src/patchers/trillium.a +++ b/src/patchers/trillium.a @@ -26,7 +26,6 @@ !byte $AD,$83,$C0; LDA $C083 !byte $AD,$83,$C0; LDA $C083 bcs .exit ; passport-test-suite/Rendezvous with Rama rev. 2.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_trillium ldy #$01 diff --git a/src/patchers/woodbury.a b/src/patchers/woodbury.a index e90e902..a710354 100644 --- a/src/patchers/woodbury.a +++ b/src/patchers/woodbury.a @@ -23,7 +23,6 @@ !byte $D0,$05 !byte $A9,$00 bcs .exit ; passport-test-suite/PlayWriter.woz [C=0] matches - sta gDisplayBytes jsr PrintByID !byte s_badblock jsr inx4 diff --git a/src/patchers/zoomgrafix.a b/src/patchers/zoomgrafix.a index 8cb7535..f076711 100644 --- a/src/patchers/zoomgrafix.a +++ b/src/patchers/zoomgrafix.a @@ -14,7 +14,6 @@ !byte $4C,$4D,$D0,$E2,$28,$4B,$42,$C9 ; 'LM = PEEK(KB - 2058)' in BASIC !byte $32,$30,$35,$38 bcs .exit ; passport-test-suite/Zoom Grafix 26-JAN-82.woz [C=0] matches - sta gDisplayBytes ldy #$00 sty gDisplayBytes+1 jsr PrintByID diff --git a/src/print.a b/src/print.a index 609dab8..87965ed 100755 --- a/src/print.a +++ b/src/print.a @@ -8,7 +8,8 @@ kForceLower !byte $FF ; AND mask for lowercase letters ; auto-uppercases on older machines ; in: string ID (byte) on stack ; out: all registers preserved -; all flags clobbered +; oVerflow bit clear +; all other flags clobbered ; stack set to after params ;------------------------------- PrintByID @@ -106,6 +107,7 @@ PrintByID pla tay pla + clv rts @include sta @id