Skip to content

Commit 491d20d

Browse files
committed
Large MMB Support: Take acount of DBASE setting when reading/writeing default drive mappings
Change-Id: I4b348fc01da248d4d37953d9aca735e722a56b50
1 parent c6a7f46 commit 491d20d

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

MMC.asm

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -745,13 +745,7 @@ IF NOT(_MM32_)
745745
IF _DONBOOT_
746746
LDX #&03
747747
.loop
748-
\\ Load the first sector of the disk table
749-
TXA
750-
PHA
751-
LDA #&00
752-
JSR LoadDiskTable \\ Corrupts A, X, Y
753-
PLA
754-
TAX
748+
JSR LoadBaseSector
755749
\\ Copy the drive mapping from the disk table to &B8/B9
756750
LDA MA+&0E00, X
757751
STA &B8
@@ -760,6 +754,20 @@ IF _DONBOOT_
760754
JSR LoadDriveX
761755
DEX
762756
BPL loop
757+
RTS
758+
}
759+
\\ Load the first sector of the disk table, taking account of chunk base
760+
.LoadBaseSector
761+
{
762+
TXA
763+
PHA
764+
LDA CHUNK_BASE
765+
DO_ASLA_X4
766+
JSR LoadDiskTable \\ Corrupts A, X, Y
767+
PLA
768+
TAX
769+
RTS
770+
}
763771
ELSE
764772
LDA #0
765773
STA &B9
@@ -769,9 +777,9 @@ ELSE
769777
JSR LoadDriveX
770778
DEX
771779
BPL loop
772-
ENDIF
773780
RTS
774781
}
782+
ENDIF
775783
ENDIF
776784

777785
\\ If sector 0 set, check it's the same card

mmfs100.asm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8168,8 +8168,7 @@ IF _INCLUDE_CMD_DONBOOT_
81688168
.CMD_DONBOOT
81698169
JSR Param_DriveAndDisk
81708170
\\ Exit: CurrentDrv=drive, Word &B8=disk no.
8171-
LDA #0
8172-
JSR LoadDiskTable
8171+
JSR LoadBaseSector
81738172
LDX CurrentDrv
81748173
LDA &B8
81758174
STA MA+&0E00, X

0 commit comments

Comments
 (0)