add support for David-DOS bootloader (log only)

This commit is contained in:
4am 2017-05-04 09:42:48 -04:00
parent 74cc71b644
commit 8a89f62674
4 changed files with 49 additions and 2 deletions

32
src/id/daviddos.a Normal file
View 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
}

View File

@ -240,6 +240,16 @@ IDBootloader
jmp foundea
.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
;
; We didn't recognize the boot sector, so use the universal

View File

@ -151,6 +151,7 @@ FirstMover
!source "id/encode53.a"
!source "id/ea.a"
!source "id/milliken.a"
!source "id/daviddos.a"
!source "print.a"
!source "compare.a"
!source "modify.a"

View File

@ -92,7 +92,8 @@ s_poke = $49
s_bootcounter = $4A
s_milliken = $4B
s_jsr8b3 = $4C
STRINGCOUNT = $4D
s_daviddos = $4D
STRINGCOUNT = $4E
!zone {
StringTable
@ -173,6 +174,7 @@ StringTable
!word .bootcounter
!word .milliken
!word .jsr8b3
!word .daviddos
;
; Text can contain substitution strings, which
; are replaced by current values at runtime. Each
@ -198,7 +200,7 @@ StringTable
; can be set directly before calling PrintByID.
;
.header
!text "Passport by 4am 2017-05-01",00
!text "Passport by 4am 2017-05-04",00
.mainmenu
!text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D
!text " "
@ -441,4 +443,6 @@ StringTable
!text "T02,S05 might be unreadable",$8D,00
.jsr8b3
!text "T00,S00 Found JSR $08B3 bootloader",$8D,00
.daviddos
!text "T00,S00 Found David-DOS bootloader",$8D,00
}