diff --git a/Changes.txt b/Changes.txt index 678016802..658535d2a 100644 --- a/Changes.txt +++ b/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 diff --git a/docs/debugger.html b/docs/debugger.html index 37491ee5a..cf76c7154 100644 --- a/docs/debugger.html +++ b/docs/debugger.html @@ -771,7 +771,7 @@ system would alternate between drawing frames (and hence produce flicker).
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.
+F7 key to watch the TIA draw the frame one scanline at a time.You can also right-click anywhere in this window to show a context menu, as illustrated:
@@ -1163,18 +1163,17 @@ the RAM in the DPC scheme is not viewable by the 6507, so its addresses start frThere 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.
+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.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.
-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.
+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.
diff --git a/src/debugger/gui/DebuggerDialog.cxx b/src/debugger/gui/DebuggerDialog.cxx index 34ca90144..877a6e14c 100644 --- a/src/debugger/gui/DebuggerDialog.cxx +++ b/src/debugger/gui/DebuggerDialog.cxx @@ -89,31 +89,26 @@ void DebuggerDialog::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void DebuggerDialog::handleKeyDown(StellaKey key, StellaMod mod) { - bool alt = instance().eventHandler().kbdAlt(mod); - if(alt) + switch(key) { - 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: - doRewind(); - break; - default: - break; - } + case KBDK_F4: + doRewind(); + break; + 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); } - Dialog::handleKeyDown(key, mod); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index 859c15356..dd25d8d62 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -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; @@ -140,28 +139,21 @@ void PromptWidget::printPrompt() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool PromptWidget::handleText(char text) { - // 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(); - + if(text >= 0) + { + // FIXME - convert this class to inherit from EditableWidget + 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, @@ -758,7 +752,7 @@ void PromptWidget::updateScrollBuffer() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -int PromptWidget::printf(const char *format, ...) +int PromptWidget::printf(const char* format, ...) { va_list argptr; @@ -769,7 +763,7 @@ int PromptWidget::printf(const char *format, ...) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -int PromptWidget::vprintf(const char *format, va_list argptr) +int PromptWidget::vprintf(const char* format, va_list argptr) { char buf[2048]; int count = BSPF_vsnprintf(buf, sizeof(buf), format, argptr); @@ -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++; diff --git a/src/debugger/gui/PromptWidget.hxx b/src/debugger/gui/PromptWidget.hxx index 8f97777b5..e6fd176cf 100644 --- a/src/debugger/gui/PromptWidget.hxx +++ b/src/debugger/gui/PromptWidget.hxx @@ -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); };