mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-06-12 07:29:30 +00:00
Just make the patch explicit
This commit is contained in:
parent
266e1a9650
commit
8f8dbc83d5
Binary file not shown.
BIN
bin/rom8M.bin
BIN
bin/rom8M.bin
Binary file not shown.
13
rdisk.c
13
rdisk.c
|
@ -57,21 +57,20 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switch to 32-bit mode and patch
|
// Switch to 32-bit mode and patch
|
||||||
void P24(Ptr dbg, Ptr cdrom, char dbgByte, char cdromByte) {
|
void P24(Ptr romdisk, char dbgByte, char cdromByte) {
|
||||||
signed char mode = true32b;
|
signed char mode = true32b;
|
||||||
SwapMMUMode(&mode);
|
SwapMMUMode(&mode);
|
||||||
// Patch debug and CD-ROM disable bytes
|
// Patch debug and CD-ROM disable bytes
|
||||||
if (dbg) { *dbg = 0x44; }
|
romdisk[0x31] = 0x44;
|
||||||
|
//if (dbg) { *dbg = 0x44; }
|
||||||
//if (cdrom) { *cdrom = 0x44; }
|
//if (cdrom) { *cdrom = 0x44; }
|
||||||
SwapMMUMode(&mode);
|
SwapMMUMode(&mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void (*RDiskPatch_t)(Ptr, Ptr, char, char);
|
typedef void (*RDiskPatch_t)(Ptr, char, char);
|
||||||
static void patch24(Ptr buf, char dbgEN, char cdromEN) {
|
static void patch24(Ptr romdisk, char dbgEN, char cdromEN) {
|
||||||
RDiskPatch_t fun = (RDiskPatch_t)P24;
|
RDiskPatch_t fun = (RDiskPatch_t)P24;
|
||||||
fun(/*dbgEN ?*/ buf + *RDiskDBGDisPos /*: (Ptr)0*/,
|
fun(romdisk, dbgEN, cdromEN);
|
||||||
/*cdromEN ?*/ buf + *RDiskCDROMDisPos /*: (Ptr)0*/,
|
|
||||||
*RDiskDBGDisByte, *RDiskCDROMDisPos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Figure out the first available drive number >= 5
|
// Figure out the first available drive number >= 5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user