X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fmainwin.cpp;h=28d022b073f83266973dfa12a4b1e4984f76a289;hb=e82391f9b8113450e84d7178b61076f54e7cfa81;hp=9a739870df9083a596593f11d30c84204fd3db4f;hpb=5c28b6dbf7aa20441c8a51f484f4f64b1966f7e3;p=virtualjaguar diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 9a73987..28d022b 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -48,6 +48,7 @@ #include "debug/m68kdasmbrowser.h" #include "debug/memorybrowser.h" #include "debug/opbrowser.h" +#include "debug/riscdasmbrowser.h" #include "dac.h" #include "jaguar.h" @@ -105,9 +106,10 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), cpuBrowseWin = new CPUBrowserWindow(this); opBrowseWin = new OPBrowserWindow(this); m68kDasmBrowseWin = new M68KDasmBrowserWindow(this); + riscDasmBrowseWin = new RISCDasmBrowserWindow(this); - videoWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + videoWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setUnifiedTitleAndToolBarOnMac(true); @@ -231,6 +233,11 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // memBrowseAct->setCheckable(true); connect(m68kDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowM68KDasmBrowserWin())); + riscDasmBrowseAct = new QAction(QIcon(":/res/generic.png"), tr("RISC Listing Browser"), this); + riscDasmBrowseAct->setStatusTip(tr("Shows the RISC disassembly browser window")); +// memBrowseAct->setCheckable(true); + connect(riscDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowRISCDasmBrowserWin())); + // Misc. connections... connect(filePickWin, SIGNAL(RequestLoad(QString)), this, SLOT(LoadSoftware(QString))); connect(filePickWin, SIGNAL(FilePickerHiding()), this, SLOT(Unpause())); @@ -253,6 +260,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugMenu->addAction(cpuBrowseAct); debugMenu->addAction(opBrowseAct); debugMenu->addAction(m68kDasmBrowseAct); + debugMenu->addAction(riscDasmBrowseAct); } helpMenu = menuBar()->addMenu(tr("&Help")); @@ -282,6 +290,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugbar->addAction(cpuBrowseAct); debugbar->addAction(opBrowseAct); debugbar->addAction(m68kDasmBrowseAct); + debugbar->addAction(riscDasmBrowseAct); } // Create status bar @@ -607,17 +616,17 @@ void MainWin::Timer(void) // Some machines can't handle this, so we give them the option to disable it. :-) if (!plzDontKillMyComputer) { - // Random hash & trash - // We try to simulate an untuned tank circuit here... :-) - for(uint32_t x=0; xrasterWidth; x++) - { - for(uint32_t y=0; yrasterHeight; y++) + // Random hash & trash + // We try to simulate an untuned tank circuit here... :-) + for(uint32_t x=0; xrasterWidth; x++) { - videoWidget->buffer[(y * videoWidget->textureWidth) + x] - = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24; + for(uint32_t y=0; yrasterHeight; y++) + { + videoWidget->buffer[(y * videoWidget->textureWidth) + x] + = (rand() & 0xFF) << 8 | (rand() & 0xFF) << 16 | (rand() & 0xFF) << 24; + } } } - } } else { @@ -646,6 +655,7 @@ void MainWin::TogglePowerState(void) showUntunedTankCircuit = true; // This is just in case the ROM we were playing was in a narrow or wide field mode, // so the untuned tank sim doesn't look wrong. :-) + DACPauseAudioThread(); TOMReset(); } else @@ -671,6 +681,7 @@ void MainWin::TogglePowerState(void) WriteLog("GUI: Resetting Jaguar...\n"); JaguarReset(); + DACPauseAudioThread(false); } } @@ -691,6 +702,9 @@ void MainWin::ToggleRunState(void) videoWidget->updateGL(); } + + // Pause/unpause any running/non-running threads... + DACPauseAudioThread(!running); } @@ -913,6 +927,13 @@ void MainWin::ShowM68KDasmBrowserWin(void) } +void MainWin::ShowRISCDasmBrowserWin(void) +{ + riscDasmBrowseWin->show(); + riscDasmBrowseWin->RefreshContents(); +} + + void MainWin::ResizeMainWindow(void) { // videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));