Try again with the P24(...) arg data size fixed

This commit is contained in:
Zane Kaminski 2021-04-01 22:58:15 -04:00
parent 760e80d68d
commit 5a3dd927b8
4 changed files with 9 additions and 9 deletions

Binary file not shown.

Binary file not shown.

16
rdisk.c
View File

@ -53,19 +53,19 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
}
// Switch to 32-bit mode and patch
void P24(Ptr romdisk, long index, char patch) {
//if (index < 0) { return; } // Don't patch if index < 0
void P24(Ptr ramdisk, long index, char patch) {
if (index < 0) { return; } // Don't patch if index < 0
signed char mode = true32b;
SwapMMUMode(&mode);
romdisk[index] = patch; // Patch byte
ramdisk[index] = patch; // Patch byte
SwapMMUMode(&mode);
}
typedef void (*RDiskPatch_t)(Ptr, char, char);
static void patch24(Ptr romdisk, char dbgEN, char cdrEN) {
RDiskPatch_t fun = (RDiskPatch_t)P24;
/*if (!dbgEN)*/ { fun(romdisk, 0x00000031UL, 0x44); }
/*if (!cdrEN)*/ { fun(romdisk, 0x00012CAFUL, 0x44); }
typedef void (*RDiskPatch_t)(Ptr, long, char);
static void patch24(Ptr ramdisk, char dbgEN, char cdrEN) {
RDiskPatch_t fun = P24;
/*if (!dbgEN)*/ { fun(ramdisk, 0x00000031UL, 0x44); }
/*if (!cdrEN)*/ { fun(ramdisk, 0x00012CAFUL, 0x44); }
}
// Figure out the first available drive number >= 5

View File

@ -33,7 +33,7 @@ typedef struct RDiskStorage_s {
} RDiskStorage_t;
typedef void (*RDiskCopy_t)(Ptr, Ptr, unsigned long);
#define copy24(s, d, b) { RDiskCopy_t copy24 = (RDiskCopy_t)C24; copy24(s, d, b); }
#define copy24(s, d, b) { RDiskCopy_t copy24 = C24; copy24(s, d, b); }
#define PackBits_Repeat(count) (-1 * (count - 1))
#define PackBits_Literal(count) (count - 1)