Merge pull request #56 from peterferrie/master

merge MECC variant IDs into single int
This commit is contained in:
4am 2018-07-03 14:22:04 -04:00 committed by GitHub
commit 75080ec675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 43 additions and 54 deletions

View File

@ -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

View File

@ -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

View File

@ -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
;

View File

@ -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

View File

@ -5,8 +5,8 @@
; e.g. Word Munchers
;-------------------------------
!zone {
lda gIsMECCFastloader
ora gIsMECC1
lda gMECCFastloadType
cmp #ID_MECC1
bne .exit
lda #$0B
ldx #$08

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -4,8 +4,8 @@
; fastloader disks
;-------------------------------
!zone {
lda gIsMECCFastloader
bne .exit
lda gMECCFastloadType
beq .exit
ldy #$11
jsr SearchTrack

View File

@ -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 " "