From 16fac300e321650eeefbc464b8e294013d3d626e Mon Sep 17 00:00:00 2001 From: 4am Date: Thu, 4 May 2017 20:25:34 -0400 Subject: [PATCH] add support for identifying Diversi-DOS bootloader --- src/id/daviddos.a | 6 +++--- src/id/diversidos.a | 20 ++++++++++++++++++++ src/id/inspect0.a | 5 +++++ src/passport.a | 3 ++- src/strings/en.a | 6 +++++- 5 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 src/id/diversidos.a diff --git a/src/id/daviddos.a b/src/id/daviddos.a index f100b83..2d9f84f 100644 --- a/src/id/daviddos.a +++ b/src/id/daviddos.a @@ -23,9 +23,9 @@ IDDavid 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 $A2,WILDCARD ; LDX #$** + !byte $BD,WILDCARD,$08; LDA $08**,X + !byte $9D,WILDCARD,$04; STA $04**,X !byte $CA ; DEX !byte $10,$F7 ; BPL - .exit rts diff --git a/src/id/diversidos.a b/src/id/diversidos.a new file mode 100644 index 0000000..6cfbede --- /dev/null +++ b/src/id/diversidos.a @@ -0,0 +1,20 @@ +;------------------------------- +; IDDiversiDOS +; identify Diversi-DOS bootloader +; +; in: $0800..$08FF contains T00,S00 +; first page of track buffer also contains T00,S00 +; out: C clear if Diversi-DOS bootloader found +; C set otherwise +; all registers clobbered +; all other flags clobbered +;------------------------------- +!zone { +IDDiversiDOS + lda #$00 + ldx #$F1 + ldy #$0B + jsr compare ; if T00,S00,$F1 == + !byte $B3,$A3,$A0,$D2,$CF,$D2,$D2,$C5,$8D,$87,$8D + rts +} diff --git a/src/id/inspect0.a b/src/id/inspect0.a index 72d2602..6945b62 100755 --- a/src/id/inspect0.a +++ b/src/id/inspect0.a @@ -51,7 +51,12 @@ IDBootloader bcs + lda #TRUE sta gIsBoot0 + jsr IDDiversiDOS + bcc .diversi lda #s_dosb0 + !byte $2c +.diversi + lda #s_diversidos jsr PrintByID jmp TraceDOS33 ; diff --git a/src/passport.a b/src/passport.a index 1a73b04..9e8340e 100755 --- a/src/passport.a +++ b/src/passport.a @@ -94,7 +94,7 @@ flag = $FF ; byte } ; Application constants (not zero addresses) -RELBASE = $6400 ; address to move Passport code +RELBASE = $6300 ; address to move Passport code ; so that it's out of the way LOWPOINT = $4300 ; lowest available address for code BASEPAGE = $10 ; Special Delivery tracer assumes @@ -155,6 +155,7 @@ FirstMover !source "id/milliken.a" !source "id/daviddos.a" !source "id/quickdos.a" + !source "id/diversidos.a" !source "print.a" !source "compare.a" !source "modify.a" diff --git a/src/strings/en.a b/src/strings/en.a index 9f0a00c..bb5d159 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -94,7 +94,8 @@ s_milliken = $4B s_jsr8b3 = $4C s_daviddos = $4D s_quickdos = $4E -STRINGCOUNT = $4F +s_diversidos = $4F +STRINGCOUNT = $50 !zone { StringTable @@ -177,6 +178,7 @@ StringTable !word .jsr8b3 !word .daviddos !word .quickdos + !word .diversidos ; ; Text can contain substitution strings, which ; are replaced by current values at runtime. Each @@ -449,4 +451,6 @@ StringTable !text "T00,S00 Found David-DOS bootloader",$8D,00 .quickdos !text "T00,S00 Found Quick-DOS bootloader",$8D,00 +.diversidos + !text "T00,S00 Found Diversi-DOS bootloader",$8D,00 }