diff --git a/src/gtk/vba.glade b/src/gtk/vba.glade index b2eaa773..ffe7a178 100644 --- a/src/gtk/vba.glade +++ b/src/gtk/vba.glade @@ -1362,56 +1362,6 @@ - - - True - _Tools - True - - - - - True - _GDB - True - - - - - True - _Wait connection... - True - - - - - True - _Load and wait... - True - - - - - True - _Break - True - - - - - True - _Disconnect - True - - - - - - - - - - True diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 5d963e65..91f7a6ba 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -44,15 +44,8 @@ extern int systemRenderedFrames; extern int systemFPS; -extern bool debugger; extern int RGB_LOW_BITS_MASK; -extern void remoteInit(); -extern void remoteCleanUp(); -extern void remoteStubMain(); -extern void remoteStubSignal(int, int); -extern void remoteOutput(const char *, u32); -extern void remoteSetProtocol(int); -extern void remoteSetPort(int); + namespace VBA { @@ -760,26 +753,6 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr & _poXml) : poMI = dynamic_cast(_poXml->get_widget("VideoFullscreen")); poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnVideoFullscreen)); - // GDB menu - // -#ifndef NO_DEBUGGER - poMI = dynamic_cast(_poXml->get_widget("GdbWait")); - poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBWait)); - - poMI = dynamic_cast(_poXml->get_widget("GdbLoadAndWait")); - poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBLoadAndWait)); - - poMI = dynamic_cast(_poXml->get_widget("GdbBreak")); - poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBBreak)); - - poMI = dynamic_cast(_poXml->get_widget("GdbDisconnect")); - poMI->signal_activate().connect(sigc::mem_fun(*this, &Window::vOnGDBDisconnect)); -#else - // Hide the whole Tools menu as it only contains the debugger stuff as of now - poMI = dynamic_cast(_poXml->get_widget("ToolsMenu")); - poMI->hide(); -#endif //NO_DEBUGGER - // Help menu // poMI = dynamic_cast(_poXml->get_widget("HelpAbout")); @@ -879,7 +852,6 @@ void Window::vInitSystem() systemFPS = 0; emulating = 0; - debugger = false; for (int i = 0; i < 0x10000; i++) { @@ -1344,7 +1316,6 @@ bool Window::bLoadROM(const std::string & _rsFile) vLoadBattery(); vUpdateScreen(); - debugger = false; // May cause conflicts emulating = 1; m_bWasEmulating = false; m_uiThrottleDelay = Glib::TimeVal(0, 0); diff --git a/src/gtk/window.h b/src/gtk/window.h index d97b8320..43e6e662 100644 --- a/src/gtk/window.h +++ b/src/gtk/window.h @@ -167,12 +167,6 @@ protected: virtual void vOnJoypadConfigure(EPad _eJoypad); virtual void vOnJoypadToggled(Gtk::CheckMenuItem * _poCMI, EPad _eJoypad); virtual void vOnAutofireToggled(Gtk::CheckMenuItem * _poCMI, EKey _eKey); -#ifndef NO_DEBUGGER - virtual void vOnGDBWait(); - virtual void vOnGDBLoadAndWait(); - virtual void vOnGDBBreak(); - virtual void vOnGDBDisconnect(); -#endif //NO_DEBUGGER virtual void vOnHelpAbout(); virtual bool bOnEmuIdle(); diff --git a/src/gtk/windowcallbacks.cpp b/src/gtk/windowcallbacks.cpp index c1453cdb..dc69b734 100644 --- a/src/gtk/windowcallbacks.cpp +++ b/src/gtk/windowcallbacks.cpp @@ -38,20 +38,6 @@ #include "intl.h" #include "joypadconfig.h" -extern int systemRenderedFrames; -extern int systemFPS; -extern bool debugger; -extern int RGB_LOW_BITS_MASK; -extern void (*dbgMain)(); -extern void (*dbgSignal)(int, int); -extern void remoteInit(); -extern void remoteCleanUp(); -extern void remoteStubMain(); -extern void remoteStubSignal(int, int); -extern void remoteOutput(const char *, u32); -extern void remoteSetProtocol(int); -extern void remoteSetPort(int); - namespace VBA { @@ -914,160 +900,6 @@ void Window::vOnAutofireToggled(Gtk::CheckMenuItem * _poCMI, EKey _eKey) m_poInputConfig->vSetKey(sKey, _poCMI->get_active()); } -#ifndef NO_DEBUGGER -void Window::vOnGDBWait() -{ - Glib::RefPtr poXml; - poXml = Xml::create(PKGDATADIR "/vba.glade", "TcpPortDialog"); - - Gtk::Dialog * poDialog = dynamic_cast(poXml->get_widget("TcpPortDialog")); - Gtk::SpinButton * poSpin = dynamic_cast(poXml->get_widget("TcpPortSpin")); - - poDialog->set_transient_for(*this); - - int iPort = 55555; - poSpin->set_value(iPort); - - bool bOk = false; - if (poDialog->run() == Gtk::RESPONSE_OK) - { - bOk = true; - iPort = poSpin->get_value_as_int(); - } - delete poDialog; - - if (! bOk) - { - return; - } - - m_eCartridge = CartridgeGBA; - m_sRomFile = "gnu_stub"; - m_stEmulator = GBASystem; - - rom = (u8 *) malloc(0x2000000); - workRAM = (u8 *) calloc(1, 0x40000); - bios = (u8 *) calloc(1, 0x4000); - internalRAM = (u8 *) calloc(1, 0x8000); - paletteRAM = (u8 *) calloc(1, 0x400); - vram = (u8 *) calloc(1, 0x20000); - oam = (u8 *) calloc(1, 0x400); - pix = (u8 *) calloc(1, 4 * m_iGBAScreenWidth * m_iGBAScreenHeight); - ioMem = (u8 *) calloc(1, 0x400); - - useBios = m_poCoreConfig->oGetKey("use_bios_file"); - CPUInit(m_poCoreConfig->sGetKey("bios_file").c_str(), useBios); - CPUReset(); - - for (std::list::iterator it = m_listSensitiveWhenPlaying.begin(); - it != m_listSensitiveWhenPlaying.end(); - it++) - { - (*it)->set_sensitive(); - } - - if (m_poCoreConfig->oGetKey("load_game_auto")) - { - vOnLoadGameMostRecent(); - } - - vStartEmu(); - - emulating = 1; - - dbgMain = remoteStubMain; - dbgSignal = remoteStubSignal; - dbgOutput = remoteOutput; - debugger = true; - - remoteSetProtocol(0); - remoteSetPort(iPort); - remoteInit(); -} - -void Window::vOnGDBLoadAndWait() -{ - bool bLoaded = false; - - while (m_poFileOpenDialog->run() == Gtk::RESPONSE_OK) - { - if (bLoadROM(m_poFileOpenDialog->get_filename())) - { - bLoaded = true; - break; - } - } - m_poFileOpenDialog->hide(); - - if (! bLoaded) - { - return; - } - - if (m_eCartridge != CartridgeGBA) - { - vPopupError(_("Only GBA images are supported.")); - vOnFileClose(); - return; - } - - Glib::RefPtr poXml; - poXml = Xml::create(PKGDATADIR "/vba.glade", "TcpPortDialog"); - - Gtk::Dialog * poDialog = dynamic_cast(poXml->get_widget("TcpPortDialog")); - Gtk::SpinButton * poSpin = dynamic_cast(poXml->get_widget("TcpPortSpin")); - - poDialog->set_transient_for(*this); - - int iPort = 55555; - poSpin->set_value(iPort); - - bool bOk = false; - if (poDialog->run() == Gtk::RESPONSE_OK) - { - bOk = true; - iPort = poSpin->get_value_as_int(); - } - delete poDialog; - - if (! bOk) - { - return; - } - - dbgMain = remoteStubMain; - dbgSignal = remoteStubSignal; - dbgOutput = remoteOutput; - debugger = true; - - remoteSetProtocol(0); - remoteSetPort(iPort); - remoteInit(); -} - -void Window::vOnGDBBreak() -{ - if (armState) - { - armNextPC -= 4; - reg[15].I -= 4; - } - else - { - armNextPC -= 2; - reg[15].I -= 2; - } - - debugger = true; -} - -void Window::vOnGDBDisconnect() -{ - remoteCleanUp(); - debugger = false; -} -#endif //NO_DEBUGGER - void Window::vOnHelpAbout() { Gtk::AboutDialog oAboutDialog; @@ -1104,12 +936,6 @@ void Window::vOnHelpAbout() bool Window::bOnEmuIdle() { - if (debugger && m_stEmulator.emuHasDebugger) - { - dbgMain(); - return true; - } - if (m_uiThrottleDelay != Glib::TimeVal(0, 0)) { Glib::TimeVal uiTime;