diff --git a/bin/driver7M5.bin b/bin/driver7M5.bin index 74610c9..caae6e1 100755 Binary files a/bin/driver7M5.bin and b/bin/driver7M5.bin differ diff --git a/bin/rom8M.bin b/bin/rom8M.bin index 7780d1d..3a06a7b 100755 Binary files a/bin/rom8M.bin and b/bin/rom8M.bin differ diff --git a/rdisk.c b/rdisk.c index f75a763..f2e86d0 100644 --- a/rdisk.c +++ b/rdisk.c @@ -53,12 +53,12 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) { } // Switch to 32-bit mode and patch -typedef void (*RDiskPatch_t)(Ptr, long, char); -void __attribute__ ((noinline)) P24(Ptr ramdisk, long index, char patch) { - if (index < 0) { return; } // Don't patch if index < 0 +typedef void (*RDiskPatch_t)(Ptr, char); +#pragma parameter P24(__A0, __D0) +void __attribute__ ((noinline)) P24(Ptr ptr, char patch) { signed char mode = true32b; SwapMMUMode(&mode); - ramdisk[index] = patch; // Patch byte + *ptr = patch; // Patch byte SwapMMUMode(&mode); } @@ -166,8 +166,8 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) { // Patch debug and CD-ROM enable bytes if (c->ramdisk) { RDiskPatch_t fun = P24; - if (!dbgEN) { fun(c->ramdisk, 0x00000031UL, *RDiskDBGDisByte); } - if (!cdrEN) { fun(c->ramdisk, 0x00012CAFUL, 0x44); } + if (!dbgEN /*&& *RDiskDBGDisPos >= 0*/) { fun(c->ramdisk + 0x00000031UL, *RDiskDBGDisByte); } + if (!cdrEN /*&& *RDiskCDRDisPos >= 0*/) { fun(c->ramdisk + 0x00012CAFUL, *RDiskCDRDisByte); } } // Unmount if not booting from ROM disk