mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-09-27 13:55:02 +00:00
Try again with the P24(...) arg data size fixed
This commit is contained in:
parent
760e80d68d
commit
5a3dd927b8
Binary file not shown.
BIN
bin/rom8M.bin
BIN
bin/rom8M.bin
Binary file not shown.
16
rdisk.c
16
rdisk.c
@ -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
|
||||
|
2
rdisk.h
2
rdisk.h
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user