750 |
|
const uint32 pc = cpu->pc(); |
751 |
|
|
752 |
|
// Fault in Mac ROM or RAM? |
753 |
< |
bool mac_fault = (pc >= ROM_BASE) && (pc < (ROM_BASE + ROM_AREA_SIZE)) || (pc >= RAMBase) && (pc < (RAMBase + RAMSize)) || (pc >= DR_CACHE_BASE && pc < (DR_CACHE_BASE + DR_CACHE_SIZE)); |
753 |
> |
bool mac_fault = (pc >= ROMBase) && (pc < (ROMBase + ROM_AREA_SIZE)) || (pc >= RAMBase) && (pc < (RAMBase + RAMSize)) || (pc >= DR_CACHE_BASE && pc < (DR_CACHE_BASE + DR_CACHE_SIZE)); |
754 |
|
if (mac_fault) { |
755 |
|
|
756 |
|
// "VM settings" during MacOS 8 installation |
757 |
< |
if (pc == ROM_BASE + 0x488160 && cpu->gpr(20) == 0xf8000000) |
757 |
> |
if (pc == ROMBase + 0x488160 && cpu->gpr(20) == 0xf8000000) |
758 |
|
return SIGSEGV_RETURN_SKIP_INSTRUCTION; |
759 |
|
|
760 |
|
// MacOS 8.5 installation |
761 |
< |
else if (pc == ROM_BASE + 0x488140 && cpu->gpr(16) == 0xf8000000) |
761 |
> |
else if (pc == ROMBase + 0x488140 && cpu->gpr(16) == 0xf8000000) |
762 |
|
return SIGSEGV_RETURN_SKIP_INSTRUCTION; |
763 |
|
|
764 |
|
// MacOS 8 serial drivers on startup |
765 |
< |
else if (pc == ROM_BASE + 0x48e080 && (cpu->gpr(8) == 0xf3012002 || cpu->gpr(8) == 0xf3012000)) |
765 |
> |
else if (pc == ROMBase + 0x48e080 && (cpu->gpr(8) == 0xf3012002 || cpu->gpr(8) == 0xf3012000)) |
766 |
|
return SIGSEGV_RETURN_SKIP_INSTRUCTION; |
767 |
|
|
768 |
|
// MacOS 8.1 serial drivers on startup |
769 |
< |
else if (pc == ROM_BASE + 0x48c5e0 && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000)) |
769 |
> |
else if (pc == ROMBase + 0x48c5e0 && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000)) |
770 |
|
return SIGSEGV_RETURN_SKIP_INSTRUCTION; |
771 |
< |
else if (pc == ROM_BASE + 0x4a10a0 && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000)) |
771 |
> |
else if (pc == ROMBase + 0x4a10a0 && (cpu->gpr(20) == 0xf3012002 || cpu->gpr(20) == 0xf3012000)) |
772 |
|
return SIGSEGV_RETURN_SKIP_INSTRUCTION; |
773 |
|
|
774 |
|
// MacOS 8.6 serial drivers on startup (with DR Cache and OldWorld ROM) |
807 |
|
|
808 |
|
// Initialize main CPU emulator |
809 |
|
ppc_cpu = new sheepshaver_cpu(); |
810 |
< |
ppc_cpu->set_register(powerpc_registers::GPR(3), any_register((uint32)ROM_BASE + 0x30d000)); |
810 |
> |
ppc_cpu->set_register(powerpc_registers::GPR(3), any_register((uint32)ROMBase + 0x30d000)); |
811 |
|
ppc_cpu->set_register(powerpc_registers::GPR(4), any_register(KernelDataAddr + 0x1000)); |
812 |
|
WriteMacInt32(XLM_RUN_MODE, MODE_68K); |
813 |
|
|
951 |
|
// Execute nanokernel interrupt routine (this will activate the 68k emulator) |
952 |
|
DisableInterrupt(); |
953 |
|
if (ROMType == ROMTYPE_NEWWORLD) |
954 |
< |
ppc_cpu->interrupt(ROM_BASE + 0x312b1c); |
954 |
> |
ppc_cpu->interrupt(ROMBase + 0x312b1c); |
955 |
|
else |
956 |
< |
ppc_cpu->interrupt(ROM_BASE + 0x312a3c); |
956 |
> |
ppc_cpu->interrupt(ROMBase + 0x312a3c); |
957 |
|
} |
958 |
|
break; |
959 |
|
#endif |