saving changes for the merge

This commit is contained in:
Thomas Jentzsch 2021-10-10 08:44:31 +02:00
parent 6bb055a159
commit 7c670bbfc3
3 changed files with 22 additions and 23 deletions

View File

@ -144,9 +144,8 @@ class Cartridge : public Device
/** /**
Set the callback for displaying messages Set the callback for displaying messages
*/ */
void setMessageCallback(messageCallback callback) void setMessageCallback(const messageCallback& callback)
{ {
if(!myMsgCallback)
myMsgCallback = callback; myMsgCallback = callback;
} }

View File

@ -121,6 +121,14 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
wid.push_back(myDetectedInfoWidget); wid.push_back(myDetectedInfoWidget);
ypos += lineHeight + VGAP; ypos += lineHeight + VGAP;
// AtariVox/SaveKey/PlusROM access
myExternAccessWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT * 1, ypos + 1,
"Display AtariVox/SaveKey and PlusROM access");
myExternAccessWidget->setToolTip("Display message when AtariVox/SaveKey EEPROM\n"
"is read or written or PlusROM is accessed.");
wid.push_back(myExternAccessWidget);
ypos += lineHeight + VGAP;
// 2600/7800 mode // 2600/7800 mode
items.clear(); items.clear();
VarList::push_back(items, "Atari 2600", "2600"); VarList::push_back(items, "Atari 2600", "2600");
@ -202,14 +210,6 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
myThumbExceptionWidget->setToolTip("Cause Thumb ARM emulation to throw exceptions\n" myThumbExceptionWidget->setToolTip("Cause Thumb ARM emulation to throw exceptions\n"
"on fatal errors and enter the debugger."); "on fatal errors and enter the debugger.");
wid.push_back(myThumbExceptionWidget); wid.push_back(myThumbExceptionWidget);
ypos += lineHeight + VGAP;
// AtariVox/SaveKey EEPROM access
myEEPROMAccessWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT * 1, ypos + 1,
"Display AtariVox/SaveKey EEPROM R/W access");
myEEPROMAccessWidget->setToolTip("Cause message display when AtariVox/\n"
"SaveKey EEPROM is read or written.");
wid.push_back(myEEPROMAccessWidget);
// Add items for tab 0 // Add items for tab 0
addToFocusList(wid, myTab, tabID); addToFocusList(wid, myTab, tabID);
@ -686,8 +686,8 @@ void DeveloperDialog::loadSettings(SettingsSet set)
#endif #endif
// Thumb ARM emulation exception // Thumb ARM emulation exception
myThumbException[set] = devSettings ? instance().settings().getBool("dev.thumb.trapfatal") : false; myThumbException[set] = devSettings ? instance().settings().getBool("dev.thumb.trapfatal") : false;
// AtariVox/SaveKey EEPROM access // AtariVox/SaveKey/PlusROM access
myEEPROMAccess[set] = instance().settings().getBool(prefix + "eepromaccess"); myExternAccess[set] = instance().settings().getBool(prefix + "eepromaccess");
// TIA tab // TIA tab
myTIAType[set] = devSettings ? instance().settings().getString("dev.tia.type") : "standard"; myTIAType[set] = devSettings ? instance().settings().getString("dev.tia.type") : "standard";
@ -748,8 +748,8 @@ void DeveloperDialog::saveSettings(SettingsSet set)
instance().settings().setValue("dev.thumb.trapfatal", myThumbException[set]); instance().settings().setValue("dev.thumb.trapfatal", myThumbException[set]);
} }
// AtariVox/SaveKey EEPROM access // AtariVox/SaveKey/PlusROM access
instance().settings().setValue(prefix + "eepromaccess", myEEPROMAccess[set]); instance().settings().setValue(prefix + "eepromaccess", myExternAccess[set]);
// TIA tab // TIA tab
if (devSettings) if (devSettings)
@ -810,8 +810,8 @@ void DeveloperDialog::getWidgetStates(SettingsSet set)
#endif #endif
// Thumb ARM emulation exception // Thumb ARM emulation exception
myThumbException[set] = myThumbExceptionWidget->getState(); myThumbException[set] = myThumbExceptionWidget->getState();
// AtariVox/SaveKey EEPROM access // AtariVox/SaveKey/PlusROM access
myEEPROMAccess[set] = myEEPROMAccessWidget->getState(); myExternAccess[set] = myExternAccessWidget->getState();
// TIA tab // TIA tab
myTIAType[set] = myTIATypeWidget->getSelectedTag().toString(); myTIAType[set] = myTIATypeWidget->getSelectedTag().toString();
@ -865,8 +865,8 @@ void DeveloperDialog::setWidgetStates(SettingsSet set)
#endif #endif
// Thumb ARM emulation exception // Thumb ARM emulation exception
myThumbExceptionWidget->setState(myThumbException[set]); myThumbExceptionWidget->setState(myThumbException[set]);
// AtariVox/SaveKey EEPROM access // AtariVox/SaveKey/PlusROM access
myEEPROMAccessWidget->setState(myEEPROMAccess[set]); myExternAccessWidget->setState(myExternAccess[set]);
handleConsole(); handleConsole();
// TIA tab // TIA tab
@ -1030,6 +1030,8 @@ void DeveloperDialog::setDefaults()
case 0: // Emulation case 0: // Emulation
myFrameStats[set] = devSettings ? true : false; myFrameStats[set] = devSettings ? true : false;
myDetectedInfo[set] = devSettings ? true : false; myDetectedInfo[set] = devSettings ? true : false;
// AtariVox/SaveKey/PlusROM access
myExternAccess[set] = devSettings ? true : false;
myConsole[set] = 0; myConsole[set] = 0;
// Randomization // Randomization
myRandomBank[set] = devSettings ? true : false; myRandomBank[set] = devSettings ? true : false;
@ -1045,8 +1047,6 @@ void DeveloperDialog::setDefaults()
#endif #endif
// Thumb ARM emulation exception // Thumb ARM emulation exception
myThumbException[set] = devSettings ? true : false; myThumbException[set] = devSettings ? true : false;
// AtariVox/SaveKey EEPROM access
myEEPROMAccess[set] = devSettings ? true : false;
setWidgetStates(set); setWidgetStates(set);
break; break;

