From 2d9e23c65da3e0a61d88748f14d22f0ac4d4a140 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Thu, 27 Sep 2018 14:00:11 -0700 Subject: [PATCH 1/2] a bit quieter, fix write support --- src/patchers/rdos13.a | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/patchers/rdos13.a b/src/patchers/rdos13.a index 3ef1dcb..8f043f8 100644 --- a/src/patchers/rdos13.a +++ b/src/patchers/rdos13.a @@ -30,38 +30,33 @@ !byte $48 ;PHA !byte $68 ;PLA - lda #$0A - ldx #$16 - ldy #1 - jsr modify - !byte $56 + lda #$56 + sta (BASEPAGE * $100) + $9A3 + sta (BASEPAGE * $100) + $A16 - lda #$0A - ldx #$2B - ldy #2 - jsr modify - !byte $23,$B8 + lda #$23 + sta (BASEPAGE * $100) + $A2B + sta (BASEPAGE * $100) + $A3C + sta (BASEPAGE * $100) + $A4C - lda #$0A - ldx #$3C - ldy #2 - jsr modify - !byte $23,$B8 + lda #$B8 + sta (BASEPAGE * $100) + $A2C + sta (BASEPAGE * $100) + $A3D + sta (BASEPAGE * $100) + $A4D - lda #$0A - ldx #$4C - ldy #2 - jsr modify - !byte $23,$B8 - -;enable 16-sector address prologue +;enable 16-sector address prologue as needed lda #$0A ldx #$75 ldy #2 + jsr compare + !byte $C9,$D5 ;CMP #$D5 + bcc + + ldy #2 jsr modify !byte $C9,$D5 ;CMP #$D5 ++ lda #$0A ldx #$8B ldy #1 From 4ab8e0c4d913012beaf986ff905398c501ccf0a2 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Thu, 27 Sep 2018 14:26:08 -0700 Subject: [PATCH 2/2] support SSI disk utilities --- src/passport.a | 1 + src/patchers/rdosfmt.a | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/patchers/rdosfmt.a diff --git a/src/passport.a b/src/passport.a index abd9862..1ebbeb3 100755 --- a/src/passport.a +++ b/src/passport.a @@ -800,6 +800,7 @@ _applyToAll !source "patchers/davidsonforth.a" ; gIsDavidson only !source "patchers/davidsonasm.a" ; gIsDavidson only !source "patchers/ssi.a" ; gIsRDOS13 only + !source "patchers/rdosfmt.a" ; gIsRDOS13 only lda gPatchCount beq .nopatches diff --git a/src/patchers/rdosfmt.a b/src/patchers/rdosfmt.a new file mode 100644 index 0000000..c5a825c --- /dev/null +++ b/src/patchers/rdosfmt.a @@ -0,0 +1,38 @@ +;------------------------------- +; #RDOS format interception +; support disk tools that format 13-sectors +; +; module by qkumba +;------------------------------- +!zone { + bit gMode ; nothing to do here in verify-only mode + bpl .exit + lda gIsRDOS13 + bne .exit + + ldy #$0F + jsr SearchTrack + !byte $A9,$D4 ; LDA #$D4 + !byte $20,$CC,$09; JSR $09CC + !byte $A9,$AA ; LDA #$AA + !byte $20,$CD,$09; JSR $09CD + !byte $A9,$B7 ; LDA #$B7 + !byte $20,$CD,$09; JSR $09CD + bcs .exit + + inx + ldy #1 + jsr modify + !byte $D5 + pha + txa + clc + adc #9 + tax + pla + ldy #1 + jsr modify + !byte $96 + +.exit +}