Fix RAM disk always patched, even if cdrEN or dbgEN

This commit is contained in:
Zane Kaminski 2021-04-02 21:07:16 -04:00
parent 4b1db5839d
commit 43f3c37f99
3 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

View File

@ -186,14 +186,14 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) {
peek24L((long*)0x40851D9C, c->cdrDisPos); peek24L((long*)0x40851D9C, c->cdrDisPos);
// Patch // Patch
if (c->dbgDisPos < RDiskSize) { if (c->dbgDisPos < RDiskSize) {
if (c->ramdisk) { poke24(c->ramdisk + c->dbgDisPos, c->dbgDisByte); } if (c->ramdisk && !dbgEN) { poke24(c->ramdisk + c->dbgDisPos, c->dbgDisByte); }
else { peek24(dbgEN ? else { peek24(dbgEN ?
RDiskBuf + c->dbgDisPos : RDiskBuf + c->dbgDisPos :
(char*)0x40851DA8, c->dbgDisByte); (char*)0x40851DA8, c->dbgDisByte);
} }
} }
if (c->dbgDisPos < RDiskSize) { if (c->dbgDisPos < RDiskSize) {
if (c->ramdisk) { poke24(c->ramdisk + c->cdrDisPos, c->cdrDisByte); } if (c->ramdisk && !cdrEN) { poke24(c->ramdisk + c->cdrDisPos, c->cdrDisByte); }
else { peek24(cdrEN ? else { peek24(cdrEN ?
RDiskBuf + c->cdrDisPos : RDiskBuf + c->cdrDisPos :
(char*)0x40851DA9, c->cdrDisByte); (char*)0x40851DA9, c->cdrDisByte);