X-Git-Url: http://git.hcoop.net/clinton/Virtual-Jaguar-Rx.git/blobdiff_plain/d56efc772df4a126865574bbbac62fbdaba5646e..HEAD:/src/gui/mainwin.cpp diff --git a/src/gui/mainwin.cpp b/src/gui/mainwin.cpp index 1b547e2..7fb2f3d 100644 --- a/src/gui/mainwin.cpp +++ b/src/gui/mainwin.cpp @@ -5,6 +5,8 @@ // // JLH = James Hammons // JPM = Jean-Paul Mari +// RG = Richard Goedeken + // // Who When What // --- ---------- ------------------------------------------------------------ @@ -20,9 +22,13 @@ // JPM 11/04/2017 Added the local window // JPM 08/31/2018 Added the call stack window // JPM Sept./2018 Added the new Models and BIOS handler, a screenshot feature and source code files browsing -// JPM Oct./2018 Added search paths in the settings, breakpoints feature, cartdridge view menu +// JPM Oct./2018 Added search paths in the settings, breakpoints feature, cartridge view menu // JPM 11/18/2018 Fix crash with non-debugger mode -// JPM 04/06/2019 Added ELF sections check +// JPM April/2019 Added ELF sections check, added a save memory dump +// JPM Aug./2019 Update texts descriptions, set cartridge view menu for debugger mode only, added a HW registers browser and source level tracing +// JPM Marc./2020 Added the step over for source level tracing +// RG Jan./2021 Linux build fixes +// JPM Apr./2021 Handle number of M68K cycles used in tracing mode, added video output display in a window // // FIXED: @@ -35,10 +41,10 @@ // // STILL TO BE DONE: // +// - The source file listing do not need to be refresh more than one time // - Fix bug in switching between PAL & NTSC in fullscreen mode. // - Remove SDL dependencies (sound, mainly) from Jaguar core lib -// - Fix inconsistency with trailing slashes in paths (eeproms needs one, -// software doesn't) +// - Fix inconsistency with trailing slashes in paths (eeproms needs one, software doesn't) // // SFDX CODE: S1E9T8H5M23YS @@ -70,6 +76,7 @@ #include "debug/stackbrowser.h" #include "debug/opbrowser.h" #include "debug/riscdasmbrowser.h" +#include "debug/hwregsbrowser.h" #include "dac.h" #include "jaguar.h" @@ -87,9 +94,10 @@ #include "m68000/m68kinterface.h" #include "debugger/DBGManager.h" -//#include "debugger/VideoWin.h" +#include "debugger/VideoWin.h" //#include "debugger/DasmWin.h" -#include "debugger/m68KDasmWin.h" +#include "debugger/SourcesWin.h" +#include "debugger/m68kDasmWin.h" #include "debugger/GPUDasmWin.h" #include "debugger/DSPDasmWin.h" #include "debugger/memory1browser.h" @@ -102,6 +110,7 @@ #include "debugger/heapallocatorbrowser.h" #include "debugger/callstackbrowser.h" #include "debugger/CartFilesListWin.h" +#include "debugger/SaveDumpAsWin.h" // According to SebRmv, this header isn't seen on Arch Linux either... :-/ @@ -179,19 +188,26 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), setWindowTitle(title); + // Windows common features aboutWin = new AboutWindow(this); helpWin = new HelpWindow(this); filePickWin = new FilePickerWindow(this); + emuStatusWin = new EmuStatusWindow(this); + + // Windows alpine mode features memBrowseWin = new MemoryBrowserWindow(this); stackBrowseWin = new StackBrowserWindow(this); - emuStatusWin = new EmuStatusWindow(this); cpuBrowseWin = new CPUBrowserWindow(this); opBrowseWin = new OPBrowserWindow(this); m68kDasmBrowseWin = new M68KDasmBrowserWindow(this); riscDasmBrowseWin = new RISCDasmBrowserWindow(this); + hwRegsBrowseWin = new HWRegsBrowserWindow(this); + + // Windows debugger mode features if (vjs.softTypeDebugger) { - //VideoOutputWin = new VideoOutputWindow(this); + VideoOutputWin = new VideoOutputWindow(this); + //VideoOutputWin->show(); //VideoOutputWin->setCentralWidget() //DasmWin = new DasmWindow(); //DasmWin = new DasmWindow(this); @@ -200,6 +216,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), heapallocatorBrowseWin = new HeapAllocatorBrowserWindow(this); BreakpointsWin = new BreakpointsWindow(this); NewFunctionBreakpointWin = new NewFnctBreakpointWindow(this); + SaveDumpAsWin = new SaveDumpAsWindow(this); exceptionvectortableBrowseWin = new ExceptionVectorTableBrowserWindow(this); CallStackBrowseWin = new CallStackBrowserWindow(this); CartFilesListWin = new CartFilesListWindow(this); @@ -234,9 +251,11 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), #endif // Setup disasm tabs dasmtabWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - dasmtabWidget->addTab(m68kDasmWin = new m68KDasmWindow(this), tr("M68000")); + dasmtabWidget->addTab(SourcesWin = new SourcesWindow(this), tr("Sources")); + dasmtabWidget->setCurrentIndex(dasmtabWidget->addTab(m68kDasmWin = new m68KDasmWindow(this), tr("M68000"))); dasmtabWidget->addTab(GPUDasmWin = new GPUDasmWindow(this), tr("GPU")); dasmtabWidget->addTab(DSPDasmWin = new DSPDasmWindow(this), tr("DSP")); + connect(dasmtabWidget, SIGNAL(currentChanged(const int)), this, SLOT(SelectdasmtabWidget(const int))); #if 1 setCentralWidget(dasmtabWidget); #endif @@ -418,9 +437,15 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), disableAllBreakpointsAct = new QAction(QIcon(":/res/debug-disableallbreakpoints.png"), tr("&Disable All Breakpoints"), this); connect(disableAllBreakpointsAct, SIGNAL(triggered()), this, SLOT(DisableAllBreakpoints())); - //VideoOutputAct = new QAction(tr("Output Video"), this); - //VideoOutputAct->setStatusTip(tr("Shows the output video window")); - //connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin())); + // Save dump + saveDumpAsAct = new QAction(tr("&Save Dump As..."), this); + saveDumpAsAct->setCheckable(false); + saveDumpAsAct->setDisabled(false); + connect(saveDumpAsAct, SIGNAL(triggered()), this, SLOT(ShowSaveDumpAsWin())); + + VideoOutputAct = new QAction(tr("Output Video"), this); + VideoOutputAct->setStatusTip(tr("Shows the output video window")); + connect(VideoOutputAct, SIGNAL(triggered()), this, SLOT(ShowVideoOutputWin())); //DasmAct = new QAction(tr("Disassembly"), this); //DasmAct->setStatusTip(tr("Shows the disassembly window")); @@ -453,7 +478,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // Cart files list CartFilesListAct = new QAction(QIcon(""), tr("Directory and files"), this); - CartFilesListAct->setStatusTip(tr("List of the files in the cartdridge's directory")); + CartFilesListAct->setStatusTip(tr("List of the files in the cartridge's directory structure")); connect(CartFilesListAct, SIGNAL(triggered()), this, SLOT(ShowCartFilesListWin())); // Memory windows @@ -501,6 +526,11 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), m68kDasmBrowseAct->setStatusTip(tr("Shows the 68K disassembly browser window")); connect(m68kDasmBrowseAct, SIGNAL(triggered()), this, SLOT(ShowM68KDasmBrowserWin())); + // HW registers browser window + hwRegsBrowseAct = new QAction(QIcon(":/res/tool-hw-regs.png"), tr("HW Registers Browser"), this); + hwRegsBrowseAct->setStatusTip(tr("Shows the HW registers browser window")); + connect(hwRegsBrowseAct, SIGNAL(triggered()), this, SLOT(ShowHWRegsBrowserWin())); + // Risc (DSP / GPU) disassembly browser window riscDasmBrowseAct = new QAction(QIcon(":/res/tool-risc-dis.png"), tr("RISC Listing Browser"), this); riscDasmBrowseAct->setStatusTip(tr("Shows the RISC disassembly browser window")); @@ -529,13 +559,15 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), // Alpine and debugger menus if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger) { - // Create debug & view menu + // Create debug menu debugMenu = menuBar()->addMenu(tr("&Debug")); - viewMenu = menuBar()->addMenu(tr("&View")); // Create debugger menu if (vjs.softTypeDebugger) { + // Create view menu + viewMenu = menuBar()->addMenu(tr("&View")); + // Cart menu viewCartMenu = viewMenu->addMenu(tr("&Cartridge")); viewCartMenu->addAction(CartFilesListAct); @@ -550,11 +582,9 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugWindowExceptionMenu = debugWindowsMenu->addMenu(tr("&Exception")); debugWindowExceptionMenu->addAction(exceptionVectorTableBrowseAct); debugWindowsMenu->addSeparator(); -#if 0 debugWindowOutputMenu = debugWindowsMenu->addMenu(tr("&Output")); debugWindowOutputMenu->addAction(VideoOutputAct); debugWindowsMenu->addSeparator(); -#endif debugWindowsWatchMenu = debugWindowsMenu->addMenu(tr("&Watch")); debugWindowsWatchMenu->addAction(allWatchBrowseAct); debugWindowsMenu->addAction(LocalBrowseAct); @@ -576,6 +606,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugWindowsBrowsesMenu->addAction(opBrowseAct); debugWindowsBrowsesMenu->addAction(m68kDasmBrowseAct); debugWindowsBrowsesMenu->addAction(riscDasmBrowseAct); + debugWindowsBrowsesMenu->addAction(hwRegsBrowseAct); debugMenu->addSeparator(); debugMenu->addAction(pauseAct); debugMenu->addAction(frameAdvanceAct); @@ -588,6 +619,8 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugNewBreakpointMenu->addAction(newFunctionBreakpointAct); debugMenu->addAction(deleteAllBreakpointsAct); debugMenu->addAction(disableAllBreakpointsAct); + debugMenu->addSeparator(); + debugMenu->addAction(saveDumpAsAct); #if 0 debugMenu->addSeparator(); debugMenu->addAction(DasmAct); @@ -602,6 +635,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugMenu->addAction(opBrowseAct); debugMenu->addAction(m68kDasmBrowseAct); debugMenu->addAction(riscDasmBrowseAct); + debugMenu->addAction(hwRegsBrowseAct); } } @@ -658,6 +692,7 @@ MainWin::MainWin(bool autoRun): running(true), powerButtonOn(false), debugbar->addAction(opBrowseAct); debugbar->addAction(m68kDasmBrowseAct); debugbar->addAction(riscDasmBrowseAct); + debugbar->addAction(hwRegsBrowseAct); } // Add actions to the main window, as hiding widgets with them @@ -830,6 +865,17 @@ void MainWin::SyncUI(void) } +// +void MainWin::SelectdasmtabWidget(const int Index) +{ + // check sources tab + if (Index == 0) + { + SourcesWin->RefreshContents(); + } +} + + void MainWin::closeEvent(QCloseEvent * event) { JaguarDone(); @@ -1071,7 +1117,7 @@ void MainWin::Configure(void) // Just in case we crash before a clean exit... WriteSettings(); - DebuggerRefreshWindows(); + RefreshWindows(); } @@ -1123,22 +1169,26 @@ static uint32_t ntscTickCount; static uint32_t refresh = 0; // Do autorefresh on debug windows // Have to be careful, too much causes the emulator to slow way down! + if (refresh == vjs.refresh) + { if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger) { - if (refresh == vjs.refresh) - { AlpineRefreshWindows(); //memBrowseWin->RefreshContents(); //cpuBrowseWin->RefreshContents(); + } + CommonRefreshWindows(); refresh = 0; } else + { refresh++; } } //if (!vjs.softTypeDebugger) videoWidget->updateGL(); + //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL; // FPS handling // Approach: We use a ring buffer to store times (in ms) over a given @@ -1237,7 +1287,9 @@ void MainWin::TogglePowerState(void) WriteLog("GUI: Resetting Jaguar...\n"); JaguarReset(); DebuggerReset(); + CommonReset(); DebuggerResetWindows(); + CommonResetWindows(); DACPauseAudioThread(false); } } @@ -1280,10 +1332,11 @@ void MainWin::ToggleRunState(void) } videoWidget->updateGL(); + //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL; cpuBrowseWin->HoldBPM(); cpuBrowseWin->HandleBPMContinue(); - DebuggerRefreshWindows(); + RefreshWindows(); } } else @@ -1302,6 +1355,7 @@ void MainWin::ToggleRunState(void) cpuBrowseWin->UnholdBPM(); } + emuStatusWin->ResetM68KCycles(); // Pause/unpause any running/non-running threads... DACPauseAudioThread(!running); } @@ -1447,6 +1501,7 @@ void MainWin::LoadSoftware(QString file) { m68k_set_reg(M68K_REG_A6, 0); m68kDasmWin->SetAddress(jaguarRunAddress); + SourcesWin->Init(); //pauseAct->setDisabled(false); //pauseAct->setChecked(true); ToggleRunState(); @@ -1461,6 +1516,7 @@ void MainWin::LoadSoftware(QString file) } } + // Display the Atari Jaguar software which is running if ((!vjs.hardwareTypeAlpine || !vjs.softTypeDebugger) && !loadAndGo && jaguarRunAddress) { QString newTitle = QString("Virtual Jaguar " VJ_RELEASE_VERSION " Rx - Now playing: %1").arg(filePickWin->GetSelectedPrettyName()); @@ -1510,12 +1566,13 @@ void MainWin::DisableAllBreakpoints(void) // Open, or display, the new breakpoint function window void MainWin::ShowNewFunctionBreakpointWin(void) { + NewFunctionBreakpointWin->SetFnctBreakpointWin(BreakpointsWin); NewFunctionBreakpointWin->show(); ShowBreakpointsWin(); } -// +// Display list of files found in cartridge void MainWin::ShowCartFilesListWin(void) { CartFilesListWin->show(); @@ -1523,12 +1580,30 @@ void MainWin::ShowCartFilesListWin(void) } +// Display the save dump pickup file +void MainWin::ShowSaveDumpAsWin(void) +{ + SaveDumpAsWin->show(); +} + + // Step Into trace void MainWin::DebuggerTraceStepInto(void) { - JaguarStepInto(); + if (SourcesWin->isVisible() && SourcesWin->GetTraceStatus()) + { + while (!SourcesWin->CheckChangeLine()) + { + emuStatusWin->UpdateM68KCycles(JaguarStepInto()); + } + } + else + { + emuStatusWin->UpdateM68KCycles(JaguarStepInto()); + } + videoWidget->updateGL(); - DebuggerRefreshWindows(); + RefreshWindows(); #ifdef _MSC_VER #pragma message("Warning: !!! Need to verify the Step Into function !!!") #else @@ -1546,11 +1621,15 @@ void MainWin::DebuggerRestart(void) m68k_set_reg(M68K_REG_PC, jaguarRunAddress); m68k_set_reg(M68K_REG_SP, vjs.DRAM_size); #endif + dasmtabWidget->setCurrentIndex(1); // set focus on the disasm M68K tab m68k_set_reg(M68K_REG_A6, 0); m68k_brk_hitcounts_reset(); + emuStatusWin->ResetM68KCycles(); bpmHitCounts = 0; DebuggerResetWindows(); - DebuggerRefreshWindows(); + CommonResetWindows(); + SourcesWin->Init(); + RefreshWindows(); #ifdef _MSC_VER #pragma message("Warning: !!! Need to verify the Restart function !!!") #else @@ -1562,9 +1641,20 @@ void MainWin::DebuggerRestart(void) // Step Over trace void MainWin::DebuggerTraceStepOver(void) { - JaguarStepOver(0); + if (SourcesWin->isVisible() && SourcesWin->GetTraceStatus()) + { + while (!SourcesWin->CheckChangeLine()) + { + emuStatusWin->UpdateM68KCycles(JaguarStepOver(0)); + } + } + else + { + emuStatusWin->UpdateM68KCycles(JaguarStepOver(0)); + } + videoWidget->updateGL(); - DebuggerRefreshWindows(); + RefreshWindows(); #ifdef _MSC_VER #pragma message("Warning: !!! Need to verify the Step Over function !!!") #else @@ -1582,6 +1672,7 @@ void MainWin::FrameAdvance(void) JaguarExecuteNew(); //if (!vjs.softTypeDebugger) videoWidget->updateGL(); + //vjs.softTypeDebugger ? VideoOutputWin->RefreshContents(videoWidget) : NULL; ToggleRunState(); // Need to execute 1 frames' worth of DSP thread as well :-/ @@ -1732,6 +1823,7 @@ void MainWin::ShowCPUBrowserWin(void) } +// Show the OP browser window void MainWin::ShowOPBrowserWin(void) { opBrowseWin->show(); @@ -1739,6 +1831,15 @@ void MainWin::ShowOPBrowserWin(void) } +// Show the HW registers browser window +void MainWin::ShowHWRegsBrowserWin(void) +{ + hwRegsBrowseWin->show(); + hwRegsBrowseWin->RefreshContents(); +} + + +// Show the M68K browser window void MainWin::ShowM68KDasmBrowserWin(void) { m68kDasmBrowseWin->show(); @@ -1764,17 +1865,17 @@ void MainWin::ShowDasmWin(void) // -#if 0 void MainWin::ShowVideoOutputWin(void) { //VideoOutputWindowCentrale = mainWindowCentrale->addSubWindow(videoWidget); //VideoOutputWindowCentrale->setWindowTitle(QString(tr("Video output"))); //VideoOutputWindowCentrale->show(); //memBrowseWin->show(); - //VideoOutputWin->show(); + VideoOutputWin->show(); + VideoOutputWin->SetupVideo(videoWidget); + //VideoOutputWin->adjustSize(); //VideoOutputWin->RefreshContents(videoWidget); } -#endif // Resize video window based on zoom factor @@ -1857,6 +1958,7 @@ void MainWin::ReadSettings(void) strcpy(vjs.absROMPath, settings.value("DefaultABS", "").toString().toUtf8().data()); vjs.refresh = settings.value("refresh", 60).toUInt(); vjs.allowWritesToROM = settings.value("writeROM", false).toBool(); + vjs.allowM68KExceptionCatch = settings.value("M68KExceptionCatch", false).toBool(); settings.endGroup(); // Read settings from the Keybindings @@ -1963,6 +2065,11 @@ void MainWin::ReadUISettings(void) // Video output information zoomLevel = settings.value("zoom", 2).toInt(); +// Emulator status UI information + pos = settings.value("emuStatusWinPos", QPoint(200, 200)).toPoint(); + emuStatusWin->move(pos); + settings.value("emuStatusWinIsVisible", false).toBool() ? ShowEmuStatusWin() : void(); + // Alpine debug UI information (also needed by the Debugger) if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger) { @@ -1983,11 +2090,6 @@ void MainWin::ReadUISettings(void) size = settings.value("stackBrowseWinSize", QSize(400, 400)).toSize(); stackBrowseWin->resize(size); - // Emulator status UI information - pos = settings.value("emuStatusWinPos", QPoint(200, 200)).toPoint(); - emuStatusWin->move(pos); - settings.value("emuStatusWinIsVisible", false).toBool() ? ShowEmuStatusWin() : void(); - // OP (Object Processor) UI information pos = settings.value("opBrowseWinPos", QPoint(200, 200)).toPoint(); opBrowseWin->move(pos); @@ -1995,6 +2097,13 @@ void MainWin::ReadUISettings(void) size = settings.value("opBrowseWinSize", QSize(400, 400)).toSize(); opBrowseWin->resize(size); + // HW registers UI information + pos = settings.value("hwRegsBrowseWinPos", QPoint(200, 200)).toPoint(); + hwRegsBrowseWin->move(pos); + settings.value("hwRegsBrowseWinIsVisible", false).toBool() ? ShowHWRegsBrowserWin() : void(); + size = settings.value("hwRegsBrowseWinSize", QSize(400, 400)).toSize(); + hwRegsBrowseWin->resize(size); + // RISC disassembly UI information pos = settings.value("riscDasmBrowseWinPos", QPoint(200, 200)).toPoint(); riscDasmBrowseWin->move(pos); @@ -2058,13 +2167,27 @@ void MainWin::ReadUISettings(void) size = settings.value("CallStackBrowseWinSize", QSize(400, 400)).toSize(); CallStackBrowseWin->resize(size); - // Cartdridge directory and files + // cartridge directory and files UI information pos = settings.value("CartFilesListWinPos", QPoint(200, 200)).toPoint(); CartFilesListWin->move(pos); settings.value("CartFilesListWinIsVisible", false).toBool() ? ShowCartFilesListWin() : void(); size = settings.value("CartFilesListWinSize", QSize(400, 400)).toSize(); CartFilesListWin->resize(size); + // Save dump UI information + pos = settings.value("SaveDumpAsWinPos", QPoint(200, 200)).toPoint(); + SaveDumpAsWin->move(pos); + settings.value("SaveDumpAsWinIsVisible", false).toBool() ? ShowSaveDumpAsWin() : void(); + size = settings.value("SaveDumpAsWinSize", QSize(400, 400)).toSize(); + SaveDumpAsWin->resize(size); + + // save output video UI information + pos = settings.value("VideoOutputWinPos", QPoint(200, 200)).toPoint(); + VideoOutputWin->move(pos); + settings.value("VideoOutputWinIsVisible", false).toBool() ? ShowVideoOutputWin() : void(); + size = settings.value("VideoOutputWinSize", QSize(400, 400)).toSize(); + VideoOutputWin->resize(size); + // Breakpoints UI information pos = settings.value("BreakpointsWinPos", QPoint(200, 200)).toPoint(); BreakpointsWin->move(pos); @@ -2143,12 +2266,13 @@ void MainWin::WriteSettings(void) settings.setValue("DefaultROM", vjs.alpineROMPath); settings.setValue("DefaultABS", vjs.absROMPath); settings.setValue("writeROM", vjs.allowWritesToROM); + settings.setValue("M68KExceptionCatch", vjs.allowM68KExceptionCatch); settings.endGroup(); // Write settings from the Debugger mode settings.beginGroup("debugger"); settings.setValue("DisplayHWLabels", vjs.displayHWlabels); - settings.setValue("NbrDisasmLines", vjs.nbrdisasmlines); + settings.setValue("NbrDisasmLines", (qulonglong) vjs.nbrdisasmlines); settings.setValue("DisasmOpcodes", vjs.disasmopcodes); settings.setValue("displayFullSourceFilename", vjs.displayFullSourceFilename); settings.setValue("ELFSectionsCheck", vjs.ELFSectionsCheck); @@ -2234,6 +2358,10 @@ void MainWin::WriteUISettings(void) // Video output information settings.setValue("zoom", zoomLevel); + // Common UI information + settings.setValue("emuStatusWinPos", emuStatusWin->pos()); + settings.setValue("emuStatusWinIsVisible", emuStatusWin->isVisible()); + // Alpine debug UI information (also needed by the Debugger) if (vjs.hardwareTypeAlpine || vjs.softTypeDebugger) { @@ -2244,11 +2372,12 @@ void MainWin::WriteUISettings(void) settings.setValue("stackBrowseWinPos", stackBrowseWin->pos()); settings.setValue("stackBrowseWinIsVisible", stackBrowseWin->isVisible()); settings.setValue("stackBrowseWinSize", stackBrowseWin->size()); - settings.setValue("emuStatusWinPos", emuStatusWin->pos()); - settings.setValue("emuStatusWinIsVisible", emuStatusWin->isVisible()); settings.setValue("opBrowseWinPos", opBrowseWin->pos()); settings.setValue("opBrowseWinIsVisible", opBrowseWin->isVisible()); settings.setValue("opBrowseWinSize", opBrowseWin->size()); + settings.setValue("hwRegsBrowseWinPos", hwRegsBrowseWin->pos()); + settings.setValue("hwRegsBrowseWinIsVisible", hwRegsBrowseWin->isVisible()); + settings.setValue("hwRegsBrowseWinSize", hwRegsBrowseWin->size()); settings.setValue("riscDasmBrowseWinPos", riscDasmBrowseWin->pos()); settings.setValue("riscDasmBrowseWinIsVisible", riscDasmBrowseWin->isVisible()); settings.setValue("m68kDasmBrowseWinPos", m68kDasmBrowseWin->pos()); @@ -2288,6 +2417,12 @@ void MainWin::WriteUISettings(void) settings.setValue("CartFilesListWinPos", CartFilesListWin->pos()); settings.setValue("CartFilesListWinIsVisible", CartFilesListWin->isVisible()); settings.setValue("CartFilesListWinSize", CartFilesListWin->size()); + settings.setValue("SaveDumpAsWinPos", SaveDumpAsWin->pos()); + settings.setValue("SaveDumpAsWinIsVisible", SaveDumpAsWin->isVisible()); + settings.setValue("SaveDumpAsWinSize", SaveDumpAsWin->size()); + settings.setValue("VideoOutputWinPos", VideoOutputWin->pos()); + settings.setValue("VideoOutputWinIsVisible", VideoOutputWin->isVisible()); + settings.setValue("VideoOutputWinSize", VideoOutputWin->size()); for (i = 0; i < vjs.nbrmemory1browserwindow; i++) { @@ -2310,10 +2445,22 @@ void MainWin::AlpineRefreshWindows(void) cpuBrowseWin->RefreshContents(); memBrowseWin->RefreshContents(); stackBrowseWin->RefreshContents(); - emuStatusWin->RefreshContents(); opBrowseWin->RefreshContents(); riscDasmBrowseWin->RefreshContents(); m68kDasmBrowseWin->RefreshContents(); + hwRegsBrowseWin->RefreshContents(); +} + + +// +void MainWin::CommonResetWindows(void) +{ +} + + +// Reset common +void MainWin::CommonReset(void) +{ } @@ -2337,11 +2484,19 @@ void MainWin::DebuggerResetWindows(void) heapallocatorBrowseWin->Reset(); BreakpointsWin->Reset(); CartFilesListWin->Reset(); + SourcesWin->Reset(); //ResetAlpineWindows(); } } +// Refresh common windows +void MainWin::CommonRefreshWindows(void) +{ + emuStatusWin->RefreshContents(); +} + + // Refresh view windows void MainWin::ViewRefreshWindows(void) { @@ -2349,12 +2504,22 @@ void MainWin::ViewRefreshWindows(void) } +// +void MainWin::RefreshWindows(void) +{ + DebuggerRefreshWindows(); + CommonRefreshWindows(); +} + + // Refresh soft debugger & alpine debug windows void MainWin::DebuggerRefreshWindows(void) { if (vjs.softTypeDebugger) { + //VideoOutputWin->RefreshContents(videoWidget); FilesrcListWin->RefreshContents(); + SourcesWin->RefreshContents(); m68kDasmWin->RefreshContents(); GPUDasmWin->RefreshContents(); DSPDasmWin->RefreshContents();