mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-18 18:05:21 +00:00
Enable DR emulator with OldWorld ROMs too. It turned out that translated
code was also trying to access Serial memory. Note however that I noticed some rare crashes with the DR emulator. Probably caused by nested runs from EmulOps? We'd really want a native 68k emulator too for Execute68k() things.
This commit is contained in:
parent
7bc86b27ee
commit
a533a9c455
@ -1603,8 +1603,8 @@ static void sigsegv_handler(int sig, siginfo_t *sip, void *scp)
|
||||
|
||||
num_segv++;
|
||||
|
||||
// Fault in Mac ROM or RAM?
|
||||
bool mac_fault = (r->pc() >= ROM_BASE) && (r->pc() < (ROM_BASE + ROM_AREA_SIZE)) || (r->pc() >= RAMBase) && (r->pc() < (RAMBase + RAMSize));
|
||||
// Fault in Mac ROM or RAM or DR Cache?
|
||||
bool mac_fault = (r->pc() >= ROM_BASE) && (r->pc() < (ROM_BASE + ROM_AREA_SIZE)) || (r->pc() >= RAMBase) && (r->pc() < (RAMBase + RAMSize)) || (r->pc() >= DR_CACHE_BASE && r->pc() < (DR_CACHE_BASE + DR_CACHE_SIZE));
|
||||
if (mac_fault) {
|
||||
|
||||
// "VM settings" during MacOS 8 installation
|
||||
@ -1632,6 +1632,14 @@ static void sigsegv_handler(int sig, siginfo_t *sip, void *scp)
|
||||
} else if (r->pc() == ROM_BASE + 0x4a10a0 && (r->gpr(20) == 0xf3012002 || r->gpr(20) == 0xf3012000)) {
|
||||
r->pc() += 4;
|
||||
return;
|
||||
|
||||
// MacOS 8.6 serial drivers on startup (with DR Cache and OldWorld ROM)
|
||||
} else if ((r->pc() - DR_CACHE_BASE) < DR_CACHE_SIZE && (r->gpr(16) == 0xf3012002 || r->gpr(16) == 0xf3012000)) {
|
||||
r->pc() += 4;
|
||||
return;
|
||||
} else if ((r->pc() - DR_CACHE_BASE) < DR_CACHE_SIZE && (r->gpr(20) == 0xf3012002 || r->gpr(20) == 0xf3012000)) {
|
||||
r->pc() += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
// Get opcode and divide into fields
|
||||
|
@ -288,8 +288,8 @@ void EmulOp(M68kRegisters *r, uint32 pc, int selector)
|
||||
MacOSUtilReset();
|
||||
AudioReset();
|
||||
|
||||
// Enable DR emulator from NewWorld ROMs
|
||||
if (ROMType == ROMTYPE_NEWWORLD) {
|
||||
// Enable DR emulator
|
||||
if (1) {
|
||||
D(bug("DR activated\n"));
|
||||
WriteMacInt32(KernelDataAddr + 0x17a0, 3); // Prepare for DR emulator activation
|
||||
WriteMacInt32(KernelDataAddr + 0x17c0, DR_CACHE_BASE);
|
||||
|
Loading…
Reference in New Issue
Block a user