mirror of
https://github.com/a2-4am/passport.git
synced 2025-02-08 02:30:56 +00:00
add support for David-DOS bootloader (log only)
This commit is contained in:
parent
74cc71b644
commit
8a89f62674
32
src/id/daviddos.a
Normal file
32
src/id/daviddos.a
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
;-------------------------------
|
||||||
|
; IDDavid
|
||||||
|
; identify David-DOS bootloader
|
||||||
|
;
|
||||||
|
; in: $0800..$08FF contains T00,S00
|
||||||
|
; first page of track buffer also contains T00,S00
|
||||||
|
; out: C clear if David-DOS bootloader found
|
||||||
|
; C set otherwise
|
||||||
|
; all registers clobbered
|
||||||
|
; all other flags clobbered
|
||||||
|
;-------------------------------
|
||||||
|
!zone {
|
||||||
|
IDDavid
|
||||||
|
lda #$00
|
||||||
|
ldx #$01
|
||||||
|
ldy #$06
|
||||||
|
jsr compare ; if T00,S00,$01 ==
|
||||||
|
!byte $A5,$27 ; LDA $27
|
||||||
|
!byte $C9,$09 ; CMP #$09
|
||||||
|
!byte $D0,$17 ; BNE +$17
|
||||||
|
bcs .exit
|
||||||
|
lda #$00
|
||||||
|
ldx #$4A
|
||||||
|
ldy #$0B
|
||||||
|
jsr compare ; and T00,S00,$4A ==
|
||||||
|
!byte $A2,$0D ; LDX #$0D
|
||||||
|
!byte $BD,$B9,$08; LDA $08B9,X
|
||||||
|
!byte $9D,$0D,$04; STA $040D,X
|
||||||
|
!byte $CA ; DEX
|
||||||
|
!byte $10,$F7 ; BPL -
|
||||||
|
.exit rts
|
||||||
|
}
|
@ -240,6 +240,16 @@ IDBootloader
|
|||||||
jmp foundea
|
jmp foundea
|
||||||
|
|
||||||
.notea
|
.notea
|
||||||
|
;
|
||||||
|
; Try to identify David-DOS bootloader
|
||||||
|
; (no special behavior for now because all samples I have are
|
||||||
|
; handled by built-in RWTS, so no need to trace)
|
||||||
|
;
|
||||||
|
jsr IDDavid
|
||||||
|
bcs .notdavid
|
||||||
|
lda #s_daviddos
|
||||||
|
jsr PrintByID
|
||||||
|
.notdavid
|
||||||
.useuniv
|
.useuniv
|
||||||
;
|
;
|
||||||
; We didn't recognize the boot sector, so use the universal
|
; We didn't recognize the boot sector, so use the universal
|
||||||
|
@ -151,6 +151,7 @@ FirstMover
|
|||||||
!source "id/encode53.a"
|
!source "id/encode53.a"
|
||||||
!source "id/ea.a"
|
!source "id/ea.a"
|
||||||
!source "id/milliken.a"
|
!source "id/milliken.a"
|
||||||
|
!source "id/daviddos.a"
|
||||||
!source "print.a"
|
!source "print.a"
|
||||||
!source "compare.a"
|
!source "compare.a"
|
||||||
!source "modify.a"
|
!source "modify.a"
|
||||||
|
@ -92,7 +92,8 @@ s_poke = $49
|
|||||||
s_bootcounter = $4A
|
s_bootcounter = $4A
|
||||||
s_milliken = $4B
|
s_milliken = $4B
|
||||||
s_jsr8b3 = $4C
|
s_jsr8b3 = $4C
|
||||||
STRINGCOUNT = $4D
|
s_daviddos = $4D
|
||||||
|
STRINGCOUNT = $4E
|
||||||
|
|
||||||
!zone {
|
!zone {
|
||||||
StringTable
|
StringTable
|
||||||
@ -173,6 +174,7 @@ StringTable
|
|||||||
!word .bootcounter
|
!word .bootcounter
|
||||||
!word .milliken
|
!word .milliken
|
||||||
!word .jsr8b3
|
!word .jsr8b3
|
||||||
|
!word .daviddos
|
||||||
;
|
;
|
||||||
; Text can contain substitution strings, which
|
; Text can contain substitution strings, which
|
||||||
; are replaced by current values at runtime. Each
|
; are replaced by current values at runtime. Each
|
||||||
@ -198,7 +200,7 @@ StringTable
|
|||||||
; can be set directly before calling PrintByID.
|
; can be set directly before calling PrintByID.
|
||||||
;
|
;
|
||||||
.header
|
.header
|
||||||
!text "Passport by 4am 2017-05-01",00
|
!text "Passport by 4am 2017-05-04",00
|
||||||
.mainmenu
|
.mainmenu
|
||||||
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
|
||||||
!text " "
|
!text " "
|
||||||
@ -441,4 +443,6 @@ StringTable
|
|||||||
!text "T02,S05 might be unreadable",$8D,00
|
!text "T02,S05 might be unreadable",$8D,00
|
||||||
.jsr8b3
|
.jsr8b3
|
||||||
!text "T00,S00 Found JSR $08B3 bootloader",$8D,00
|
!text "T00,S00 Found JSR $08B3 bootloader",$8D,00
|
||||||
|
.daviddos
|
||||||
|
!text "T00,S00 Found David-DOS bootloader",$8D,00
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user