support SSI disk utilities

This commit is contained in:
Peter Ferrie 2018-09-27 14:26:08 -07:00
parent 2d9e23c65d
commit 4ab8e0c4d9
2 changed files with 39 additions and 0 deletions

View File

@ -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

38
src/patchers/rdosfmt.a Normal file
View File

@ -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
}