From bcb432cec5417fd74a96814e103d2e5cd4613745 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Sun, 12 Jul 2020 10:19:29 -0700 Subject: [PATCH] don't crash on SVE DOS (#99) * simplify build * don't crash on SVE DOS --- src/analyze.a | 20 ++++++++++++++++++++ src/passport.a | 9 +++++++++ src/strings/en.a | 6 +++++- src/strings/enid.a | 3 ++- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/analyze.a b/src/analyze.a index 241ac32..f6febbe 100755 --- a/src/analyze.a +++ b/src/analyze.a @@ -476,3 +476,23 @@ IsEATrack6 sbc #5 cmp #1 + rts + +;------------------------------- +; xSVE +; check if disk has SVE bootloader +; which has a hook in the RWTS +; +; in: $0800..$08FF contains boot0 +; $B600..$BFFF contains boot1 +; out: C clear if SVE bootloader was found +; C set otherwise +;------------------------------- +!zone { +xSVE + lda #$BE + ldx #$5A + ldy #$03 + jsr CompareMemory + !byte $4C,$71,$A9 + rts +} diff --git a/src/passport.a b/src/passport.a index 3274323..48f4bf3 100755 --- a/src/passport.a +++ b/src/passport.a @@ -294,6 +294,15 @@ ADStyle lda #s_optimum jsr PrintByID .noOptimum + jsr xSVE + bcs .noSVE + lda #s_sve + jsr PrintByID + lda #$CA + sta $BE5B + lda #$B6 + sta $BE5C +.noSVE jsr xB660 jsr xB4BB jmp ReadWithRWTS diff --git a/src/strings/en.a b/src/strings/en.a index 859f333..7cf87ac 100755 --- a/src/strings/en.a +++ b/src/strings/en.a @@ -135,6 +135,7 @@ StringTableLow !byte <.e7everywhere !byte <.choplifter !byte <.pdi + !byte <.sve StringTableHigh !byte >.header @@ -256,6 +257,7 @@ StringTableHigh !byte >.e7everywhere !byte >.choplifter !byte >.pdi + !byte >.sve ; ; Text can contain substitution strings, which @@ -282,7 +284,7 @@ StringTableHigh ; can be set directly before calling PrintByID. ; .header - !text "Passport by 4am 2020-07-02",$00 + !text "Passport by 4am 2020-07-12",$00 .mainmenu !text "________________________________________",$8D,$8D,$8D,$8D,$8D,$8D,$8D,$8D !text " " @@ -611,4 +613,6 @@ StringTableHigh !text "Roland was here, but he left...",$8D,$00 .pdi !text "T%t,S%0 Found PDI protection check",$8D,$00 +.sve + !text "T%t,S%0 Found SVE protection check",$8D,$00 } diff --git a/src/strings/enid.a b/src/strings/enid.a index d4c0a20..839089b 100644 --- a/src/strings/enid.a +++ b/src/strings/enid.a @@ -121,4 +121,5 @@ s_diskvol0 = $73 s_e7everywhere=$74 s_choplifter = $75 s_pdi = $76 -STRINGCOUNT = $77 +s_sve = $77 +STRINGCOUNT = $78