mirror of https://github.com/stella-emu/stella.git
Text input is all parts of the UI will now use the users own
keyboard layout. This means that non-US layouts can finally enter (ASCII-only) text with Alt-Gr key-combos. Because of these changes, the global debugger keys for rewind/step/trace/scan+1/frame+1 are now the function keys F4 to F8, respectively. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3006 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
537eef7384
commit
964e1d7d88
12
Changes.txt
12
Changes.txt
|
@ -14,13 +14,23 @@
|
|||
|
||||
4.1.1 to 4.2: (xxx xx, 2014)
|
||||
|
||||
* Text input from non-US keyboard layouts is now supported. Note that
|
||||
all text in Stella is still ASCII-only, but at least it can now be
|
||||
entered using a native layout.
|
||||
|
||||
* Related to the text input changes, the debugger Alt-combo shortcuts
|
||||
have been changed. These are now mapped to F4 - F8 (see documentation
|
||||
for more information).
|
||||
|
||||
* Controllers are now detected dynamically by Stella. This means that
|
||||
you can plug/unplug joysticks/paddles/etc while Stella is running,
|
||||
and they will be added and removed automatically. Also fixed is
|
||||
a bug whereby sometimes custom joystick mappings weren't being saved.
|
||||
|
||||
* The 'cpurandom' option now also randomizes the SP register, and the
|
||||
randomization is now disabled by default.
|
||||
randomization is now disabled by default. If you are experiencing
|
||||
weird graphics corruption, display problems, etc, consider disabling
|
||||
this option.
|
||||
|
||||
* Fixed 'MDM' scheme to trigger bankswitching on writes to hotspots
|
||||
(previously it only triggered on reads). Also, the scheme has been
|
||||
|
|
|
@ -771,7 +771,7 @@ system would alternate between drawing frames (and hence produce
|
|||
flicker).</p>
|
||||
|
||||
<p>You can use the "Scan+1" button, the prompt "scan" command, or the
|
||||
Alt-L key-combo to watch the TIA draw the frame one scanline at a time.</p>
|
||||
F7 key to watch the TIA draw the frame one scanline at a time.</p>
|
||||
|
||||
<p>You can also right-click anywhere in this window to show a context menu,
|
||||
as illustrated:</p>
|
||||
|
@ -1163,18 +1163,17 @@ the RAM in the DPC scheme is not viewable by the 6507, so its addresses start fr
|
|||
<h2>Global Buttons</h2>
|
||||
|
||||
<p>There are also buttons on the right that always show up no matter which
|
||||
tab you're looking at. These are always active. They are: Step, Trace,
|
||||
Scan+1, Frame+1 and Exit. The larger button to the left (labeled '<')
|
||||
performs the rewind operation, which will undo the previous Step/Trace/Scan/Frame
|
||||
advance. The rewind buffer is currently 100 levels deep.</p>
|
||||
tab you're looking at. These are always active. The larger button to the left (labeled '<') performs the rewind operation, which will undo the previous Step/Trace/Scan/Frame
|
||||
advance. The rewind buffer is currently 100 levels deep. The others are Step, Trace,
|
||||
Scan+1, Frame+1 and Exit.</p>
|
||||
<p><img src="graphics/debugger_globalbuttons.png"></p>
|
||||
|
||||
<p>When you use these buttons, the prompt doesn't change. This means the
|
||||
status lines with the registers and disassembly will be "stale". You
|
||||
can update them just by re-running the relevant commands in the prompt.</p>
|
||||
|
||||
<p>You can also use the Step, Trace, Scan+1, Frame+1 and Rewind buttons from
|
||||
anywhere in the GUI via the keyboard, with Alt-S, Alt-T, Alt-L, Alt-F and Alt-R.</p>
|
||||
<p>You can also use the Rewind, Step, Trace, Scan+1, Frame+1 and Rewind buttons from
|
||||
anywhere in the GUI via the keyboard, with F4 to F8, respectively.</p>
|
||||
|
||||
|
||||
<!-- ///////////////////////////////////////////////////////////////////////// -->
|
||||
|
|
|
@ -88,33 +88,28 @@ void DebuggerDialog::loadConfig()
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod)
|
||||
{
|
||||
bool alt = instance().eventHandler().kbdAlt(mod);
|
||||
if(alt)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case KBDK_S:
|
||||
doStep();
|
||||
break;
|
||||
case KBDK_T:
|
||||
doTrace();
|
||||
break;
|
||||
case KBDK_F:
|
||||
doAdvance();
|
||||
break;
|
||||
case KBDK_L:
|
||||
doScanlineAdvance();
|
||||
break;
|
||||
case KBDK_R:
|
||||
case KBDK_F4:
|
||||
doRewind();
|
||||
break;
|
||||
default:
|
||||
case KBDK_F5:
|
||||
doStep();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case KBDK_F6:
|
||||
doTrace();
|
||||
break;
|
||||
case KBDK_F7:
|
||||
doScanlineAdvance();
|
||||
break;
|
||||
case KBDK_F8:
|
||||
doAdvance();
|
||||
break;
|
||||
default:
|
||||
Dialog::handleKeyDown(key, mod);
|
||||
}
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void DebuggerDialog::handleCommand(CommandSender* sender, int cmd,
|
||||
|
|
|
@ -42,8 +42,7 @@ PromptWidget::PromptWidget(GuiObject* boss, const GUI::Font& font,
|
|||
CommandSender(boss),
|
||||
_makeDirty(false),
|
||||
_firstTime(true),
|
||||
_exitedEarly(false),
|
||||
_lastModPressed(KBDM_NONE)
|
||||
_exitedEarly(false)
|
||||
{
|
||||
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS |
|
||||
WIDGET_WANTS_TAB | WIDGET_WANTS_RAWDATA;
|
||||
|
@ -139,29 +138,22 @@ void PromptWidget::printPrompt()
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool PromptWidget::handleText(char text)
|
||||
{
|
||||
if(text >= 0)
|
||||
{
|
||||
// FIXME - convert this class to inherit from EditableWidget
|
||||
// Huge hack to test if ALT key was pressed in the last handleKeyDown call
|
||||
if(instance().eventHandler().kbdAlt(_lastModPressed))
|
||||
return false;
|
||||
|
||||
for(int i = _promptEndPos - 1; i >= _currentPos; i--)
|
||||
buffer(i + 1) = buffer(i);
|
||||
_promptEndPos++;
|
||||
putchar(text);
|
||||
scrollToCurrent();
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
||||
{
|
||||
// Ignore all alt-mod keys
|
||||
_lastModPressed = mod;
|
||||
if(instance().eventHandler().kbdAlt(mod))
|
||||
return true;
|
||||
|
||||
bool handled = true;
|
||||
bool dirty = false;
|
||||
|
||||
|
@ -460,6 +452,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
|
|||
return handled;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::insertIntoPrompt(const char* str)
|
||||
{
|
||||
|
@ -473,6 +466,7 @@ void PromptWidget::insertIntoPrompt(const char* str)
|
|||
putcharIntern(str[j]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PromptWidget::handleCommand(CommandSender* sender, int cmd,
|
||||
|
@ -796,14 +790,14 @@ void PromptWidget::putcharIntern(int c)
|
|||
// OverlayColor contains 256 of them
|
||||
_textcolor = (c & 0x7f) << 1;
|
||||
}
|
||||
else if(c < 0x1e) { // first actual character is large dash
|
||||
else if(c && c < 0x1e) { // first actual character is large dash
|
||||
// More colors (the regular GUI ones)
|
||||
_textcolor = c + 0x100;
|
||||
}
|
||||
else if(c == 0x7f) { // toggle inverse video (DEL char)
|
||||
_inverse = !_inverse;
|
||||
}
|
||||
else
|
||||
else if(isprint(c))
|
||||
{
|
||||
buffer(_currentPos) = c | (_textcolor << 8) | (_inverse << 17);
|
||||
_currentPos++;
|
||||
|
|
|
@ -53,7 +53,7 @@ class PromptWidget : public Widget, public CommandSender
|
|||
void drawWidget(bool hilite);
|
||||
void drawCaret();
|
||||
void putcharIntern(int c);
|
||||
void insertIntoPrompt(const char *str);
|
||||
// void insertIntoPrompt(const char *str);
|
||||
void updateScrollBuffer();
|
||||
void scrollToCurrent();
|
||||
|
||||
|
@ -119,8 +119,6 @@ class PromptWidget : public Widget, public CommandSender
|
|||
bool _firstTime;
|
||||
bool _exitedEarly;
|
||||
|
||||
StellaMod _lastModPressed;
|
||||
|
||||
int compareHistory(const char *histLine);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue