24/32 bit fix in RDInit?
This commit is contained in:
parent
d7b8e2bf9a
commit
40007cfa47
Binary file not shown.
BIN
bin/rom8M.bin
BIN
bin/rom8M.bin
Binary file not shown.
12
rdisk.c
12
rdisk.c
|
@ -126,6 +126,8 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) {
|
|||
c->dbgEN = dbgEN;
|
||||
c->cdromEN = cdromEN;
|
||||
|
||||
char dis = 0x44;
|
||||
|
||||
// If RAM disk enabled, try to allocate RAM disk buffer if not already
|
||||
if (ramEN & !c->ramdisk) {
|
||||
if (*MMU32bit) { // 32-bit mode
|
||||
|
@ -142,6 +144,10 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) {
|
|||
BlockMove(RDiskBuf, c->ramdisk, RDiskSize);
|
||||
// Clearing write protect marks RAM disk enabled
|
||||
c->status.writeProt = 0;
|
||||
|
||||
// Patch debug and CD-ROM enable bytes
|
||||
BlockMove(&dis/*RDiskDBGDisByte*/, &c->ramdisk[*RDiskDBGDisPos], 1);
|
||||
BlockMove(&dis/*RDiskCDROMDisByte*/, &c->ramdisk[*RDiskCDROMDisPos], 1);
|
||||
}
|
||||
} else { // 24-bit mode
|
||||
// Put RAM disk just past 8MB
|
||||
|
@ -154,14 +160,14 @@ static void RDInit(IOParamPtr p, DCtlPtr d, RDiskStorage_t *c) {
|
|||
// Will this wrap around and overwrite low memory?
|
||||
// That's not the worst, since the system would just crash,
|
||||
// but it would be better to switch to read-only status
|
||||
// Patch debug and CD-ROM enable bytes
|
||||
copy24(&dis/*RDiskDBGDisByte*/, &c->ramdisk[*RDiskDBGDisPos], 1);
|
||||
copy24(&dis/*RDiskCDROMDisByte*/, &c->ramdisk[*RDiskCDROMDisPos], 1);
|
||||
}
|
||||
// Patch debug and CD-ROM enable bytes
|
||||
char dis = 0x44;
|
||||
//if (!c->dbgEN) {
|
||||
copy24(&dis/*RDiskDBGDisByte*/, &c->ramdisk[*RDiskDBGDisPos], 1);
|
||||
//}
|
||||
//if (!c->cdromEN) {
|
||||
copy24(&dis/*RDiskCDROMDisByte*/, &c->ramdisk[*RDiskCDROMDisPos], 1);
|
||||
//}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue