Beispiel #1
0
void MDDBG_CPUHook(void)	//uint32 PC, uint16 op)
{
 uint32 PC = C68k_Get_PC(&Main68K);
 std::vector<MD_BPOINT>::iterator bpit;

 FoundBPoint = 0;

 for(bpit = BreakPointsPC.begin(); bpit != BreakPointsPC.end(); bpit++)
 {
  if(PC >= bpit->A[0] && PC <= bpit->A[1])
  {
   FoundBPoint = TRUE;
   break;
  }
 }

 if(BPNonPCActive)
 {
  MD_HackyHackyMode++;

  C68k_Copy_State2(&Main68K, &Main68K_BP);

  //printf("Moo: %08x\n", C68k_Get_PC(&Main68K_BP)); //, (int)(((uint8 *)&(Main68K.dirty1)) - ((uint8 *)&(Main68K.D[0]))));

  C68k_Exec(&Main68K_BP);

  MD_HackyHackyMode--;
 }

 if(FoundBPoint)
  BPCallB(PC);

 if(DriverCPUHook)
  DriverCPUHook(PC);
}
Beispiel #2
0
void MDDBG_CPUHook(void)	//uint32 PC, uint16 op)
{
 uint32 PC = Main68K.GetRegister(M68K::GSREG_PC);
 std::vector<MD_BPOINT>::iterator bpit;

 FoundBPoint = 0;

 for(bpit = BreakPointsPC.begin(); bpit != BreakPointsPC.end(); bpit++)
 {
  if(PC >= bpit->A[0] && PC <= bpit->A[1])
  {
   FoundBPoint = true;
   break;
  }
 }

 if(BPNonPCActive)
 {
  Main68K_BP.DupeState(&Main68K);
  Main68K_BP.Step();
 }

 DriverCPUHookContinuous |= FoundBPoint;

 if(DriverCPUHookContinuous && DriverCPUHook)
  DriverCPUHook(PC, FoundBPoint);
}