ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp
(Generate patch)

Comparing SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp (file contents):
Revision 1.75 by gbeauche, 2008-01-01T09:47:39Z vs.
Revision 1.76 by asvitkine, 2009-08-18T18:26:11Z

# Line 750 | Line 750 | sigsegv_return_t sigsegv_handler(sigsegv
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)
# Line 807 | Line 807 | void init_emul_ppc(void)
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  
# Line 951 | Line 951 | void HandleInterrupt(powerpc_registers *
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines