示例#1
0
UIDebugM68K::UIDebugM68K( YabauseThread *mYabauseThread, QWidget* p )
	: UIDebugCPU(mYabauseThread, p )
{
   this->setWindowTitle(QtYabause::translate("Debug M68K"));
   gbRegisters->setTitle(QtYabause::translate("M68K Registers"));
	gbMemoryBreakpoints->setVisible( false );

   updateRegList();
   if (SoundRam)
   {
      m68kregs_struct m68kregs;
      const m68kcodebreakpoint_struct *cbp;
      int i;

      cbp = M68KGetBreakpointList();

      for (i = 0; i < MAX_BREAKPOINTS; i++)
      {
         QString text;
         if (cbp[i].addr != 0xFFFFFFFF)
         {
            text.sprintf("%08X", (int)cbp[i].addr);
            lwCodeBreakpoints->addItem(text);
         }
      }

      lwDisassembledCode->setDisassembleFunction(M68KDis);
      lwDisassembledCode->setEndAddress(0x100000);
      lwDisassembledCode->setMinimumInstructionSize(2);
      M68KGetRegisters(&m68kregs);
      updateCodeList(m68kregs.PC);

      M68KSetBreakpointCallBack(M68KBreakpointHandler);
   }
}
示例#2
0
UIDebugSCUDSP::UIDebugSCUDSP( YabauseThread *mYabauseThread, QWidget* p )
	: UIDebugCPU( mYabauseThread, p )
{
   this->setWindowTitle("Debug SCU DSP");
   gbRegisters->setTitle("DSP Registers");
	pbMemoryTransfer->setVisible( false );
	gbMemoryBreakpoints->setVisible( false );

   pbReserved1->setText(QtYabause::translate("Save Program"));
   pbReserved2->setText(QtYabause::translate("Save MD0"));
   pbReserved3->setText(QtYabause::translate("Save MD1"));
   pbReserved4->setText(QtYabause::translate("Save MD2"));
   pbReserved5->setText(QtYabause::translate("Save MD3"));

   pbReserved1->setVisible( true );
   pbReserved2->setVisible( true );
   pbReserved3->setVisible( true );
   pbReserved4->setVisible( true );
   pbReserved5->setVisible( true );

   QSize size = lwRegisters->minimumSize();
   size.setWidth(size.width() + lwRegisters->fontMetrics().averageCharWidth());
   lwRegisters->setMinimumSize(size);

   size = lwDisassembledCode->minimumSize();
   size.setWidth(lwRegisters->fontMetrics().averageCharWidth() * 80);
   lwDisassembledCode->setMinimumSize(size);

   updateRegList();
   if (ScuRegs)
   {
      scudspregs_struct regs;
      const scucodebreakpoint_struct *cbp;
      int i;

      cbp = ScuDspGetBreakpointList();

      for (i = 0; i < MAX_BREAKPOINTS; i++)
      {
         QString text;
         if (cbp[i].addr != 0xFFFFFFFF)
         {
            text.sprintf("%08X", (int)cbp[i].addr);
            lwCodeBreakpoints->addItem(text);
         }
      }

      lwDisassembledCode->setDisassembleFunction(SCUDSPDis);
      lwDisassembledCode->setEndAddress(0x100);
      lwDisassembledCode->setMinimumInstructionSize(1);
      ScuDspGetRegisters(&regs);
      updateCodeList(regs.PC);

      ScuDspSetBreakpointCallBack(SCUDSPBreakpointHandler);
   }
}
示例#3
0
void UIDebugSCUDSP::updateAll()
{
	updateRegList();
	if (ScuRegs)
	{
		scudspregs_struct regs;
		ScuDspGetRegisters(&regs);
		updateCodeList(regs.PC);
	}
}
示例#4
0
void UIDebugSH2::updateAll()
{
   updateRegList();
   if (debugSH2)
   {
      sh2regs_struct sh2regs;

      SH2GetRegisters(debugSH2, &sh2regs);
      updateCodeList(sh2regs.PC);
      updateBackTrace();
      updateTrackInfLoop();
   }
}
示例#5
0
void UIDebugM68K::setRegister(int index, u32 value)
{
   m68kregs_struct m68kregs;

	memset(&m68kregs, 0, sizeof(m68kregs));
	M68KGetRegisters(&m68kregs);

   switch (index)
   {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
         m68kregs.D[index] = value;
         break;
      case 8:
      case 9:
      case 10:
      case 11:
      case 12:
      case 13:
      case 14:
      case 15:
         m68kregs.A[index - 8] = value;
         break;
      case 16:
         m68kregs.SR = value;
         break;
      case 17:
         m68kregs.PC = value;
         updateCodeList(m68kregs.PC);
         break;
      default: break;
   }

   M68KSetRegisters(&m68kregs);
}
示例#6
0
void UIDebugSH2::setRegister(int index, u32 value)
{
   sh2regs_struct sh2regs;

   SH2GetRegisters(debugSH2, &sh2regs);

   if (index < 16)
      sh2regs.R[index] = value;
   else
   {
      switch(index)
      {
         case 16:
            sh2regs.SR.all = value;
            break;
         case 17:
            sh2regs.GBR = value;
            break;
         case 18:
            sh2regs.VBR = value;
            break;
         case 19:
            sh2regs.MACH = value;
            break;
         case 20:
            sh2regs.MACL = value;
            break;
         case 21:
            sh2regs.PR = value;
            break;
         case 22:
            sh2regs.PC = value;
            updateCodeList(sh2regs.PC);
            break;
      }
   }

   SH2SetRegisters(debugSH2, &sh2regs);
}
示例#7
0
void UIDebugCPU::on_lwBackTrace_itemDoubleClicked ( QListWidgetItem * item )
{
   updateCodeList(item->text().toUInt(NULL, 16));
}