shave some bytes

This commit is contained in:
4am
2021-06-21 09:58:22 -04:00
parent 59f21b31f9
commit 57c732896c
6 changed files with 35 additions and 53 deletions

View File

@@ -18,7 +18,6 @@
; always run on Pascal disks ; always run on Pascal disks
; ;
lda gIsPascal lda gIsPascal
beq +
; ;
; if DOS 3.3-shaped bootloader, only run if we found ; if DOS 3.3-shaped bootloader, only run if we found
; specific markers on T00,S00 earlier that are shared ; specific markers on T00,S00 earlier that are shared
@@ -26,10 +25,9 @@
; (This filter is subject to revision if we find ; (This filter is subject to revision if we find
; additional samples.) ; additional samples.)
; ;
lda gPossibleD5D5F7 and gPossibleD5D5F7
bne .exit bne .exit
ldy #$20
+ ldy #$20
jsr SearchTrack jsr SearchTrack
!byte $BD,$8C,$C0; LDA $C08C,X !byte $BD,$8C,$C0; LDA $C08C,X
!byte $10,$FB ; BPL -$FB !byte $10,$FB ; BPL -$FB

View File

@@ -18,28 +18,23 @@
; - The Quarter Mile (Barnum) ; - The Quarter Mile (Barnum)
; - Reading and Writing with The Boars (McGraw-Hill) ; - Reading and Writing with The Boars (McGraw-Hill)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
!zone { E7Everywhere
lda gIsBoot0 lda gIsBoot0
beq + and gIsProDOS
lda gIsProDOS bne +
bne .exit
+
ldy #$11 ldy #$11
jsr SearchTrack jsr SearchTrack
; !byte $A9,$05 ; LDA #$05
LDA #$05
!byte $8D,WILDCARD,WILDCARD !byte $8D,WILDCARD,WILDCARD
!byte $AE,WILDCARD,WILDCARD !byte $AE,WILDCARD,WILDCARD
LDA $C08E,X !byte $BD,$8E,$C0; LDA $C08E,X
LDA $C089,X !byte $BD,$89,$C0; LDA $C089,X
LDA #$00 !byte $A9,$00 ; LDA #$00
!byte $8D !byte $8D
; bcs + ; passport-test-suite/Garfield Trivia Game.woz [C=0] matches
bcs .exit ; passport-test-suite/Garfield Trivia Game.woz [C=0] matches jsr PrintByID ; passport-test-suite/Curious George Goes Shopping.woz [C=0] matches
jsr PrintByID
!byte s_e7everywhere !byte s_e7everywhere
ldy #$02 ldy #$02
jsr modify jsr modify
!byte $18,$60 ; CLC/RTS !byte $18,$60 ; CLC/RTS
.exit +
}

View File

@@ -14,9 +14,9 @@
; Create With Garfield Deluxe Edition (1987, DLM) ; Create With Garfield Deluxe Edition (1987, DLM)
; Teddy Bearrels of Fun (1987, DLM) ; Teddy Bearrels of Fun (1987, DLM)
;------------------------------- ;-------------------------------
!zone { F7F6
lda gIsF7F6 lda gIsF7F6
bne .exit bne +
ldy #$08 ldy #$08
jsr SearchTrack jsr SearchTrack
@@ -24,17 +24,13 @@
!byte $85,$FA ; STA $FA !byte $85,$FA ; STA $FA
!byte $A2,$60 ; LDX #$60 !byte $A2,$60 ; LDX #$60
!byte $BD,$8E ; LDA $..8E,X !byte $BD,$8E ; LDA $..8E,X
bcs .exit ; passport-test-suite/Might and Magic.woz [C=0] matches bcs + ; passport-test-suite/Might and Magic.woz [C=0] matches
inx jsr inx4
inx
inx
inx
ldy #$01 ldy #$01
jsr modify jsr modify
!byte $18 ; CLC !byte $18 ; CLC
lda #TRUE ; needed for Might & Magic lda #TRUE ; needed for Might & Magic
sta gForceDiskVol sta gForceDiskVol
.exit +
}

View File

@@ -578,11 +578,6 @@
bcs .exit bcs .exit
.yes .yes
bit gMode ; don't print anything in verify mode
bpl +
jsr PrintByID
!byte s_sierra
+
.page9 .page9
lda $D103,x lda $D103,x
sta .load+1 sta .load+1
@@ -590,11 +585,13 @@
lda $D104,x lda $D104,x
sta .load+2 sta .load+2
bit gMode
bpl .exit
bvc .exit
lda #TRUE lda #TRUE
sta gIsSierra sta gIsSierra
bit gMode ; don't print or restart in verify mode
bpl .exit
jsr PrintByID
!byte s_sierra
jmp RestartScan jmp RestartScan
.exit .exit
} }

View File

@@ -11,31 +11,27 @@
; - Multiplication B (1981, SRA) ; - Multiplication B (1981, SRA)
; - Measurement D-1 (1983, SRA) ; - Measurement D-1 (1983, SRA)
;------------------------------- ;-------------------------------
!zone { SRA
lda gIsDOS32 lda gIsDOS32
bne + and gIsBoot0
lda #$0C bne @exit
bne .start ; always branches
+ lda gIsBoot0
bne .exit
lda #$0F lda #$0F
.start sta .sector+1 sta @sector+1
.sector lda #$FF ; modified above @sector lda #$FD ; SMC
ldx #$3A ldx #$3A
ldy #$09 ldy #$09
jsr compare jsr compare
!byte $20,$00,$7B ; JSR $7B00 !byte $20,$00,$7B ; JSR $7B00
!byte $8D,$6C,$7A ; STA $7A6C !byte $8D,$6C,$7A ; STA $7A6C
!byte $AD,$B1,$78 ; LDA $78B1 !byte $AD,$B1,$78 ; LDA $78B1
bcs .nextsector ; passport-test-suite/Computer Drill and Instruction - Multiplication B.woz [C=0] matches bcs @next ; passport-test-suite/Computer Drill and Instruction - Multiplication B.woz [C=0] matches
jsr PrintByID jsr PrintByID
!byte s_sra !byte s_sra
inx inx
ldy #$02 ldy #$02
jsr modify jsr modify
!byte $0F,$5A ; new JSR entry point !byte $0F,$5A ; new JSR entry point
.nextsector @next dec @sector+1
dec .sector+1 bpl @sector
bpl .sector @exit
.exit
}

View File

@@ -22,9 +22,9 @@
;------------------------------- ;-------------------------------
!zone { !zone {
lda #$07 ; sector to check for David-DOS variant lda #$07 ; sector to check for David-DOS variant
bit gIsDavidDOS lda gIsDavidDOS
beq .check beq .check
bit gIsBoot0 ; if DOS 3.3 boot0 loader lda gIsBoot0 ; if DOS 3.3 boot0 loader
bne .exit bne .exit
lda #$05 ; sector to check for DOS 3.3 variant lda #$05 ; sector to check for DOS 3.3 variant
.check ldx #$03 .check ldx #$03
@@ -35,7 +35,7 @@
jsr PrintByID jsr PrintByID
!byte s_bb03 !byte s_bb03
bit gIsDavidDOS lda gIsDavidDOS
beq .variant2 beq .variant2
lda #$01 lda #$01