Ejemplo n.º 1
0
void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
{
  if (DSPCore_GetState() == DSPCORE_STOP)
    return;

  switch (event.GetId())
  {
  case ID_RUNTOOL:
    if (DSPCore_GetState() == DSPCORE_RUNNING)
      DSPCore_SetState(DSPCORE_STEPPING);
    else
      DSPCore_SetState(DSPCORE_RUNNING);
    break;

  case ID_STEPTOOL:
    if (DSPCore_GetState() == DSPCORE_STEPPING)
    {
      DSPCore_Step();
      Repopulate();
    }
    break;

  case ID_SHOWPCTOOL:
    FocusOnPC();
    break;
  }

  UpdateState();
  m_mgr.Update();
}
Ejemplo n.º 2
0
std::string DSPDebugInterface::GetRawMemoryString(int memory, unsigned int address)
{
  if (DSPCore_GetState() == State::Stopped)
    return "";

  switch (memory)
  {
  case 0:  // IMEM
    switch (address >> 12)
    {
    case 0:
    case 0x8:
      return StringFromFormat("%04x", dsp_imem_read(address));
    default:
      return "--IMEM--";
    }

  case 1:  // DMEM
    switch (address >> 12)
    {
    case 0:
    case 1:
      return StringFromFormat("%04x (DMEM)", dsp_dmem_read(address));
    case 0xf:
      return StringFromFormat("%04x (MMIO)", g_dsp.ifx_regs[address & 0xFF]);
    default:
      return "--DMEM--";
    }
  }

  return "";
}
Ejemplo n.º 3
0
void DSPDebuggerLLE::UpdateState()
{
  if (DSPCore_GetState() == DSPCORE_RUNNING)
  {
    m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Pause"));
    m_Toolbar->SetToolBitmap(
        ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, m_toolbar_item_size));
    m_Toolbar->EnableTool(ID_STEPTOOL, false);
  }
  else
  {
    m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Run"));
    m_Toolbar->SetToolBitmap(
        ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, m_toolbar_item_size));
    m_Toolbar->EnableTool(ID_STEPTOOL, true);
  }
  m_Toolbar->Realize();
}
Ejemplo n.º 4
0
void DSPDebugInterface::GetRawMemoryString(int memory, unsigned int address, char *dest, int max_size)
{
    if (DSPCore_GetState() == DSPCORE_STOP)
    {
        dest[0] = 0;
        return;
    }

    switch (memory)
    {
    case 0:  // IMEM
        switch (address >> 12)
        {
        case 0:
        case 0x8:
            sprintf(dest, "%04x", dsp_imem_read(address));
            break;
        default:
            sprintf(dest, "--IMEM--");
            break;
        }
        break;
    case 1:  // DMEM
        switch (address >> 12)
        {
        case 0:
        case 1:
            sprintf(dest, "%04x (DMEM)", dsp_dmem_read(address));
            break;
        case 0xf:
            sprintf(dest, "%04x (MMIO)", g_dsp.ifx_regs[address & 0xFF]);
            break;
        default:
            sprintf(dest, "--DMEM--");
            break;
        }
        break;
    }
}