mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2024-09-27 13:55:02 +00:00
Fix incomplete format bug
Now zeroes 32760 bytes at the beginning of volume
This commit is contained in:
parent
9044d3d12c
commit
56f233917c
Binary file not shown.
BIN
bin/rom8M.bin
BIN
bin/rom8M.bin
Binary file not shown.
10
rdisk.c
10
rdisk.c
@ -275,9 +275,13 @@ OSErr RDCtl(CntrlParamPtr p, DCtlPtr d) {
|
||||
case kFormat:
|
||||
if (!c->status.diskInPlace || c->status.writeProt ||
|
||||
!c->ramdisk) { return controlErr; }
|
||||
long long zero = 0;
|
||||
if (*MMU32bit) { copy24(c->ramdisk, (Ptr)(&zero), sizeof(zero)); }
|
||||
else { copy24(c->ramdisk, StripAddress((Ptr)(&zero)), sizeof(zero)); }
|
||||
long long z = 0;
|
||||
Ptr pz;
|
||||
if (*MMU32bit) { p = (Ptr)&z; }
|
||||
else { StripAddress((Ptr)&z); }
|
||||
for (int i = 0; i < 4095; i++) {
|
||||
copy24(c->ramdisk + i * sizeof(z), pz, sizeof(z));
|
||||
}
|
||||
return noErr;
|
||||
case kVerify:
|
||||
if (!c->status.diskInPlace) { return controlErr; }
|
||||
|
Loading…
Reference in New Issue
Block a user