From 87dfe233797a85dabdb922ff3d7d88807ed48d41 Mon Sep 17 00:00:00 2001 From: 4am Date: Sun, 10 Sep 2017 20:46:37 -0400 Subject: [PATCH] fixes for universal RWTS (A2) and DOS 3.2 conversions (callrwts clobbered) --- res/universalrwts.org | 3 +-- src/patchers/dos32.a | 32 +++++++++++++++++--------------- src/strings/en.a | 2 +- src/universalrwts.a | 2 +- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/res/universalrwts.org b/res/universalrwts.org index 8381c4c..4d28c66 100644 --- a/res/universalrwts.org +++ b/res/universalrwts.org @@ -18,7 +18,7 @@ ;------------------------------- UNIV_A1 = $B956 ; must LSR before setting -UNIV_A2 = $B95E +UNIV_A2 = $B95F UNIV_A3 = $B968 UNIV_D1 = $B8E7 UNIV_D2 = $B8F1 @@ -160,4 +160,3 @@ nibtableff !byte $C0,$A9,$00,$8D,$00,$E0,$4C,$44,$B7,$00,$00,$00,$8D,$63,$AA,$8D !byte $70,$AA,$8D,$71,$AA,$60,$20,$5B,$A7,$8C,$B7,$AA,$60,$20,$7E,$AE !byte $AE,$9B,$B3,$9A,$20,$16,$A3,$BA,$8E,$9B,$B3,$A9,$09,$4C,$85,$B3 - diff --git a/src/patchers/dos32.a b/src/patchers/dos32.a index b649a02..a72cf88 100644 --- a/src/patchers/dos32.a +++ b/src/patchers/dos32.a @@ -8,6 +8,16 @@ bit gMode ; nothing to do here in verify-only mode bpl .exit +; sector 1 + + lda callrwts+2 + sta .cr+1 + sec + sbc #$06 ; #$B7 or #$37 + ldx #$11 ; #BASEPAGE+1 + ldy #$01 + jsr CopyMemory + ; sectors 2-9 lda #$12 ; #BASEPAGE+2 @@ -18,24 +28,16 @@ lda #s_rwtswrite jsr PrintByID -; sector 1 - - lda callrwts+2 - sec - sbc #$06 ; #$B7 or #$37 - ldx #$11 ; #BASEPAGE+1 - ldy #$01 - jsr CopyMemory - +; If original disk loads boot1 into $B700, Standard Delivery only needs to +; load boot1+RWTS (into $B700..$BFFF) and transfer control to boot1 at $B700. +; ; If original disk loads boot1 into $3700 (and expects the RWTS at $3800), ; we let Standard Delivery load boot1+RWTS+DOS and patch boot1 here so it ; doesn't try to call the RWTS itself. Boot1 will exit via the standard ; relocation routine at $1B03, after which both RWTS and DOS will be -; in higher memory. -; -; This will all fail horribly if the relocation routine decides not to -; relocate (on old Apple II machines with less than 48K), and I have made -; peace with that. +; in higher memory. This will fail horribly if the relocation routine decides +; not to relocate (on old Apple II machines with less than 48K), and I have +; made peace with that. lda #$01 ldx #$38 @@ -50,7 +52,7 @@ ; sector 0 - lda callrwts+2 +.cr lda #$d1 ; set at runtime cmp #$3D beq + lda #