Break in P24

This commit is contained in:
Zane Kaminski 2021-04-02 02:26:34 -04:00
parent 1ec1268e97
commit 5c5a6a97b7
4 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ obj/entry_rel.sym: obj obj/entry.o
obj/rdisk7M5.o: rdisk.c obj
$(CC) -Wall -DRDiskSize=7864320 -c -Os $< -o $@
$(CC) -Wall -DRDiskSize=7864320 -march=68030 -c -Os $< -o $@
obj/rdisk7M5.s: obj obj/rdisk7M5.o
$(OBJDUMP) -d obj/rdisk7M5.o > $@

Binary file not shown.

Binary file not shown.

View File

@ -57,6 +57,7 @@ void C24(Ptr sourcePtr, Ptr destPtr, unsigned long byteCount) {
void __attribute__ ((noinline)) P24(Ptr ptr, Ptr patch) {
signed char mode = true32b;
SwapMMUMode(&mode);
DebugStr("\phello");
*ptr = *patch; // Patch byte
SwapMMUMode(&mode);
}
@ -236,8 +237,8 @@ OSErr RDCtl(CntrlParamPtr p, DCtlPtr d) {
if (!c->status.diskInPlace || c->status.writeProt ||
!c->ramdisk) { return controlErr; }
long long zero = 0;
if (*MMU32bit) { copy24(c->ramdisk, &zero, sizeof(zero)); }
else { copy24(c->ramdisk, StripAddress(&zero), sizeof(zero)); }
if (*MMU32bit) { copy24(c->ramdisk, (Ptr)(&zero), sizeof(zero)); }
else { copy24(c->ramdisk, StripAddress((Ptr)(&zero)), sizeof(zero)); }
return noErr;
case kVerify:
if (!c->status.diskInPlace) { return controlErr; }