mirror of
https://github.com/a2-4am/passport.git
synced 2025-01-13 14:29:44 +00:00
add support for Baudville
This commit is contained in:
parent
e437f8154a
commit
984946a2b7
@ -79,6 +79,10 @@
|
||||
; set in IDBootFailure() after reading T00
|
||||
|
||||
FIRSTFILTER
|
||||
;gIsBaudville
|
||||
!byte FALSE ; 0=true, 1=false
|
||||
; reset before each operation
|
||||
; set in IDBootloader() after reading T00,S00
|
||||
;gIsLowDOS
|
||||
!byte FALSE ; 0=true, 1=false
|
||||
; reset before each operation
|
||||
|
@ -183,9 +183,10 @@ gPossibleMECCSwapper = gIsTSR-$01 ; byte
|
||||
gPossibleWoodbury = gPossibleMECCSwapper-$01 ; byte
|
||||
gPossibleB4BBBasic = gPossibleWoodbury-$01 ; byte
|
||||
gIsLowDOS = gPossibleB4BBBasic-$01 ; byte
|
||||
gIsBaudville = gIsLowDOS-$01 ; byte
|
||||
;LASTFILTER ; add new gIs* above this line
|
||||
;gIsInfocom18 is a special case whose ID is not in the regular inspection path
|
||||
gIsInfocom18 = gIsLowDOS-$01 ; byte
|
||||
gIsInfocom18 = gIsBaudville-$01 ; byte
|
||||
;gIs13Sector is a special case whose ID is not in the regular inspection path
|
||||
gIs13Sector = gIsInfocom18-$01 ; byte
|
||||
;gMECCFastloadType is a special case integer whose default value cannot be #FALSE
|
||||
|
39
src/id/baudville.a
Normal file
39
src/id/baudville.a
Normal file
@ -0,0 +1,39 @@
|
||||
;-------------------------------
|
||||
; IDBaudville
|
||||
; identify Baudville bootloader
|
||||
;
|
||||
; in: track buffer contains T00,S00
|
||||
; out: C clear if Baudville bootloader found
|
||||
; C set otherwise
|
||||
; all other registers & flags clobbered
|
||||
;-------------------------------
|
||||
!macro IDBaudville {
|
||||
; variation 1
|
||||
; - Blazing Paddles rev. 0
|
||||
; - Blazing Paddles v04421
|
||||
; - Blazing Paddles v04431
|
||||
; - Pixit v01331
|
||||
lda #$00
|
||||
ldx #$15
|
||||
jsr compare3
|
||||
!byte $18,$AD,$4A
|
||||
bcc + ; passport-test-suite/Blazing Paddles.woz [C=0] matches
|
||||
; variation 2
|
||||
; - Guitar Wizard v11601
|
||||
; - Prince v15521
|
||||
; - Prince v15531
|
||||
; - Rainy Day Games v13501
|
||||
; - Ski Crazed v28701
|
||||
; - Take 1 v06431
|
||||
; - Take 1 v06451
|
||||
; - Video Vegas v12501
|
||||
; - Video Vegas v12511
|
||||
lda #BASEPAGE
|
||||
ldy #$05
|
||||
jsr SearchSector
|
||||
!byte $48
|
||||
!byte $AD,$01,$E0
|
||||
!byte $48
|
||||
; passport-test-suite/Take 1.woz [C=0] matches
|
||||
+
|
||||
}
|
@ -339,6 +339,17 @@ IDBootloader
|
||||
jmp foundadvent
|
||||
.notInterplay
|
||||
;
|
||||
; Try to identify Baudville bootloader.
|
||||
; (in none; out none)
|
||||
;
|
||||
+IDBaudville
|
||||
bcs .notBaudville
|
||||
jsr PrintByID
|
||||
!byte s_baudville
|
||||
lda #TRUE
|
||||
sta gIsBaudville
|
||||
.notBaudville
|
||||
;
|
||||
; Try to detect whether there is code in the boot sector
|
||||
; that loads 4-and-4-encoded data. This is an early escape
|
||||
; hatch for disks that will fail later anyway.
|
||||
|
@ -95,6 +95,7 @@ T00_IsNotRWTS
|
||||
!source "../patchers/t00_rdos13.a"
|
||||
!source "../patchers/t00_rol1e.a"
|
||||
!source "../patchers/t00_sigcheck.a"
|
||||
!source "../patchers/t00_baudville.a"
|
||||
rts
|
||||
|
||||
!if * > $3200 {
|
||||
|
@ -71,6 +71,7 @@ NonRelocatable
|
||||
!source "id/volumename.a"
|
||||
!source "id/dinkeydos.a"
|
||||
!source "id/advent.a"
|
||||
!source "id/baudville.a"
|
||||
!source "id/panglosdos.a"
|
||||
!source "id/davidson.a"
|
||||
!source "id/holle.a"
|
||||
|
75
src/patchers/t00_baudville.a
Normal file
75
src/patchers/t00_baudville.a
Normal file
@ -0,0 +1,75 @@
|
||||
;-------------------------------
|
||||
; #BAUDVILLE
|
||||
; track sync and hidden sector checks
|
||||
;
|
||||
; tested on
|
||||
; - Blazing Paddles rev. 0
|
||||
; - Blazing Paddles v04421
|
||||
; - Blazing Paddles v04431
|
||||
; - Guitar Wizard v11601
|
||||
; - Pixit v01331
|
||||
; - Prince v15521
|
||||
; - Prince v15531
|
||||
; - Rainy Day Games v13501
|
||||
; - Ski Crazed v28701
|
||||
; - Take 1 v06431
|
||||
; - Take 1 v06451
|
||||
; - Video Vegas v12501
|
||||
; - Video Vegas v12511
|
||||
;-------------------------------
|
||||
!zone {
|
||||
lda gIsBaudville
|
||||
bne .exit
|
||||
|
||||
;.variation1
|
||||
ldy #$03
|
||||
jsr SearchTrack
|
||||
!byte $4C,$00,$BB
|
||||
bcs .variation2
|
||||
tay ; only continue if we found it in sector 0
|
||||
bne .variation2
|
||||
inx
|
||||
inx
|
||||
jsr modify1
|
||||
!byte $B1 ; JMP $BB00 -> JMP $B100
|
||||
bvc .secondary ; always branches
|
||||
|
||||
.variation2
|
||||
lda #$06
|
||||
ldx #$00
|
||||
jsr compare2
|
||||
!byte $E0,$02
|
||||
bcs .secondary
|
||||
|
||||
ldy #$04
|
||||
jsr SearchTrack
|
||||
!byte $A5,$2B
|
||||
!byte $8D,$D0
|
||||
bcs .secondary
|
||||
cmp #$06 ; only continue if we found it in sector 6
|
||||
bne .secondary
|
||||
dex
|
||||
stx @offset
|
||||
ldx #$01
|
||||
jsr modify1 ; change entry point to first instruction after protection
|
||||
@offset !byte $FD ; SMC
|
||||
; /!\ execution falls through here
|
||||
|
||||
.secondary
|
||||
lda #$0F
|
||||
ldx #$04
|
||||
ldy #$06
|
||||
jsr compare
|
||||
!byte $A5,$2D
|
||||
!byte $C9,$FF
|
||||
!byte $D0,$F7
|
||||
bcs .exit
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
inx
|
||||
jsr modify1
|
||||
!byte $00 ; branch back -> branch to next instruction (i.e. ignore)
|
||||
.exit
|
||||
}
|
@ -211,6 +211,7 @@ StringTableLow ; must be kept in sync with constants in enid.a
|
||||
!byte <.erasingserialnumber
|
||||
!byte <.lockitupserial
|
||||
!byte <.protection
|
||||
!byte <.baudville
|
||||
|
||||
StringTableHigh ; must be kept in sync with constants in enid.a
|
||||
!byte >.header
|
||||
@ -361,11 +362,12 @@ StringTableHigh ; must be kept in sync with constants in enid.a
|
||||
!byte >.erasingserialnumber
|
||||
!byte >.lockitupserial
|
||||
!byte >.protection
|
||||
!byte >.baudville
|
||||
|
||||
.passport
|
||||
!text "Passport ",$00
|
||||
.header
|
||||
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2022-06-12",$00
|
||||
!text "@",s_passport,"by 4am@",s_space7,"@",s_space7," 2022-06-24",$00
|
||||
.bar9
|
||||
!text "_________",$00
|
||||
.bar18
|
||||
@ -748,3 +750,5 @@ StringTableHigh ; must be kept in sync with constants in enid.a
|
||||
!text "@",s_found,"RW18-sector format",$8D,$00
|
||||
.x555
|
||||
!text "@",s_found,"5-5-5 spiral @",s_bootloader,$8D,$00
|
||||
.baudville
|
||||
!text "@",s_found,"Baudville @",s_bootloader,$8D,$00
|
||||
|
@ -149,3 +149,4 @@ s_555 = $90
|
||||
s_erasingserialnumber = $91
|
||||
s_lockitupserial = $92
|
||||
s_protection = $93
|
||||
s_baudville = $94
|
||||
|
Loading…
x
Reference in New Issue
Block a user