shave some bytes

This commit is contained in:
4am 2021-06-16 13:36:20 -04:00
parent f4c13c270d
commit b76b442431
23 changed files with 94 additions and 64 deletions

View File

@ -283,34 +283,19 @@ AnalyzeTrack
; only run these modules in crack mode ; only run these modules in crack mode
!source "patchers/universale7.a" !source "patchers/universale7.a"
!source "patchers/c9ff.a" !source "patchers/c9ff.a"
!source "patchers/a6bc95.a" ; gIsPascal only
!source "patchers/a5count.a" ; gIsPascal only
!source "patchers/d5d5f7.a" ; gIsPascal || (gIsBoot0 && gPossibleD5D5F7) only !source "patchers/d5d5f7.a" ; gIsPascal || (gIsBoot0 && gPossibleD5D5F7) only
!source "patchers/prodosrwts.a" ; gIsProDOS only
!source "patchers/prodos6a.a" ; gIsProDOS only
!source "patchers/prodosmecc.a" ; gIsProDOS only
!source "patchers/bbf9.a" ; gIsProDOS only
!source "patchers/memory.config.a" ; gIsProDOS only
!source "patchers/origin.a" ; gIsProDOS only
!source "patchers/rwtsswapmecc.a" ; gMECCFastloadType || gPossibleMECCSwapper only !source "patchers/rwtsswapmecc.a" ; gMECCFastloadType || gPossibleMECCSwapper only
!source "patchers/meccdqc.a" ; gMECCFastloadType==1 && gT07 only !source "patchers/meccdqc.a" ; gMECCFastloadType==1 && gT07 only
!source "patchers/rwtsswappenguin.a" ; T01 only !source "patchers/rwtsswappenguin.a" ; T01 only
!source "patchers/protecteddos.a" ; gIsProtDOS only !source "patchers/protecteddos.a" ; gIsProtDOS only
!source "patchers/fbff.a" !source "patchers/fbff.a"
!source "patchers/fbffencrypted.a" ; gIsProDOS only
!source "patchers/fbffpascal.a" ; gIsPascal only
!source "patchers/polarware.a" ; gIsProDOS only
!source "patchers/sierra.a" ; gIsBoot0 only
!source "patchers/corrupter.a" ; T13 only !source "patchers/corrupter.a" ; T13 only
!source "patchers/ea.a" ; gIsEA || gIsBoot0 only !source "patchers/ea.a" ; gIsEA || gIsBoot0 only
!source "patchers/gamco.a" ; gPossibleGamco only !source "patchers/gamco.a" ; gPossibleGamco only
!source "patchers/optimum.a" ; gIsOptimum only !source "patchers/optimum.a" ; gIsOptimum only
!source "patchers/bootcounter.a" ; T01 only !source "patchers/bootcounter.a" ; T01 only
!source "patchers/jmpb412.a" ; T02 only
!source "patchers/jmp2012.a" ; T02 only !source "patchers/jmp2012.a" ; T02 only
!source "patchers/jmpb400.a" ; T02 && gIsBoot0 only
!source "patchers/advint.a" ; gAdventureInternational only !source "patchers/advint.a" ; gAdventureInternational only
!source "patchers/jsr8635.a" ; gIsBoot0 only
!source "patchers/jmpb4bb.a" ; T02 only !source "patchers/jmpb4bb.a" ; T02 only
!source "patchers/dos32muse.a" ; T01 && gIsDOS32 only !source "patchers/dos32muse.a" ; T01 && gIsDOS32 only
!source "patchers/sra.a" ; gIsDOS32 || gIsBoot0 only !source "patchers/sra.a" ; gIsDOS32 || gIsBoot0 only
@ -325,20 +310,65 @@ AnalyzeTrack
!source "patchers/ssi.a" ; gIsRDOS13 only !source "patchers/ssi.a" ; gIsRDOS13 only
!source "patchers/rdosfmt.a" ; gIsRDOS13 only !source "patchers/rdosfmt.a" ; gIsRDOS13 only
!source "patchers/aacount.a" !source "patchers/aacount.a"
!source "patchers/hallabs.a" ; T01 only
!source "patchers/holle.a" ; gIsHolle only !source "patchers/holle.a" ; gIsHolle only
!source "patchers/zoomgrafix.a" ; gIsPhoenix only !source "patchers/zoomgrafix.a" ; gIsPhoenix only
!source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only !source "patchers/e7everywhere.a" ; gIsBoot0 || gIsProDOS only
!source "patchers/choplifter.a" ; gIsChoplifter only !source "patchers/choplifter.a" ; gIsChoplifter only
!source "patchers/pdi.a" ; gIsDiversi only
!source "patchers/harvey.a" ; T01 only
!source "patchers/tsr.a" ; T04 && gIsTSR only !source "patchers/tsr.a" ; T04 && gIsTSR only
!source "patchers/woodbury.a" ; gPossibleWoodbury only !source "patchers/woodbury.a" ; gPossibleWoodbury only
!source "patchers/leisure.a" ; gIsProDOS && T22 only
!source "patchers/b4bbbasic.a" ; gPossibleB4BBBasic only !source "patchers/b4bbbasic.a" ; gPossibleB4BBBasic only
!source "patchers/errord51.a" ; gIsLowDOS only !source "patchers/errord51.a" ; gIsLowDOS only
!source "patchers/sigcheck.a" ; gIsDiversi only
!source "patchers/555.a" ; gIs555 only !source "patchers/555.a" ; gIs555 only
;
; DOS 3.3-specific patchers
;
lda gIsBoot0
beq +
jmp _endDOS33Patchers
+
!source "patchers/hallabs.a" ; gIsBoot0 && T01 only
!source "patchers/harvey.a" ; gIsBoot0 && T01 only
!source "patchers/jmpb400.a" ; gIsBoot0 && T02 only
!source "patchers/jmpb412.a" ; gIsBoot0 && T02 only
!source "patchers/jsr8635.a" ; gIsBoot0 only
!source "patchers/sierra.a" ; gIsBoot0 only
_endDOS33Patchers
;
; Diversi-DOS-specific patchers
;
lda gIsDiversi
bne _endDiversiPatchers
!source "patchers/pdi.a" ; gIsDiversi only
!source "patchers/sigcheck.a" ; gIsDiversi only
_endDiversiPatchers
;
; ProDOS-specific patchers
;
lda gIsProDOS
beq +
jmp _endProDOSPatchers
+
!source "patchers/bbf9.a" ; gIsProDOS only
!source "patchers/fbffencrypted.a" ; gIsProDOS only
!source "patchers/leisure.a" ; gIsProDOS && T22 only
!source "patchers/memory.config.a" ; gIsProDOS only
!source "patchers/origin.a" ; gIsProDOS only
!source "patchers/polarware.a" ; gIsProDOS only
!source "patchers/prodos6a.a" ; gIsProDOS only
!source "patchers/prodosmecc.a" ; gIsProDOS only
!source "patchers/prodosrwts.a" ; gIsProDOS only
_endProDOSPatchers
;
; Pascal-specific patchers
;
lda gIsPascal
beq +
jmp _endPascalPatchers
+
!source "patchers/a5count.a" ; gIsPascal only
!source "patchers/a6bc95.a" ; gIsPascal only
!source "patchers/fbffpascal.a" ; gIsPascal only
_endPascalPatchers
_checkPatchCount _checkPatchCount
lda gPatchCount lda gPatchCount