View File

@ -89,6 +89,7 @@ class DeveloperDialog : public Dialog
RadioButtonGroup* mySettingsGroupEmulation{nullptr}; RadioButtonGroup* mySettingsGroupEmulation{nullptr};
CheckboxWidget* myFrameStatsWidget{nullptr}; CheckboxWidget* myFrameStatsWidget{nullptr};
CheckboxWidget* myDetectedInfoWidget{nullptr}; CheckboxWidget* myDetectedInfoWidget{nullptr};
CheckboxWidget* myExternAccessWidget{nullptr};
PopUpWidget* myConsoleWidget{nullptr}; PopUpWidget* myConsoleWidget{nullptr};
StaticTextWidget* myLoadingROMLabel{nullptr}; StaticTextWidget* myLoadingROMLabel{nullptr};
CheckboxWidget* myRandomBankWidget{nullptr}; CheckboxWidget* myRandomBankWidget{nullptr};
@ -102,7 +103,6 @@ class DeveloperDialog : public Dialog
CheckboxWidget* myWRPortBreakWidget{nullptr}; CheckboxWidget* myWRPortBreakWidget{nullptr};
#endif #endif
CheckboxWidget* myThumbExceptionWidget{nullptr}; CheckboxWidget* myThumbExceptionWidget{nullptr};
CheckboxWidget* myEEPROMAccessWidget{nullptr};
// TIA widgets // TIA widgets
RadioButtonGroup* mySettingsGroupTia{nullptr}; RadioButtonGroup* mySettingsGroupTia{nullptr};
@ -151,6 +151,7 @@ class DeveloperDialog : public Dialog
// Emulator sets // Emulator sets
std::array<bool, 2> myFrameStats; std::array<bool, 2> myFrameStats;
std::array<bool, 2> myDetectedInfo; std::array<bool, 2> myDetectedInfo;
std::array<bool, 2> myExternAccess;
std::array<int, 2> myConsole; std::array<int, 2> myConsole;
std::array<bool, 2> myRandomBank; std::array<bool, 2> myRandomBank;
std::array<bool, 2> myRandomizeTIA; std::array<bool, 2> myRandomizeTIA;
@ -166,7 +167,6 @@ class DeveloperDialog : public Dialog
std::array<bool, 2> myWRPortBreak; std::array<bool, 2> myWRPortBreak;
#endif #endif
std::array<bool, 2> myThumbException; std::array<bool, 2> myThumbException;
std::array<bool, 2> myEEPROMAccess;
// TIA sets // TIA sets
std::array<string, 2> myTIAType; std::array<string, 2> myTIAType;
std::array<bool, 2> myPlInvPhase; std::array<bool, 2> myPlInvPhase;