mirror of https://github.com/stella-emu/stella.git
Added ability to start directly in the debugger to 'Power-on options'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2809 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
edd488eac6
commit
ae4e87a51c
|
@ -84,7 +84,7 @@
|
||||||
commandline arguments, and removed 'holdbutton0' argument.
|
commandline arguments, and removed 'holdbutton0' argument.
|
||||||
|
|
||||||
- The ability to load the ROM directly from this dialog, after
|
- The ability to load the ROM directly from this dialog, after
|
||||||
changing any settings.
|
changing any settings, and also to start in the debugger.
|
||||||
|
|
||||||
- Added more detailed information as to how to use this
|
- Added more detailed information as to how to use this
|
||||||
functionality to the UI.
|
functionality to the UI.
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -2698,6 +2698,7 @@
|
||||||
<tr><td>Left Difficulty</td><td>-ld</td></tr>
|
<tr><td>Left Difficulty</td><td>-ld</td></tr>
|
||||||
<tr><td>Right Difficulty</td><td>-rd</td></tr>
|
<tr><td>Right Difficulty</td><td>-rd</td></tr>
|
||||||
<tr><td>TV Type</td><td>-tv</td></tr>
|
<tr><td>TV Type</td><td>-tv</td></tr>
|
||||||
|
<tr><td>Startup Mode</td><td>-debug</td></tr>
|
||||||
<tr><td>Left joy items</td><td>-holdjoy0</td></tr>
|
<tr><td>Left joy items</td><td>-holdjoy0</td></tr>
|
||||||
<tr><td>Right joy items</td><td>-holdjoy1</td></tr>
|
<tr><td>Right joy items</td><td>-holdjoy1</td></tr>
|
||||||
<tr><td>Console: Select</td><td>-holdselect</td></tr>
|
<tr><td>Console: Select</td><td>-holdselect</td></tr>
|
||||||
|
|
|
@ -197,9 +197,6 @@ int main(int argc, char* argv[])
|
||||||
dbg.setBreakPoint(bp, true);
|
dbg.setBreakPoint(bp, true);
|
||||||
theOSystem->settings().setValue("break", "");
|
theOSystem->settings().setValue("break", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(theOSystem->settings().getBool("debug"))
|
|
||||||
theOSystem->eventHandler().enterDebugMode();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -577,6 +577,10 @@ string OSystem::createConsole(const FilesystemNode& rom, const string& md5sum,
|
||||||
myEventHandler->handleEvent(Event::JoystickOneRight, 1);
|
myEventHandler->handleEvent(Event::JoystickOneRight, 1);
|
||||||
if(BSPF_containsIgnoreCase(holdjoy1, "F"))
|
if(BSPF_containsIgnoreCase(holdjoy1, "F"))
|
||||||
myEventHandler->handleEvent(Event::JoystickOneFire, 1);
|
myEventHandler->handleEvent(Event::JoystickOneFire, 1);
|
||||||
|
#ifdef DEBUGGER_SUPPORT
|
||||||
|
if(mySettings->getBool("debug"))
|
||||||
|
myEventHandler->enterDebugMode();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return EmptyString;
|
return EmptyString;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
||||||
|
|
||||||
// Set real dimensions
|
// Set real dimensions
|
||||||
_w = lwidth + pwidth + fontWidth*3 + 15;
|
_w = lwidth + pwidth + fontWidth*3 + 15;
|
||||||
_h = 15 * (lineHeight + 4) + buttonHeight + 20;
|
_h = 17 * (lineHeight + 4) + buttonHeight + 20;
|
||||||
|
|
||||||
xpos = 10; ypos = 10;
|
xpos = 10; ypos = 10;
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
||||||
ypos += lineHeight + 10;
|
ypos += lineHeight + 10;
|
||||||
|
|
||||||
// Left difficulty
|
// Left difficulty
|
||||||
pwidth = font.getStringWidth("Default");
|
pwidth = font.getStringWidth("Debugger");
|
||||||
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||||
"Left Difficulty:", kTextAlignLeft);
|
"Left Difficulty:", kTextAlignLeft);
|
||||||
items.clear();
|
items.clear();
|
||||||
|
@ -139,6 +139,17 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font)
|
||||||
wid.push_back(myTVType);
|
wid.push_back(myTVType);
|
||||||
ypos += lineHeight + 10;
|
ypos += lineHeight + 10;
|
||||||
|
|
||||||
|
// Start in debugger mode
|
||||||
|
new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight,
|
||||||
|
"Startup Mode:", kTextAlignLeft);
|
||||||
|
items.clear();
|
||||||
|
items.push_back("Console", "false");
|
||||||
|
items.push_back("Debugger", "true");
|
||||||
|
myDebug = new PopUpWidget(this, font, xpos+lwidth, ypos,
|
||||||
|
pwidth, lineHeight, items, "", 0, 0);
|
||||||
|
wid.push_back(myDebug);
|
||||||
|
ypos += lineHeight + 10;
|
||||||
|
|
||||||
// Start console with buttons held down
|
// Start console with buttons held down
|
||||||
new StaticTextWidget(this, font, xpos, ypos+1,
|
new StaticTextWidget(this, font, xpos, ypos+1,
|
||||||
font.getStringWidth("Start console with the following held down:"),
|
font.getStringWidth("Start console with the following held down:"),
|
||||||
|
@ -253,6 +264,7 @@ void GlobalPropsDialog::loadConfig()
|
||||||
myLeftDiff->setSelected(settings.getString("ld"), "DEFAULT");
|
myLeftDiff->setSelected(settings.getString("ld"), "DEFAULT");
|
||||||
myRightDiff->setSelected(settings.getString("rd"), "DEFAULT");
|
myRightDiff->setSelected(settings.getString("rd"), "DEFAULT");
|
||||||
myTVType->setSelected(settings.getString("tv"), "DEFAULT");
|
myTVType->setSelected(settings.getString("tv"), "DEFAULT");
|
||||||
|
myDebug->setSelected(settings.getBool("debug") ? "true" : "false");
|
||||||
|
|
||||||
const string& holdjoy0 = settings.getString("holdjoy0");
|
const string& holdjoy0 = settings.getString("holdjoy0");
|
||||||
for(int i = kJ0Up; i <= kJ0Fire; ++i)
|
for(int i = kJ0Up; i <= kJ0Fire; ++i)
|
||||||
|
@ -287,6 +299,8 @@ void GlobalPropsDialog::saveConfig()
|
||||||
if(s == "DEFAULT") s = "";
|
if(s == "DEFAULT") s = "";
|
||||||
settings.setValue("tv", s);
|
settings.setValue("tv", s);
|
||||||
|
|
||||||
|
settings.setValue("debug", myDebug->getSelectedTag().toBool());
|
||||||
|
|
||||||
s = "";
|
s = "";
|
||||||
for(int i = kJ0Up; i <= kJ0Fire; ++i)
|
for(int i = kJ0Up; i <= kJ0Fire; ++i)
|
||||||
if(myJoy[i]->getState()) s += ourJoyState[i];
|
if(myJoy[i]->getState()) s += ourJoyState[i];
|
||||||
|
@ -307,6 +321,7 @@ void GlobalPropsDialog::setDefaults()
|
||||||
myLeftDiff->setSelected("DEFAULT");
|
myLeftDiff->setSelected("DEFAULT");
|
||||||
myRightDiff->setSelected("DEFAULT");
|
myRightDiff->setSelected("DEFAULT");
|
||||||
myTVType->setSelected("DEFAULT");
|
myTVType->setSelected("DEFAULT");
|
||||||
|
myDebug->setSelected("false");
|
||||||
|
|
||||||
for(int i = kJ0Up; i <= kJ1Fire; ++i)
|
for(int i = kJ0Up; i <= kJ1Fire; ++i)
|
||||||
myJoy[i]->setState(false);
|
myJoy[i]->setState(false);
|
||||||
|
|
|
@ -54,6 +54,7 @@ class GlobalPropsDialog : public Dialog, public CommandSender
|
||||||
PopUpWidget* myLeftDiff;
|
PopUpWidget* myLeftDiff;
|
||||||
PopUpWidget* myRightDiff;
|
PopUpWidget* myRightDiff;
|
||||||
PopUpWidget* myTVType;
|
PopUpWidget* myTVType;
|
||||||
|
PopUpWidget* myDebug;
|
||||||
|
|
||||||
CheckboxWidget* myJoy[10];
|
CheckboxWidget* myJoy[10];
|
||||||
CheckboxWidget* myHoldSelect;
|
CheckboxWidget* myHoldSelect;
|
||||||
|
|
Loading…
Reference in New Issue