diff --git a/src/id/daviddos.a b/src/id/daviddos.a new file mode 100644 index 0000000..f100b83 --- /dev/null +++ b/src/id/daviddos.a @@ -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 +} diff --git a/src/id/inspect0.a b/src/id/inspect0.a index 7b106c9..325d536 100755 --- a/src/id/inspect0.a +++ b/src/id/inspect0.a @@ -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 diff --git a/src/passport.a b/src/passport.a index a82e2b4..f29d306 100755 --- a/src/passport.a +++ b/src/passport.a @@ -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" diff --git a/src/strings/en.a b/src/strings/en.a index d9172f0..946d840 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -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 }