View File

@ -5,8 +5,8 @@
; e.g. Game Frame One, Game Frame Two ; e.g. Game Frame One, Game Frame Two
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsPascal ; only ever seen this protection ; gIsPascal is TRUE here
bne .exit ; on Pascal disks ; (only ever seen this protection on Pascal disks)
ldy #$0A ldy #$0A
jsr SearchTrack jsr SearchTrack

View File

@ -4,8 +4,8 @@
; e.g. The Secrets of Science Island ; e.g. The Secrets of Science Island
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsPascal ; only ever seen this protection ; gIsPascal is TRUE here
bne .exit ; on Pascal disks ; (only ever seen this protection on Pascal disks)
ldy #$09 ldy #$09
jsr SearchTrack jsr SearchTrack

View File

@ -16,8 +16,8 @@
; 1-2-3 Sequence Me (1991) ; 1-2-3 Sequence Me (1991)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; gIsProDOS is TRUE here
bne .exit
ldy #$08 ldy #$08
jsr SearchTrack jsr SearchTrack
!byte $8E,$C0 !byte $8E,$C0

View File

@ -22,8 +22,9 @@
; ;
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; only seen this protection on ProDOS disks ; gIsProDOS is TRUE here
bne .exit ; (only ever seen this protection on ProDOS disks)
ldy #$06 ldy #$06
jsr SearchTrack ; (all bytes are XOR #$FF) jsr SearchTrack ; (all bytes are XOR #$FF)
!byte $39,$FD ; DEC $02 !byte $39,$FD ; DEC $02

View File

@ -1,5 +1,5 @@
;------------------------------- ;-------------------------------
; #FBFF ; #FBFFPASCAL
; a variant of Activision's Timing Bit Detection ; a variant of Activision's Timing Bit Detection
; linked as an Apple Pascal module ; linked as an Apple Pascal module
; (soft switches are hard-coded to slot 6) ; (soft switches are hard-coded to slot 6)
@ -12,8 +12,8 @@
; Power Up! The Typewriter ; Power Up! The Typewriter
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsPascal ; only seen this protection on Pascal disks ; gIsPascal is TRUE here
bne .exit
ldy #$14 ldy #$14
jsr SearchTrack jsr SearchTrack
!byte $AD,$E9,$C0; LDA $C0E9 !byte $AD,$E9,$C0; LDA $C0E9

View File

@ -7,8 +7,8 @@
; Super Taxman II (HAL Labs) ; Super Taxman II (HAL Labs)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsBoot0 ; gIsBoot0 is TRUE here
bne .exit
ldx gTrack ldx gTrack
dex dex
bne .exit bne .exit

View File

@ -7,8 +7,6 @@
; Harvey by Primes (Queue) ; Harvey by Primes (Queue)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsBoot0
bne .exit
ldx gTrack ldx gTrack
dex dex
bne .exit bne .exit

View File

@ -14,8 +14,8 @@
; Success With Math - Multiplying and Dividing Fractions (1984, Mindscape) ; Success With Math - Multiplying and Dividing Fractions (1984, Mindscape)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsBoot0 ; gIsBoot0 is TRUE here
bne .exit
lda gTrack lda gTrack
cmp #$02 cmp #$02
bne .exit bne .exit

View File

@ -11,6 +11,8 @@
; America Coast to Coast (Mindscape release) ; America Coast to Coast (Mindscape release)
;------------------------------- ;-------------------------------
!zone { !zone {
; gIsBoot0 is TRUE here
lda gTrack lda gTrack
cmp #$02 cmp #$02
bne .exit bne .exit

View File

@ -12,8 +12,8 @@
; First Steps to Reading: Phonics II (1985, Grolier) ; First Steps to Reading: Phonics II (1985, Grolier)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsBoot0 ; gIsBoot0 is TRUE here
bne .exit
lda #$0F lda #$0F
sta .sector+1 sta .sector+1
.sector lda #$FF ; modified at runtime .sector lda #$FF ; modified at runtime

View File

@ -7,8 +7,8 @@
; - Risk v1.4 (Leisure Genius) ; - Risk v1.4 (Leisure Genius)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; gIsProDOS is TRUE here
bne .exit
lda gTrack lda gTrack
cmp #$22 cmp #$22
bne .exit bne .exit

View File

@ -18,8 +18,8 @@
; GeoWhiz (1990, Silver Burdett and Ginn) ; GeoWhiz (1990, Silver Burdett and Ginn)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; only if ProDOS ; gIsProDOS is TRUE here
bne .exit
ldy #$0C ldy #$0C
jsr SearchTrack jsr SearchTrack
!byte $AE,$C3,$CF,$CE,$C6,$C9,$C7 ; ".CONFIG" !byte $AE,$C3,$CF,$CE,$C6,$C9,$C7 ; ".CONFIG"

View File

@ -12,8 +12,8 @@
; - Ultima V ; - Ultima V
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; only if ProDOS ; gIsProDOS is TRUE here
bne .exit
lda #$0F lda #$0F
sta .sector+1 sta .sector+1
.sector lda #$FF ; modified at runtime .sector lda #$FF ; modified at runtime

View File

@ -11,8 +11,9 @@
; - Leadsheeter Utilities ; - Leadsheeter Utilities
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsDiversi ; only seen this protection on Diversi-DOS disks ; gIsDiversi is TRUE here
bne .exit ; (only ever seen this protection on Diversi-DOS disks)
ldy #14 ldy #14
jsr SearchTrack jsr SearchTrack
!byte $A0,$0F ; LDY #$0F !byte $A0,$0F ; LDY #$0F

View File

@ -15,8 +15,8 @@
; ;
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; only seen this protection on ProDOS disks ; gIsProDOS is TRUE here
bne .exit
ldy #$06 ldy #$06
jsr SearchTrack ; (all bytes are XOR #$EF) jsr SearchTrack ; (all bytes are XOR #$EF)
!byte $29,$6D ; DEC $82 !byte $29,$6D ; DEC $82

View File

@ -7,8 +7,8 @@
; so we get a nice CRACK COMPLETE message) ; so we get a nice CRACK COMPLETE message)
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; only if ProDOS (separate check for DOS) ; gIsProDOS is TRUE here
bne .exit
lda #$0F lda #$0F
sta .sector+1 sta .sector+1
.sector lda #$FF ; modified at runtime .sector lda #$FF ; modified at runtime

View File

@ -5,10 +5,8 @@
; [thanks LoGo] ; [thanks LoGo]
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsProDOS ; gIsProDOS is TRUE here
beq +
jmp .exit
+
ldy #$0E ldy #$0E
jsr SearchTrack jsr SearchTrack
!byte $50,$54,$58,$5C,$60,$64,$68,$00 !byte $50,$54,$58,$5C,$60,$64,$68,$00

View File

@ -5,8 +5,8 @@
;------------------------------- ;-------------------------------
!zone { !zone {
_prodosrwts _prodosrwts
lda gIsProDOS ; gIsProDOS is TRUE here
bne .exit
ldy #$14 ldy #$14
jsr SearchTrack jsr SearchTrack
!byte $29,$FC !byte $29,$FC

View File

@ -377,8 +377,8 @@
jmp .exit jmp .exit
.dosearch .dosearch
lda gIsBoot0 ; gIsBoot0 is TRUE here
bne .jmpexit
ldy #15 ldy #15
jsr SearchTrack jsr SearchTrack
!byte $CE,WILDCARD,WILDCARD ;DEC $xxxx !byte $CE,WILDCARD,WILDCARD ;DEC $xxxx

View File

@ -8,8 +8,8 @@
; - Projectile and Circular Motion ; - Projectile and Circular Motion
;------------------------------- ;-------------------------------
!zone { !zone {
lda gIsDiversi ; only ever seen this protection ; gIsDiversi is TRUE here
bne .exit ; on Diversi-DOS disks ; (only ever seen this protection on Diversi-DOS disks)
ldy #$0A ldy #$0A
jsr SearchTrack jsr SearchTrack

View File

@ -3,11 +3,11 @@
; print disk volume name and number after reading track 2 ; print disk volume name and number after reading track 2
;------------------------------- ;-------------------------------
!zone { !zone {
; gIsBoot0 is TRUE here
lda gTrack lda gTrack
cmp #$02 cmp #$02
bne .exit bne .exit
lda gIsBoot0
bne .exit
lda #$00 ; look for volume name on T02,S00 (Pronto-DOS) lda #$00 ; look for volume name on T02,S00 (Pronto-DOS)
jsr .findVolumeName jsr .findVolumeName
bcc + ; passport-test-suite/America Coast to Coast.woz [C=0] matches bcc + ; passport-test-suite/America Coast to Coast.woz [C=0] matches

View File

@ -341,7 +341,7 @@ StringTableHigh
.passport .passport
!text "Passport ",$00 !text "Passport ",$00
.header .header
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-14",$00 !text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2021-06-16",$00
.bar9 .bar9
!text "_________",$00 !text "_________",$00
.bar18 .bar18