From 89f042051699d12dfef16f2a021f4c8508ce3e85 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 3 Jul 2018 10:46:03 -0700 Subject: [PATCH] merge MECC variant IDs into single int --- src/apicode.a | 25 +++++-------------------- src/apidefs.a | 27 +++++++++++++++------------ src/id/inspect0.a | 21 +++++++++++---------- src/passport.a | 2 +- src/patchers/mecc1.a | 4 ++-- src/patchers/mecc2.a | 4 ++-- src/patchers/mecc3.a | 4 ++-- src/patchers/mecc4.a | 4 ++-- src/patchers/rwtsswapmecc.a | 4 ++-- src/strings/en.a | 2 +- 10 files changed, 43 insertions(+), 54 deletions(-) diff --git a/src/apicode.a b/src/apicode.a index eb0b125..21b43b1 100644 --- a/src/apicode.a +++ b/src/apicode.a @@ -48,6 +48,11 @@ ; instead of falling back to built-in RWTS ; compile-time flag, no way to change at runtime +;gMECCFastloadType + !byte 00 ; int + ; reset before each operation + ; set in IDBootloader() after reading T00,S00 + FIRSTFILTER ;gIsDavidson !byte FALSE ; 0=true, 1=false @@ -114,26 +119,6 @@ FIRSTFILTER !byte FALSE ; 0=true, 1=false ; reset before each operation ; set in IDBootloader() after reading T00,S00 -;gIsMECC4 - !byte FALSE ; 0=true, 1=false - ; reset before each operation - ; set in IDBootloader() after reading T00,S00 -;gIsMECC3 - !byte FALSE ; 0=true, 1=false - ; reset before each operation - ; set in IDBootloader() after reading T00,S00 -;gIsMECC2 - !byte FALSE ; 0=true, 1=false - ; reset before each operation - ; set in IDBootloader() after reading T00,S00 -;gIsMECC1 - !byte FALSE ; 0=true, 1=false - ; reset before each operation - ; set in IDBootloader() after reading T00,S00 -;gIsMECCFastloader - !byte FALSE ; 0=true, 1=false - ; reset before each operation - ; set in IDBootloader() after reading T00,S00 ;gIsOptimum !byte FALSE ; 0=true, 1=false ; reset before each operation diff --git a/src/apidefs.a b/src/apidefs.a index 3e75e6e..9cf64ca 100644 --- a/src/apidefs.a +++ b/src/apidefs.a @@ -11,6 +11,16 @@ ID_DOS33p = $00 ID_DOS32 = $01 ID_DOS32LO = $02 +;------------------------------- +;MECC fast-load variants +;------------------------------- + +ID_MECC1 = $01 +ID_MECC2 = $02 +ID_MECC3 = $03 +ID_MECC4 = $04 +ID_MECC_UNK = $FF + ; Zero-page addresses we use for variables nibsrcindex = $EC ; byte nibdestindex = $ED ; byte @@ -70,12 +80,7 @@ gIsDavidDOS = gIsProtDOS-$01 ; byte gIsEA = gIsDavidDOS-$01 ; byte gPossibleGamco = gIsEA-$01 ; byte gIsOptimum = gPossibleGamco-$01 ; byte -gIsMECCFastloader = gIsOptimum-$01 ; byte -gIsMECC1 = gIsMECCFastloader-$01 ; byte -gIsMECC2 = gIsMECC1-$01 ; byte -gIsMECC3 = gIsMECC2-$01 ; byte -gIsMECC4 = gIsMECC3-$01 ; byte -gPossibleD5D5F7 = gIsMECC4-$01 ; byte +gPossibleD5D5F7 = gIsOptimum-$01 ; byte gIs8b3 = gPossibleD5D5F7-$01 ; byte gIsMilliken1 = gIs8b3-$01 ; byte gAdventureInternational = gIsMilliken1-$01 ; byte @@ -91,8 +96,10 @@ gIsAdvent = gForceDiskVol-$01 ; byte gIsPanglosDOS = gIsAdvent-$01 ; byte gIsDavidson = gIsPanglosDOS-$01 ; byte ;LASTFILTER ; add new gIs* above this line +;gMECCFastloadType is a special case integer whose default value cannot be #FALSE +gMECCFastloadType = gIsDavidson-$01 ; byte -gOnAClearDayYouCanReadForever = gIsDavidson-$01 ; byte +gOnAClearDayYouCanReadForever = gMECCFastloadType-$01 ; byte gUsingRAMDisk = gOnAClearDayYouCanReadForever-$01 ; byte gRAMDiskRef = gUsingRAMDisk-$01 ; byte gDisplayBytes = gRAMDiskRef-$0A ; 10 bytes @@ -141,11 +148,7 @@ ConstructStandardDelivery = jConstructStandardDelivery !warn "gIsEA=",gIsEA !warn "gPossibleGamco=",gPossibleGamco !warn "gIsOptimum=",gIsOptimum -!warn "gIsMECCFastloader=",gIsMECCFastloader -!warn "gIsMECC1=",gIsMECC1 -!warn "gIsMECC2=",gIsMECC2 -!warn "gIsMECC3=",gIsMECC3 -!warn "gIsMECC4=",gIsMECC4 +!warn "gMECCFastloadType=",gMECCFastloadType !warn "gPossibleD5D5F7=",gPossibleD5D5F7 !warn "gIs8b3=",gIs8b3 !warn "gIsMilliken1=",gIsMilliken1 diff --git a/src/id/inspect0.a b/src/id/inspect0.a index 66bc2e1..fd0cb2d 100755 --- a/src/id/inspect0.a +++ b/src/id/inspect0.a @@ -16,6 +16,7 @@ IDBootloader - sta FIRSTFILTER-1,x dex bne - + stx gMECCFastloadType stx gLastTrack ; ; Quick sanity check -- only recognized values for $0800 @@ -82,31 +83,31 @@ IDBootloader ; + jsr IDMECC bcs .notmecc - lda #TRUE - sta gIsMECCFastloader + lda #ID_MECC_UNK + sta gMECCFastloadType lda #s_mecc jsr PrintByID jsr PrereadT00 bcs .notmecc jsr IDMECC1 bcs + - lda #TRUE - sta gIsMECC1 + lda #ID_MECC1 + sta gMECCFastloadType jmp foundmecc1 + jsr IDMECC2 bcs + - lda #TRUE - sta gIsMECC2 + lda #ID_MECC2 + sta gMECCFastloadType jmp foundmecc2 + jsr IDMECC3 bcs + - lda #TRUE - sta gIsMECC3 + lda #ID_MECC3 + sta gMECCFastloadType jmp foundmecc3 + jsr IDMECC4 bcs .notmecc - lda #TRUE - sta gIsMECC4 + lda #ID_MECC4 + sta gMECCFastloadType jmp foundmecc4 .notmecc ; diff --git a/src/passport.a b/src/passport.a index 23e0f2a..0b5e235 100755 --- a/src/passport.a +++ b/src/passport.a @@ -762,7 +762,7 @@ _applyToAll !source "patchers/bbf9.a" ; gIsProDOS only !source "patchers/memory.config.a" ; gIsProDOS only !source "patchers/origin.a" ; gIsProDOS only - !source "patchers/rwtsswapmecc.a" ; gIsMECCFastloader only + !source "patchers/rwtsswapmecc.a" ; gMECCFastloadType only !source "patchers/protecteddos.a" ; gIsProtDOS only !source "patchers/fbff.a" !source "patchers/fbffencrypted.a" ; gIsProDOS only diff --git a/src/patchers/mecc1.a b/src/patchers/mecc1.a index 6bc4590..2ae2148 100755 --- a/src/patchers/mecc1.a +++ b/src/patchers/mecc1.a @@ -5,8 +5,8 @@ ; e.g. Word Munchers ;------------------------------- !zone { - lda gIsMECCFastloader - ora gIsMECC1 + lda gMECCFastloadType + cmp #ID_MECC1 bne .exit lda #$0B ldx #$08 diff --git a/src/patchers/mecc2.a b/src/patchers/mecc2.a index 742648c..fcdd527 100755 --- a/src/patchers/mecc2.a +++ b/src/patchers/mecc2.a @@ -5,8 +5,8 @@ ; e.g. Phonics Prime Time series ;------------------------------- !zone { - lda gIsMECCFastloader - ora gIsMECC2 + lda gMECCFastloadType + cmp #ID_MECC2 bne .exit lda #$07 ldx #$83 diff --git a/src/patchers/mecc3.a b/src/patchers/mecc3.a index a75a1ea..f995990 100644 --- a/src/patchers/mecc3.a +++ b/src/patchers/mecc3.a @@ -5,8 +5,8 @@ ; e.g. Word Munchers v1.1 ;------------------------------- !zone { - lda gIsMECCFastloader - ora gIsMECC3 + lda gMECCFastloadType + cmp #ID_MECC3 bne .exit lda #$0A ldx #$E8 diff --git a/src/patchers/mecc4.a b/src/patchers/mecc4.a index 36901a6..d95ee0d 100644 --- a/src/patchers/mecc4.a +++ b/src/patchers/mecc4.a @@ -5,8 +5,8 @@ ; e.g. A-201 Conquering Whole Numbers ;------------------------------- !zone { - lda gIsMECCFastloader - ora gIsMECC4 + lda gMECCFastloadType + cmp #ID_MECC4 bne .exit lda #$08 ldx #$83 diff --git a/src/patchers/rwtsswapmecc.a b/src/patchers/rwtsswapmecc.a index 33d2040..22a0669 100755 --- a/src/patchers/rwtsswapmecc.a +++ b/src/patchers/rwtsswapmecc.a @@ -4,8 +4,8 @@ ; fastloader disks ;------------------------------- !zone { - lda gIsMECCFastloader - bne .exit + lda gMECCFastloadType + beq .exit ldy #$11 jsr SearchTrack diff --git a/src/strings/en.a b/src/strings/en.a index e158fbf..e1c8c4c 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -144,7 +144,7 @@ StringTable ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2018-06-21",$00 + !text "Passport by 4am 2018-07-03",$00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " "