diff --git a/Changes.txt b/Changes.txt index 3db21a9ea..7b2d6d87a 100644 --- a/Changes.txt +++ b/Changes.txt @@ -35,6 +35,8 @@ * Added option to select the audio device. + * Added option to display detected settings info when a ROM is loaded. + * Replaced "Re-disassemble" with "Disassemble @ current line" in debugger. * Fix bug when taking fullscreen snapshots; the dimensions were sometimes diff --git a/docs/graphics/options_developer.png b/docs/graphics/options_developer.png index 8d345f9aa..f405818b1 100644 Binary files a/docs/graphics/options_developer.png and b/docs/graphics/options_developer.png differ diff --git a/docs/graphics/options_developer_emulation.png b/docs/graphics/options_developer_emulation.png index 6b8009f35..977893402 100644 Binary files a/docs/graphics/options_developer_emulation.png and b/docs/graphics/options_developer_emulation.png differ diff --git a/docs/index.html b/docs/index.html index 555895e6a..d0bac0933 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2893,6 +2893,9 @@
-<plr.|dev.>stats <1|0>
Overlay console info on the TIA image during emulation. + +
-<plr.|dev.>detectedinfo <1|0>
+ Display detected settings info when a ROM is loaded.
-<plr.|dev.>console <2600|7800>
Select console for B/W and Pause key handling and RAM initialization. @@ -3606,6 +3609,7 @@ ItemBrief descriptionFor more information,
see CommandLine Player/Developer settingsSelects the active settings set-dev.settings Console info overlayOverlay console info on the TIA image during emulation.-plr.stats
-dev.stats + Detected settings infoDisplay detected settings when a ROM is loaded.-plr.detectedinfo
-dev.detectedinfo ConsoleSelect the console type, this affects Color/B&W/Pause key emulation and zero-page RAM initialization-plr.console
-dev.console Random startup bankRandomize the startup bank (only for selected bankswitch types)-plr.bankrandom
-dev.bankrandom Randomize zero-page ...When loading a ROM, randomize all RAM content instead of initializing with all zeroes (for 'Console' = 'Atari 2600' only)-plr.ramrandom
-dev.ramrandom diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 6c5caa8d9..88d546ba2 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -451,8 +451,8 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum, myConsole->initializeAudio(); string saveOnExit = settings().getString("saveonexit"); - bool activeTM = settings().getBool( - settings().getBool("dev.settings") ? "dev.timemachine" : "plr.timemachine"); + bool devSettings = settings().getBool("dev.settings"); + bool activeTM = settings().getBool(devSettings ? "dev.timemachine" : "plr.timemachine"); if (saveOnExit == "all" && activeTM) myEventHandler->handleEvent(Event::LoadAllStates); @@ -483,7 +483,19 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum, if(mySettings->getBool("debug")) myEventHandler->enterDebugMode(); #endif + + if(!showmessage && + settings().getBool(devSettings ? "dev.detectedinfo" : "plr.detectedinfo")) + { + ostringstream msg; + + msg << myConsole->leftController().name() << "/" << myConsole->rightController().name() + << " - " << myConsole->cartridge().detectedType() + << " - " << myConsole->getFormatString(); + myFrameBuffer->showMessage(msg.str()); + } } + return EmptyString; } diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index d3c388d64..0ec82b9da 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -198,6 +198,7 @@ Settings::Settings() setPermanent("plr.tm.uncompressed", 60); setPermanent("plr.tm.interval", "30f"); // = 0.5 seconds setPermanent("plr.tm.horizon", "10m"); // = ~10 minutes + setPermanent("plr.detectedinfo", "false"); setPermanent("plr.eepromaccess", "false"); // Developer settings @@ -227,6 +228,7 @@ Settings::Settings() setPermanent("dev.tm.horizon", "30s"); // = ~30 seconds // Thumb ARM emulation options setPermanent("dev.thumb.trapfatal", "true"); + setPermanent("dev.detectedinfo", "true"); setPermanent("dev.eepromaccess", "true"); } @@ -616,6 +618,7 @@ void Settings::usage() const << " mode\n" << endl << " -plr.stats <1|0> Overlay console info during emulation\n" + << " -plr.detectedinfo <1|0> Enable initial detected settings info\n" << " -plr.console <2600|7800> Select console for B/W and Pause key\n" << " handling and RAM initialization\n" << " -plr.bankrandom <1|0> Randomize the startup bank on reset\n" @@ -631,6 +634,7 @@ void Settings::usage() const << endl << " The same parameters but for developer settings mode\n" << " -dev.stats <1|0> Overlay console info during emulation\n" + << " -dev.detectedinfo <1|0> Enable initial detected settings info\n" << " -dev.console <2600|7800> Select console for B/W and Pause key\n" << " handling and RAM initialization\n" << " -dev.bankrandom <1|0> Randomize the startup bank on reset\n" diff --git a/src/gui/DeveloperDialog.cxx b/src/gui/DeveloperDialog.cxx index 288fb6a40..336c5e1e8 100644 --- a/src/gui/DeveloperDialog.cxx +++ b/src/gui/DeveloperDialog.cxx @@ -111,8 +111,15 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font) wid.push_back(r); ypos += lineHeight + VGAP * 1; - myFrameStatsWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT * 1, ypos + 1, "Console info overlay"); + myFrameStatsWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT * 1, ypos + 1, + "Console info overlay"); wid.push_back(myFrameStatsWidget); + + + myDetectedInfoWidget = new CheckboxWidget(myTab, font, + myFrameStatsWidget->getRight() + fontWidth * 2.5, ypos + 1, + "Detected settings info"); + wid.push_back(myDetectedInfoWidget); ypos += lineHeight + VGAP; // 2600/7800 mode @@ -611,6 +618,7 @@ void DeveloperDialog::loadSettings(SettingsSet set) const string& prefix = devSettings ? "dev." : "plr."; myFrameStats[set] = instance().settings().getBool(prefix + "stats"); + myDetectedInfo[set] = instance().settings().getBool(prefix + "detectedinfo"); myConsole[set] = instance().settings().getString(prefix + "console") == "7800" ? 1 : 0; // Randomization myRandomBank[set] = instance().settings().getBool(prefix + "bankrandom"); @@ -662,6 +670,7 @@ void DeveloperDialog::saveSettings(SettingsSet set) const string& prefix = devSettings ? "dev." : "plr."; instance().settings().setValue(prefix + "stats", myFrameStats[set]); + instance().settings().setValue(prefix + "detectedinfo", myDetectedInfo[set]); instance().settings().setValue(prefix + "console", myConsole[set] == 1 ? "7800" : "2600"); if(instance().hasConsole()) instance().eventHandler().set7800Mode(); @@ -724,6 +733,7 @@ void DeveloperDialog::saveSettings(SettingsSet set) void DeveloperDialog::getWidgetStates(SettingsSet set) { myFrameStats[set] = myFrameStatsWidget->getState(); + myDetectedInfo[set] = myDetectedInfoWidget->getState(); myConsole[set] = myConsoleWidget->getSelected() == 1; // Randomization myRandomBank[set] = myRandomBankWidget->getState(); @@ -775,6 +785,7 @@ void DeveloperDialog::getWidgetStates(SettingsSet set) void DeveloperDialog::setWidgetStates(SettingsSet set) { myFrameStatsWidget->setState(myFrameStats[set]); + myDetectedInfoWidget->setState(myDetectedInfo[set]); myConsoleWidget->setSelectedIndex(myConsole[set]); // Randomization myRandomBankWidget->setState(myRandomBank[set]); @@ -955,6 +966,7 @@ void DeveloperDialog::setDefaults() { case 0: // Emulation myFrameStats[set] = devSettings ? true : false; + myDetectedInfo[set] = devSettings ? true : false; myConsole[set] = 0; // Randomization myRandomBank[set] = devSettings ? true : false; diff --git a/src/gui/DeveloperDialog.hxx b/src/gui/DeveloperDialog.hxx index 8bd84ab91..8dd2dc4e2 100644 --- a/src/gui/DeveloperDialog.hxx +++ b/src/gui/DeveloperDialog.hxx @@ -90,6 +90,7 @@ class DeveloperDialog : public Dialog // Emulator widgets RadioButtonGroup* mySettingsGroupEmulation{nullptr}; CheckboxWidget* myFrameStatsWidget{nullptr}; + CheckboxWidget* myDetectedInfoWidget{nullptr}; PopUpWidget* myConsoleWidget{nullptr}; StaticTextWidget* myLoadingROMLabel{nullptr}; CheckboxWidget* myRandomBankWidget{nullptr}; @@ -148,6 +149,7 @@ class DeveloperDialog : public Dialog bool mySettings; // Emulator sets std::array myFrameStats; + std::array myDetectedInfo; std::array myConsole; std::array myRandomBank; std::array myRandomizeRAM;