From a87334a2682de1e485248c0522c9d5cd33f6eb65 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 6 May 2017 14:06:19 -0230 Subject: [PATCH 1/6] Great colon purge Part2: RIOT tab and controllers. --- src/debugger/gui/AtariVoxWidget.cxx | 17 ++++---- src/debugger/gui/BoosterWidget.cxx | 4 +- src/debugger/gui/DrivingWidget.cxx | 4 +- src/debugger/gui/GenesisWidget.cxx | 4 +- src/debugger/gui/JoystickWidget.cxx | 4 +- src/debugger/gui/KeyboardWidget.cxx | 4 +- src/debugger/gui/PaddleWidget.cxx | 31 ++++++++----- src/debugger/gui/RamWidget.cxx | 12 ++--- src/debugger/gui/RiotWidget.cxx | 68 +++++++++++++++++------------ src/debugger/gui/SaveKeyWidget.cxx | 17 ++++---- src/emucore/Control.hxx | 6 +-- src/emucore/Paddles.cxx | 8 ++-- src/emucore/Paddles.hxx | 2 + src/emucore/tia/TIA.cxx | 5 +-- src/emucore/tia/TIA.hxx | 1 - 15 files changed, 103 insertions(+), 84 deletions(-) diff --git a/src/debugger/gui/AtariVoxWidget.cxx b/src/debugger/gui/AtariVoxWidget.cxx index 865f1fcb5..c1892b580 100644 --- a/src/debugger/gui/AtariVoxWidget.cxx +++ b/src/debugger/gui/AtariVoxWidget.cxx @@ -25,15 +25,14 @@ AtariVoxWidget::AtariVoxWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (AtariVox):" : "Right (AtariVox):"; + const string& label = leftport ? "Left (AtariVox)" : "Right (AtariVox)"; - const int fontWidth = font.getMaxCharWidth(), - fontHeight = font.getFontHeight(), + const int fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(), bwidth = font.getStringWidth("Erase EEPROM") + 20, bheight = lineHeight + 4; - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (AtariVox):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (AtariVox)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, @@ -46,16 +45,18 @@ AtariVoxWidget::AtariVoxWidget(GuiObject* boss, const GUI::Font& font, myEEPROMErase->setTarget(this); ypos += lineHeight + 20; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + const GUI::Font& ifont = instance().frameBuffer().infoFont(); + lwidth = ifont.getMaxCharWidth() * 20; + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "(*) This will erase", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "all EEPROM data, not", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "just the range used", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "for this ROM", kTextAlignLeft); } diff --git a/src/debugger/gui/BoosterWidget.cxx b/src/debugger/gui/BoosterWidget.cxx index 7281c0594..6f5d83352 100644 --- a/src/debugger/gui/BoosterWidget.cxx +++ b/src/debugger/gui/BoosterWidget.cxx @@ -25,10 +25,10 @@ BoosterWidget::BoosterWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Booster):" : "Right (Booster):"; + const string& label = leftport ? "Left (Booster)" : "Right (Booster)"; const int fontHeight = font.getFontHeight(); - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Booster):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Booster)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, diff --git a/src/debugger/gui/DrivingWidget.cxx b/src/debugger/gui/DrivingWidget.cxx index 58bc4c10a..447b4196c 100644 --- a/src/debugger/gui/DrivingWidget.cxx +++ b/src/debugger/gui/DrivingWidget.cxx @@ -25,12 +25,12 @@ DrivingWidget::DrivingWidget(GuiObject* boss, const GUI::Font& font, myGreyIndex(0) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Driving):" : "Right (Driving):"; + const string& label = leftport ? "Left (Driving)" : "Right (Driving)"; const int fontHeight = font.getFontHeight(), bwidth = font.getStringWidth("Grey code +") + 10, bheight = font.getLineHeight() + 4; - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Driving):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Driving)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, diff --git a/src/debugger/gui/GenesisWidget.cxx b/src/debugger/gui/GenesisWidget.cxx index 668e2cf20..04626a954 100644 --- a/src/debugger/gui/GenesisWidget.cxx +++ b/src/debugger/gui/GenesisWidget.cxx @@ -25,10 +25,10 @@ GenesisWidget::GenesisWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Genesis):" : "Right (Genesis):"; + const string& label = leftport ? "Left (Genesis)" : "Right (Genesis)"; const int fontHeight = font.getFontHeight(); - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Genesis):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Genesis)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, diff --git a/src/debugger/gui/JoystickWidget.cxx b/src/debugger/gui/JoystickWidget.cxx index 6d9bc3453..21698f2aa 100644 --- a/src/debugger/gui/JoystickWidget.cxx +++ b/src/debugger/gui/JoystickWidget.cxx @@ -25,10 +25,10 @@ JoystickWidget::JoystickWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Joystick):" : "Right (Joystick):"; + const string& label = leftport ? "Left (Joystick)" : "Right (Joystick)"; const int fontHeight = font.getFontHeight(); - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Joystick):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Joystick)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, diff --git a/src/debugger/gui/KeyboardWidget.cxx b/src/debugger/gui/KeyboardWidget.cxx index d25f3e357..567aed9bf 100644 --- a/src/debugger/gui/KeyboardWidget.cxx +++ b/src/debugger/gui/KeyboardWidget.cxx @@ -25,10 +25,10 @@ KeyboardWidget::KeyboardWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Keyboard):" : "Right (Keyboard):"; + const string& label = leftport ? "Left (Keyboard)" : "Right (Keyboard)"; const int fontHeight = font.getFontHeight(); - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Keyboard):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Keyboard)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, diff --git a/src/debugger/gui/PaddleWidget.cxx b/src/debugger/gui/PaddleWidget.cxx index 5a9ae75a6..301f183cd 100644 --- a/src/debugger/gui/PaddleWidget.cxx +++ b/src/debugger/gui/PaddleWidget.cxx @@ -16,6 +16,7 @@ //============================================================================ #include "OSystem.hxx" +#include "Paddles.hxx" #include "EventHandler.hxx" #include "PaddleWidget.hxx" @@ -25,25 +26,26 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (Paddles):" : "Right (Paddles):"; + const string& label = leftport ? "Left (Paddles)" : "Right (Paddles)"; const int fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(); - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Paddles):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (Paddles)"); new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, fontHeight, label, kTextAlignLeft); ypos += lineHeight + 20; - const string& p0string = leftport ? "P0 pot: " : "P2 pot: "; - const string& p1string = leftport ? "P1 pot: " : "P3 pot: "; + const string& p0string = leftport ? "P0 pot " : "P2 pot "; + const string& p1string = leftport ? "P1 pot " : "P3 pot "; lwidth = font.getStringWidth("P3 pot: "); myP0Resistance = new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p0string, lwidth, kP0Changed); - myP0Resistance->setMinValue(0); myP0Resistance->setMaxValue(1400000); - myP0Resistance->setStepValue(1400000/100); + myP0Resistance->setMinValue(0); + myP0Resistance->setMaxValue(Paddles::MAX_RESISTANCE); + myP0Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); myP0Resistance->setTarget(this); xpos += 20; ypos += myP0Resistance->getHeight() + 4; @@ -55,8 +57,9 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, myP1Resistance = new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p1string, lwidth, kP1Changed); - myP1Resistance->setMinValue(0); myP1Resistance->setMaxValue(1400000); - myP1Resistance->setStepValue(1400000/100); + myP1Resistance->setMinValue(0); + myP1Resistance->setMaxValue(Paddles::MAX_RESISTANCE); + myP1Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); myP1Resistance->setTarget(this); xpos += 20; ypos += myP1Resistance->getHeight() + 4; @@ -68,8 +71,10 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PaddleWidget::loadConfig() { - myP0Resistance->setValue(1400000 - Int32(myController.read(Controller::Nine))); - myP1Resistance->setValue(1400000 - Int32(myController.read(Controller::Five))); + myP0Resistance->setValue(Paddles::MAX_RESISTANCE - + Int32(myController.read(Controller::Nine))); + myP1Resistance->setValue(Paddles::MAX_RESISTANCE - + Int32(myController.read(Controller::Five))); myP0Fire->setState(!myController.read(Controller::Four)); myP1Fire->setState(!myController.read(Controller::Three)); } @@ -81,10 +86,12 @@ void PaddleWidget::handleCommand( switch(cmd) { case kP0Changed: - myController.set(Controller::Nine, 1400000 - myP0Resistance->getValue()); + myController.set(Controller::Nine, + Paddles::MAX_RESISTANCE - myP0Resistance->getValue()); break; case kP1Changed: - myController.set(Controller::Five, 1400000 - myP1Resistance->getValue()); + myController.set(Controller::Five, + Paddles::MAX_RESISTANCE - myP1Resistance->getValue()); break; case kP0Fire: myController.set(Controller::Four, !myP0Fire->getState()); diff --git a/src/debugger/gui/RamWidget.cxx b/src/debugger/gui/RamWidget.cxx index 1d7f218cd..9b09a79ff 100644 --- a/src/debugger/gui/RamWidget.cxx +++ b/src/debugger/gui/RamWidget.cxx @@ -115,18 +115,18 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n // Add Binary display of selected RAM cell xpos = x + w - 13*myFontWidth - 20; - new StaticTextWidget(boss, lfont, xpos, ypos, 4*myFontWidth, myFontHeight, + new StaticTextWidget(boss, lfont, xpos, ypos, 3*myFontWidth, myFontHeight, "Bin", kTextAlignLeft); - myBinValue = new DataGridWidget(boss, nfont, xpos + 4*myFontWidth + 5, ypos-2, + myBinValue = new DataGridWidget(boss, nfont, xpos + 3*myFontWidth + 5, ypos-2, 1, 1, 8, 8, Common::Base::F_2); myBinValue->setTarget(this); myBinValue->setID(kRamBinID); // Add Decimal display of selected RAM cell xpos -= 8*myFontWidth + 5 + 20; - new StaticTextWidget(boss, lfont, xpos, ypos, 4*myFontWidth, myFontHeight, + new StaticTextWidget(boss, lfont, xpos, ypos, 3*myFontWidth, myFontHeight, "Dec", kTextAlignLeft); - myDecValue = new DataGridWidget(boss, nfont, xpos + 4*myFontWidth + 5, ypos-2, + myDecValue = new DataGridWidget(boss, nfont, xpos + 3*myFontWidth + 5, ypos-2, 1, 1, 3, 8, Common::Base::F_10); myDecValue->setTarget(this); myDecValue->setID(kRamDecID); @@ -137,9 +137,9 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n // Add Label of selected RAM cell int xpos_r = xpos - 20; xpos = x + 10; - new StaticTextWidget(boss, lfont, xpos, ypos, 6*myFontWidth, myFontHeight, + new StaticTextWidget(boss, lfont, xpos, ypos, 5*myFontWidth, myFontHeight, "Label", kTextAlignLeft); - xpos += 6*myFontWidth + 5; + xpos += 5*myFontWidth + 5; myLabel = new EditTextWidget(boss, nfont, xpos, ypos-2, xpos_r-xpos, myLineHeight); myLabel->setEditable(false, true); diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index 95a8be853..d35e6fbfa 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -48,7 +48,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, const int fontWidth = lfont.getMaxCharWidth(), fontHeight = lfont.getFontHeight(), lineHeight = lfont.getLineHeight(); - int xpos = 10, ypos = 25, lwidth = 9 * fontWidth, col = 0; + int xpos = 10, ypos = 25, lwidth = 8 * fontWidth, col = 0; StaticTextWidget* t; VariantList items; @@ -73,50 +73,50 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, bits->setList(off, on); // SWCHA bits in 'poke' mode - CREATE_IO_REGS("SWCHA(W):", mySWCHAWriteBits, kSWCHABitsID, true); + CREATE_IO_REGS("SWCHA(W)", mySWCHAWriteBits, kSWCHABitsID, true); col = xpos + 20; // remember this for adding widgets to the second column // SWACNT bits xpos = 10; ypos += lineHeight + 5; - CREATE_IO_REGS("SWACNT:", mySWACNTBits, kSWACNTBitsID, true); + CREATE_IO_REGS("SWACNT", mySWACNTBits, kSWACNTBitsID, true); // SWCHA bits in 'peek' mode xpos = 10; ypos += lineHeight + 5; - CREATE_IO_REGS("SWCHA(R):", mySWCHAReadBits, 0, false); + CREATE_IO_REGS("SWCHA(R)", mySWCHAReadBits, 0, false); // SWCHB bits in 'poke' mode xpos = 10; ypos += 2 * lineHeight; - CREATE_IO_REGS("SWCHB(W):", mySWCHBWriteBits, kSWCHBBitsID, true); + CREATE_IO_REGS("SWCHB(W)", mySWCHBWriteBits, kSWCHBBitsID, true); // SWBCNT bits xpos = 10; ypos += lineHeight + 5; - CREATE_IO_REGS("SWBCNT:", mySWBCNTBits, kSWBCNTBitsID, true); + CREATE_IO_REGS("SWBCNT", mySWBCNTBits, kSWBCNTBitsID, true); // SWCHB bits in 'peek' mode xpos = 10; ypos += lineHeight + 5; - CREATE_IO_REGS("SWCHB(R):", mySWCHBReadBits, 0, false); + CREATE_IO_REGS("SWCHB(R)", mySWCHBReadBits, 0, false); // Timer registers (R/W) - const char* writeNames[] = { "TIM1T:", "TIM8T:", "TIM64T:", "T1024T:" }; + const char* writeNames[] = { "TIM1T", "TIM8T", "TIM64T", "T1024T" }; xpos = 10; ypos += 2*lineHeight; for(int row = 0; row < 4; ++row) { t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, - 9*fontWidth, fontHeight, writeNames[row], kTextAlignLeft); + lwidth, fontHeight, writeNames[row], kTextAlignLeft); } - xpos += 9*fontWidth + 5; + xpos += t->getWidth() + 5; myTimWrite = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 2, 8, Common::Base::F_16); myTimWrite->setTarget(this); myTimWrite->setID(kTimWriteID); addFocusWidget(myTimWrite); // Timer registers (RO) - const char* readNames[] = { "INTIM:", "TIMINT:", "Total Clks:", "INTIM Clks:" }; + const char* readNames[] = { "INTIM", "TIMINT", "Total Clks", "INTIM Clks" }; xpos = 10; ypos += myTimWrite->getHeight() + lineHeight; for(int row = 0; row < 4; ++row) { t = new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, - 11*fontWidth, fontHeight, readNames[row], kTextAlignLeft); + 10*fontWidth, fontHeight, readNames[row], kTextAlignLeft); } xpos += t->getWidth() + 5; myTimRead = new DataGridWidget(boss, nfont, xpos, ypos, 1, 4, 8, 32, Common::Base::F_16); @@ -133,27 +133,27 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, riot.controller(Controller::Right)); // TIA INPTx registers (R), left port - const char* contLeftReadNames[] = { "INPT0:", "INPT1:", "INPT4:" }; + const char* contLeftReadNames[] = { "INPT0", "INPT1", "INPT4" }; xpos = col; ypos += myLeftControl->getHeight() + 2 * lineHeight; for(int row = 0; row < 3; ++row) { new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, - 6*fontWidth, fontHeight, contLeftReadNames[row], kTextAlignLeft); + 5*fontWidth, fontHeight, contLeftReadNames[row], kTextAlignLeft); } - xpos += 6*fontWidth + 5; + xpos += 5*fontWidth + 5; myLeftINPT = new DataGridWidget(boss, nfont, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16); myLeftINPT->setTarget(this); myLeftINPT->setEditable(false); // TIA INPTx registers (R), right port - const char* contRightReadNames[] = { "INPT2:", "INPT3:", "INPT5:" }; + const char* contRightReadNames[] = { "INPT2", "INPT3", "INPT5" }; xpos = col + myLeftControl->getWidth() + 15; for(int row = 0; row < 3; ++row) { new StaticTextWidget(boss, lfont, xpos, ypos + row*lineHeight + 2, - 6*fontWidth, fontHeight, contRightReadNames[row], kTextAlignLeft); + 5*fontWidth, fontHeight, contRightReadNames[row], kTextAlignLeft); } - xpos += 6*fontWidth + 5; + xpos += 5*fontWidth + 5; myRightINPT = new DataGridWidget(boss, nfont, xpos, ypos, 1, 3, 2, 8, Common::Base::F_16); myRightINPT->setTarget(this); myRightINPT->setEditable(false); @@ -170,19 +170,19 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, // PO & P1 difficulty switches int pwidth = lfont.getStringWidth("B/easy"); - lwidth = lfont.getStringWidth("P0 Diff: "); + lwidth = lfont.getStringWidth("P0 Diff "); xpos = col; ypos += 2 * lineHeight; int col2_ypos = ypos; items.clear(); VarList::push_back(items, "B/easy", "b"); VarList::push_back(items, "A/hard", "a"); myP0Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items, - "P0 Diff: ", lwidth, kP0DiffChanged); + "P0 Diff ", lwidth, kP0DiffChanged); myP0Diff->setTarget(this); addFocusWidget(myP0Diff); ypos += myP0Diff->getHeight() + 5; myP1Diff = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items, - "P1 Diff: ", lwidth, kP1DiffChanged); + "P1 Diff ", lwidth, kP1DiffChanged); myP1Diff->setTarget(this); addFocusWidget(myP1Diff); @@ -192,7 +192,7 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& lfont, VarList::push_back(items, "B&W", "bw"); VarList::push_back(items, "Color", "color"); myTVType = new PopUpWidget(boss, lfont, xpos, ypos, pwidth, lineHeight, items, - "TV Type: ", lwidth, kTVTypeChanged); + "TV Type ", lwidth, kTVTypeChanged); myTVType->setTarget(this); addFocusWidget(myTVType); @@ -436,23 +436,33 @@ ControllerWidget* RiotWidget::addControlWidget(GuiObject* boss, const GUI::Font& { switch(controller.type()) { - case Controller::Joystick: - return new JoystickWidget(boss, font, x, y, controller); - case Controller::Paddles: - return new PaddleWidget(boss, font, x, y, controller); + case Controller::AmigaMouse: // TODO - implement this + return new NullControlWidget(boss, font, x, y, controller); + case Controller::AtariMouse: // TODO - implement this + return new NullControlWidget(boss, font, x, y, controller); + case Controller::AtariVox: + return new AtariVoxWidget(boss, font, x, y, controller); case Controller::BoosterGrip: return new BoosterWidget(boss, font, x, y, controller); + case Controller::CompuMate: // TODO - implement this + return new NullControlWidget(boss, font, x, y, controller); case Controller::Driving: return new DrivingWidget(boss, font, x, y, controller); case Controller::Genesis: return new GenesisWidget(boss, font, x, y, controller); + case Controller::Joystick: + return new JoystickWidget(boss, font, x, y, controller); case Controller::Keyboard: return new KeyboardWidget(boss, font, x, y, controller); - case Controller::AtariVox: - return new AtariVoxWidget(boss, font, x, y, controller); + case Controller::KidVid: // TODO - implement this + return new NullControlWidget(boss, font, x, y, controller); + case Controller::MindLink: // TODO - implement this + return new NullControlWidget(boss, font, x, y, controller); + case Controller::Paddles: + return new PaddleWidget(boss, font, x, y, controller); case Controller::SaveKey: return new SaveKeyWidget(boss, font, x, y, controller); - default: + case Controller::TrakBall: // TODO - implement this return new NullControlWidget(boss, font, x, y, controller); } } diff --git a/src/debugger/gui/SaveKeyWidget.cxx b/src/debugger/gui/SaveKeyWidget.cxx index 8988cc8c9..02e903022 100644 --- a/src/debugger/gui/SaveKeyWidget.cxx +++ b/src/debugger/gui/SaveKeyWidget.cxx @@ -25,15 +25,14 @@ SaveKeyWidget::SaveKeyWidget(GuiObject* boss, const GUI::Font& font, : ControllerWidget(boss, font, x, y, controller) { bool leftport = myController.jack() == Controller::Left; - const string& label = leftport ? "Left (SaveKey):" : "Right (SaveKey):"; + const string& label = leftport ? "Left (SaveKey)" : "Right (SaveKey)"; - const int fontWidth = font.getMaxCharWidth(), - fontHeight = font.getFontHeight(), + const int fontHeight = font.getFontHeight(), lineHeight = font.getLineHeight(), bwidth = font.getStringWidth("Erase EEPROM") + 20, bheight = lineHeight + 4; - int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (SaveKey):"); + int xpos = x, ypos = y, lwidth = font.getStringWidth("Right (SaveKey)"); StaticTextWidget* t; t = new StaticTextWidget(boss, font, xpos, ypos+2, lwidth, @@ -46,16 +45,18 @@ SaveKeyWidget::SaveKeyWidget(GuiObject* boss, const GUI::Font& font, myEEPROMErase->setTarget(this); ypos += lineHeight + 20; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + const GUI::Font& ifont = instance().frameBuffer().infoFont(); + lwidth = ifont.getMaxCharWidth() * 20; + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "(*) This will erase", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "all EEPROM data, not", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "just the range used", kTextAlignLeft); ypos += lineHeight + 2; - new StaticTextWidget(boss, font, xpos, ypos, fontWidth*22, + new StaticTextWidget(boss, ifont, xpos, ypos, lwidth, fontHeight, "for this ROM", kTextAlignLeft); } diff --git a/src/emucore/Control.hxx b/src/emucore/Control.hxx index 0c6263d48..7645f7693 100644 --- a/src/emucore/Control.hxx +++ b/src/emucore/Control.hxx @@ -87,9 +87,9 @@ class Controller : public Serializable */ enum Type { - BoosterGrip, Driving, Keyboard, Paddles, Joystick, - AmigaMouse, AtariMouse, TrakBall, AtariVox, SaveKey, - KidVid, Genesis, MindLink, CompuMate + AmigaMouse, AtariMouse, AtariVox, BoosterGrip, CompuMate, + Driving, Genesis, Joystick, Keyboard, KidVid, MindLink, + Paddles, SaveKey, TrakBall }; public: diff --git a/src/emucore/Paddles.cxx b/src/emucore/Paddles.cxx index 52b0b33d6..106f93715 100644 --- a/src/emucore/Paddles.cxx +++ b/src/emucore/Paddles.cxx @@ -260,12 +260,12 @@ void Paddles::update() int sa_yaxis = myEvent.get(myP1AxisValue); if(abs(myLastAxisX - sa_xaxis) > 10) { - myAnalogPinValue[Nine] = Int32(1400000 * ((32767 - Int16(sa_xaxis)) / 65536.0)); + myAnalogPinValue[Nine] = Int32(MAX_RESISTANCE * ((32767 - Int16(sa_xaxis)) / 65536.0)); sa_changed = true; } if(abs(myLastAxisY - sa_yaxis) > 10) { - myAnalogPinValue[Five] = Int32(1400000 * ((32767 - Int16(sa_yaxis)) / 65536.0)); + myAnalogPinValue[Five] = Int32(MAX_RESISTANCE * ((32767 - Int16(sa_yaxis)) / 65536.0)); sa_changed = true; } myLastAxisX = sa_xaxis; @@ -353,10 +353,10 @@ void Paddles::update() // Only change state if the charge has actually changed if(myCharge[1] != myLastCharge[1]) myAnalogPinValue[Five] = - Int32(1400000 * (myCharge[1] / float(TRIGMAX))); + Int32(MAX_RESISTANCE * (myCharge[1] / float(TRIGMAX))); if(myCharge[0] != myLastCharge[0]) myAnalogPinValue[Nine] = - Int32(1400000 * (myCharge[0] / float(TRIGMAX))); + Int32(MAX_RESISTANCE * (myCharge[0] / float(TRIGMAX))); myLastCharge[1] = myCharge[1]; myLastCharge[0] = myCharge[0]; diff --git a/src/emucore/Paddles.hxx b/src/emucore/Paddles.hxx index 31f716565..3d126381c 100644 --- a/src/emucore/Paddles.hxx +++ b/src/emucore/Paddles.hxx @@ -104,6 +104,8 @@ class Paddles : public Controller */ static void setPaddleRange(int range); + static constexpr double MAX_RESISTANCE = 1400000.0; + private: // Pre-compute the events we care about based on given port // This will eliminate test for left or right port in update() diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index fefd711ea..47c96fc70 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -19,6 +19,7 @@ #include "M6502.hxx" #include "Console.hxx" #include "Control.hxx" +#include "Paddles.hxx" #ifdef DEBUGGER_SUPPORT #include "CartDebug.hxx" @@ -1326,8 +1327,6 @@ void TIA::delayedWrite(uInt8 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TIA::updatePaddle(uInt8 idx) { - static constexpr double MAX_RESISTANCE = 1400000; - Int32 resistance; switch (idx) { case 0: @@ -1351,7 +1350,7 @@ void TIA::updatePaddle(uInt8 idx) } myPaddleReaders[idx].update( - (resistance == Controller::maximumResistance ? -1 : double(resistance)) / MAX_RESISTANCE, + (resistance == Controller::maximumResistance ? -1 : double(resistance)) / Paddles::MAX_RESISTANCE, myTimestamp, myFrameManager.layout() ); diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index 061f426c0..4227dcd28 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -52,7 +52,6 @@ class TIA : public Device { public: - enum DummyRegisters: uInt8 { shuffleP0 = 0xF0, shuffleP1 = 0xF1, From 1eca60dac5171d79ed132c837ba7a560dfc0e8d5 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 6 May 2017 16:52:40 -0230 Subject: [PATCH 2/6] Great colon purge Part3: all debugger ROM bankswitch tabs. --- src/debugger/gui/Cart0840Widget.cxx | 4 +- src/debugger/gui/Cart3EPlusWidget.cxx | 6 +- src/debugger/gui/Cart3EWidget.cxx | 8 +- src/debugger/gui/Cart3FWidget.cxx | 2 +- src/debugger/gui/Cart4A50Widget.cxx | 14 +-- src/debugger/gui/CartARWidget.cxx | 4 +- src/debugger/gui/CartBFSCWidget.cxx | 152 ++++++++++++------------- src/debugger/gui/CartBFWidget.cxx | 152 ++++++++++++------------- src/debugger/gui/CartBUSWidget.cxx | 40 +++---- src/debugger/gui/CartCDFWidget.cxx | 4 +- src/debugger/gui/CartCMWidget.cxx | 18 +-- src/debugger/gui/CartCTYWidget.cxx | 22 ++-- src/debugger/gui/CartCVPlusWidget.cxx | 2 +- src/debugger/gui/CartDASHWidget.cxx | 4 +- src/debugger/gui/CartDFSCWidget.cxx | 80 ++++++------- src/debugger/gui/CartDFWidget.cxx | 80 ++++++------- src/debugger/gui/CartDPCPlusWidget.cxx | 46 ++++---- src/debugger/gui/CartDPCWidget.cxx | 34 +++--- src/debugger/gui/CartE0Widget.cxx | 26 ++--- src/debugger/gui/CartE7Widget.cxx | 14 +-- src/debugger/gui/CartEFSCWidget.cxx | 44 +++---- src/debugger/gui/CartEFWidget.cxx | 44 +++---- src/debugger/gui/CartF0Widget.cxx | 6 +- src/debugger/gui/CartF4SCWidget.cxx | 26 ++--- src/debugger/gui/CartF4Widget.cxx | 26 ++--- src/debugger/gui/CartF6SCWidget.cxx | 18 +-- src/debugger/gui/CartF6Widget.cxx | 18 +-- src/debugger/gui/CartF8SCWidget.cxx | 16 +-- src/debugger/gui/CartF8Widget.cxx | 14 +-- src/debugger/gui/CartFA2Widget.cxx | 30 ++--- src/debugger/gui/CartFAWidget.cxx | 16 +-- src/debugger/gui/CartMCWidget.cxx | 10 +- src/debugger/gui/CartMDMWidget.cxx | 4 +- src/debugger/gui/CartSBWidget.cxx | 4 +- src/debugger/gui/CartUAWidget.cxx | 4 +- src/debugger/gui/CartWDWidget.cxx | 4 +- src/debugger/gui/CartX07Widget.cxx | 4 +- src/debugger/gui/RomWidget.cxx | 2 +- 38 files changed, 501 insertions(+), 501 deletions(-) diff --git a/src/debugger/gui/Cart0840Widget.cxx b/src/debugger/gui/Cart0840Widget.cxx index 1f1fa6762..bb1da1406 100644 --- a/src/debugger/gui/Cart0840Widget.cxx +++ b/src/debugger/gui/Cart0840Widget.cxx @@ -50,8 +50,8 @@ Cartridge0840Widget::Cartridge0840Widget( VarList::push_back(items, "1 ($840)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($800) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/Cart3EPlusWidget.cxx b/src/debugger/gui/Cart3EPlusWidget.cxx index 6098cbbd3..4aafabf2b 100644 --- a/src/debugger/gui/Cart3EPlusWidget.cxx +++ b/src/debugger/gui/Cart3EPlusWidget.cxx @@ -59,7 +59,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget( int xpos_s, ypos_s = ypos; ostringstream label; - label << "Set segment " << i << " as: "; + label << "Set segment " << i << " as "; new StaticTextWidget(boss, _font, xpos, ypos, _font.getStringWidth(label.str()), myFontHeight, label.str(), kTextAlignLeft); @@ -99,7 +99,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget( int xoffset = xpos_s+t->getWidth() + 10; myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s, w - xoffset - 10, myLineHeight, ""); - myBankState[2*i]->setEditable(false); + myBankState[2*i]->setEditable(false, true); ypos_s += myLineHeight + 4; label.str(""); @@ -109,7 +109,7 @@ Cartridge3EPlusWidget::Cartridge3EPlusWidget( myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s, w - xoffset - 10, myLineHeight, ""); - myBankState[2*i+1]->setEditable(false); + myBankState[2*i+1]->setEditable(false, true); xpos = 10; ypos+= 2 * myLineHeight; diff --git a/src/debugger/gui/Cart3EWidget.cxx b/src/debugger/gui/Cart3EWidget.cxx index 849c4d80a..02fa1147b 100644 --- a/src/debugger/gui/Cart3EWidget.cxx +++ b/src/debugger/gui/Cart3EWidget.cxx @@ -71,16 +71,16 @@ Cartridge3EWidget::Cartridge3EWidget( xpos += 40; myROMBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3E) "), - myLineHeight, romitems, "ROM ($3F): ", - _font.getStringWidth("ROM ($3F): "), kROMBankChanged); + myLineHeight, romitems, "ROM ($3F) ", + _font.getStringWidth("ROM ($3F) "), kROMBankChanged); myROMBank->setTarget(this); addFocusWidget(myROMBank); xpos += myROMBank->getWidth() + 20; myRAMBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3E) "), - myLineHeight, ramitems, "RAM ($3E): ", - _font.getStringWidth("RAM ($3E): "), kRAMBankChanged); + myLineHeight, ramitems, "RAM ($3E) ", + _font.getStringWidth("RAM ($3E) "), kRAMBankChanged); myRAMBank->setTarget(this); addFocusWidget(myRAMBank); } diff --git a/src/debugger/gui/Cart3FWidget.cxx b/src/debugger/gui/Cart3FWidget.cxx index 9059ca0df..9f7592d1b 100644 --- a/src/debugger/gui/Cart3FWidget.cxx +++ b/src/debugger/gui/Cart3FWidget.cxx @@ -48,7 +48,7 @@ Cartridge3FWidget::Cartridge3FWidget( ostringstream label; label << "Set bank ($" << Common::Base::HEX4 << start << " - $" << - (start+0x7FF) << "): "; + (start+0x7FF) << ") "; myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($3F) "), myLineHeight, items, label.str(), diff --git a/src/debugger/gui/Cart4A50Widget.cxx b/src/debugger/gui/Cart4A50Widget.cxx index 6e94a438c..37aff950f 100644 --- a/src/debugger/gui/Cart4A50Widget.cxx +++ b/src/debugger/gui/Cart4A50Widget.cxx @@ -60,7 +60,7 @@ Cartridge4A50Widget::Cartridge4A50Widget( string highlabel = "Set high 256B region ($FE00 - $FEFF): "; const int lwidth = _font.getStringWidth(middlelabel), fwidth = _font.getStringWidth("Inactive"), - flwidth = _font.getStringWidth("ROM: "); + flwidth = _font.getStringWidth("ROM "); // Lower bank/region configuration xpos = 10; @@ -71,14 +71,14 @@ Cartridge4A50Widget::Cartridge4A50Widget( xpos += 40; myROMLower = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items32, "ROM: ", flwidth, kROMLowerChanged); + items32, "ROM ", flwidth, kROMLowerChanged); myROMLower->setTarget(this); addFocusWidget(myROMLower); xpos += myROMLower->getWidth() + 20; myRAMLower = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items16, "RAM: ", flwidth, kRAMLowerChanged); + items16, "RAM ", flwidth, kRAMLowerChanged); myRAMLower->setTarget(this); addFocusWidget(myRAMLower); @@ -91,14 +91,14 @@ Cartridge4A50Widget::Cartridge4A50Widget( xpos += 40; myROMMiddle = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items32, "ROM: ", flwidth, kROMMiddleChanged); + items32, "ROM ", flwidth, kROMMiddleChanged); myROMMiddle->setTarget(this); addFocusWidget(myROMMiddle); xpos += myROMMiddle->getWidth() + 20; myRAMMiddle = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items16, "RAM: ", flwidth, kRAMMiddleChanged); + items16, "RAM ", flwidth, kRAMMiddleChanged); myRAMMiddle->setTarget(this); addFocusWidget(myRAMMiddle); @@ -111,14 +111,14 @@ Cartridge4A50Widget::Cartridge4A50Widget( xpos += 40; myROMHigh = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items256, "ROM: ", flwidth, kROMHighChanged); + items256, "ROM ", flwidth, kROMHighChanged); myROMHigh->setTarget(this); addFocusWidget(myROMHigh); xpos += myROMHigh->getWidth() + 20; myRAMHigh = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, - items128, "RAM: ", flwidth, kRAMHighChanged); + items128, "RAM ", flwidth, kRAMHighChanged); myRAMHigh->setTarget(this); addFocusWidget(myRAMHigh); } diff --git a/src/debugger/gui/CartARWidget.cxx b/src/debugger/gui/CartARWidget.cxx index 23ed7f58b..5838dbbae 100644 --- a/src/debugger/gui/CartARWidget.cxx +++ b/src/debugger/gui/CartARWidget.cxx @@ -70,8 +70,8 @@ CartridgeARWidget::CartridgeARWidget( VarList::push_back(items, " 31"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" XX "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/CartBFSCWidget.cxx b/src/debugger/gui/CartBFSCWidget.cxx index ce0dbeb81..8fd17eff2 100644 --- a/src/debugger/gui/CartBFSCWidget.cxx +++ b/src/debugger/gui/CartBFSCWidget.cxx @@ -40,82 +40,82 @@ CartridgeBFSCWidget::CartridgeBFSCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << (start + 0x100) - << " - " << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << " - " << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($F80)"); - VarList::push_back(items, " 1 ($F81)"); - VarList::push_back(items, " 2 ($F82)"); - VarList::push_back(items, " 3 ($F83)"); - VarList::push_back(items, " 4 ($F84)"); - VarList::push_back(items, " 5 ($F85)"); - VarList::push_back(items, " 6 ($F86)"); - VarList::push_back(items, " 7 ($F87)"); - VarList::push_back(items, " 8 ($F88)"); - VarList::push_back(items, " 9 ($F89)"); - VarList::push_back(items, "10 ($F8A)"); - VarList::push_back(items, "11 ($F8B)"); - VarList::push_back(items, "12 ($F8C)"); - VarList::push_back(items, "13 ($F8D)"); - VarList::push_back(items, "14 ($F8E)"); - VarList::push_back(items, "15 ($F8F)"); - VarList::push_back(items, "16 ($F90)"); - VarList::push_back(items, "17 ($F91)"); - VarList::push_back(items, "18 ($F92)"); - VarList::push_back(items, "19 ($F93)"); - VarList::push_back(items, "20 ($F94)"); - VarList::push_back(items, "21 ($F95)"); - VarList::push_back(items, "22 ($F96)"); - VarList::push_back(items, "23 ($F97)"); - VarList::push_back(items, "24 ($F98)"); - VarList::push_back(items, "25 ($F99)"); - VarList::push_back(items, "26 ($F9A)"); - VarList::push_back(items, "27 ($F9B)"); - VarList::push_back(items, "28 ($F9C)"); - VarList::push_back(items, "29 ($F9D)"); - VarList::push_back(items, "30 ($F9E)"); - VarList::push_back(items, "31 ($F9F)"); - VarList::push_back(items, "32 ($FA0)"); - VarList::push_back(items, "33 ($FA1)"); - VarList::push_back(items, "34 ($FA2)"); - VarList::push_back(items, "35 ($FA3)"); - VarList::push_back(items, "36 ($FA4)"); - VarList::push_back(items, "37 ($FA5)"); - VarList::push_back(items, "38 ($FA6)"); - VarList::push_back(items, "39 ($FA7)"); - VarList::push_back(items, "40 ($FA8)"); - VarList::push_back(items, "41 ($FA9)"); - VarList::push_back(items, "42 ($FAA)"); - VarList::push_back(items, "43 ($FAB)"); - VarList::push_back(items, "44 ($FAC)"); - VarList::push_back(items, "45 ($FAD)"); - VarList::push_back(items, "46 ($FAE)"); - VarList::push_back(items, "47 ($FAF)"); - VarList::push_back(items, "48 ($FB0)"); - VarList::push_back(items, "49 ($FB1)"); - VarList::push_back(items, "50 ($FB2)"); - VarList::push_back(items, "51 ($FB3)"); - VarList::push_back(items, "52 ($FB4)"); - VarList::push_back(items, "53 ($FB5)"); - VarList::push_back(items, "54 ($FB6)"); - VarList::push_back(items, "55 ($FB7)"); - VarList::push_back(items, "56 ($FB8)"); - VarList::push_back(items, "57 ($FB9)"); - VarList::push_back(items, "58 ($FBA)"); - VarList::push_back(items, "59 ($FBB)"); - VarList::push_back(items, "60 ($FBC)"); - VarList::push_back(items, "61 ($FBD)"); - VarList::push_back(items, "62 ($FBE)"); - VarList::push_back(items, "63 ($FBF)"); + VarList::push_back(items, " 0 ($FF80)"); + VarList::push_back(items, " 1 ($FF81)"); + VarList::push_back(items, " 2 ($FF82)"); + VarList::push_back(items, " 3 ($FF83)"); + VarList::push_back(items, " 4 ($FF84)"); + VarList::push_back(items, " 5 ($FF85)"); + VarList::push_back(items, " 6 ($FF86)"); + VarList::push_back(items, " 7 ($FF87)"); + VarList::push_back(items, " 8 ($FF88)"); + VarList::push_back(items, " 9 ($FF89)"); + VarList::push_back(items, "10 ($FF8A)"); + VarList::push_back(items, "11 ($FF8B)"); + VarList::push_back(items, "12 ($FF8C)"); + VarList::push_back(items, "13 ($FF8D)"); + VarList::push_back(items, "14 ($FF8E)"); + VarList::push_back(items, "15 ($FF8F)"); + VarList::push_back(items, "16 ($FF90)"); + VarList::push_back(items, "17 ($FF91)"); + VarList::push_back(items, "18 ($FF92)"); + VarList::push_back(items, "19 ($FF93)"); + VarList::push_back(items, "20 ($FF94)"); + VarList::push_back(items, "21 ($FF95)"); + VarList::push_back(items, "22 ($FF96)"); + VarList::push_back(items, "23 ($FF97)"); + VarList::push_back(items, "24 ($FF98)"); + VarList::push_back(items, "25 ($FF99)"); + VarList::push_back(items, "26 ($FF9A)"); + VarList::push_back(items, "27 ($FF9B)"); + VarList::push_back(items, "28 ($FF9C)"); + VarList::push_back(items, "29 ($FF9D)"); + VarList::push_back(items, "30 ($FF9E)"); + VarList::push_back(items, "31 ($FF9F)"); + VarList::push_back(items, "32 ($FFA0)"); + VarList::push_back(items, "33 ($FFA1)"); + VarList::push_back(items, "34 ($FFA2)"); + VarList::push_back(items, "35 ($FFA3)"); + VarList::push_back(items, "36 ($FFA4)"); + VarList::push_back(items, "37 ($FFA5)"); + VarList::push_back(items, "38 ($FFA6)"); + VarList::push_back(items, "39 ($FFA7)"); + VarList::push_back(items, "40 ($FFA8)"); + VarList::push_back(items, "41 ($FFA9)"); + VarList::push_back(items, "42 ($FFAA)"); + VarList::push_back(items, "43 ($FFAB)"); + VarList::push_back(items, "44 ($FFAC)"); + VarList::push_back(items, "45 ($FFAD)"); + VarList::push_back(items, "46 ($FFAE)"); + VarList::push_back(items, "47 ($FFAF)"); + VarList::push_back(items, "48 ($FFB0)"); + VarList::push_back(items, "49 ($FFB1)"); + VarList::push_back(items, "50 ($FFB2)"); + VarList::push_back(items, "51 ($FFB3)"); + VarList::push_back(items, "52 ($FFB4)"); + VarList::push_back(items, "53 ($FFB5)"); + VarList::push_back(items, "54 ($FFB6)"); + VarList::push_back(items, "55 ($FFB7)"); + VarList::push_back(items, "56 ($FFB8)"); + VarList::push_back(items, "57 ($FFB9)"); + VarList::push_back(items, "58 ($FFBA)"); + VarList::push_back(items, "59 ($FFBB)"); + VarList::push_back(items, "60 ($FFBC)"); + VarList::push_back(items, "61 ($FFBD)"); + VarList::push_back(items, "62 ($FFBE)"); + VarList::push_back(items, "63 ($FFBF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("63 ($FBF) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("63 ($FFBF) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -158,14 +158,14 @@ string CartridgeBFSCWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$F80", "$F81", "$F82", "$F83", "$F84", "$F85", "$F86", "$F87", - "$F88", "$F89", "$F8A", "$F8B", "$F8C", "$F8D", "$F8E", "$F8F", - "$F90", "$F91", "$F92", "$F93", "$F94", "$F95", "$F96", "$F97", - "$F98", "$F99", "$F9A", "$F9B", "$F9C", "$F9D", "$F9E", "$F9F", - "$FA0", "$FA1", "$FA2", "$FA3", "$FA4", "$FA5", "$FA6", "$FA7", - "$FA8", "$FA9", "$FAA", "$FAB", "$FAC", "$FAD", "$FAE", "$FAF", - "$FB0", "$FB1", "$FB2", "$FB3", "$FB4", "$FB5", "$FB6", "$FB7", - "$FB8", "$FB9", "$FBA", "$FBB", "$FBC", "$FBD", "$FBE", "$FBF" + "$FF80", "$FF81", "$FF82", "$FF83", "$FF84", "$FF85", "$FF86", "$FF87", + "$FF88", "$FF89", "$FF8A", "$FF8B", "$FF8C", "$FF8D", "$FF8E", "$FF8F", + "$FF90", "$FF91", "$FF92", "$FF93", "$FF94", "$FF95", "$FF96", "$FF97", + "$FF98", "$FF99", "$FF9A", "$FF9B", "$FF9C", "$FF9D", "$FF9E", "$FF9F", + "$FFA0", "$FFA1", "$FFA2", "$FFA3", "$FFA4", "$FFA5", "$FFA6", "$FFA7", + "$FFA8", "$FFA9", "$FFAA", "$FFAB", "$FFAC", "$FFAD", "$FFAE", "$FFAF", + "$FFB0", "$FFB1", "$FFB2", "$FFB3", "$FFB4", "$FFB5", "$FFB6", "$FFB7", + "$FFB8", "$FFB9", "$FFBA", "$FFBB", "$FFBC", "$FFBD", "$FFBE", "$FFBF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartBFWidget.cxx b/src/debugger/gui/CartBFWidget.cxx index 72892bcdf..f204cbf32 100644 --- a/src/debugger/gui/CartBFWidget.cxx +++ b/src/debugger/gui/CartBFWidget.cxx @@ -38,82 +38,82 @@ CartridgeBFWidget::CartridgeBFWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($F80)"); - VarList::push_back(items, " 1 ($F81)"); - VarList::push_back(items, " 2 ($F82)"); - VarList::push_back(items, " 3 ($F83)"); - VarList::push_back(items, " 4 ($F84)"); - VarList::push_back(items, " 5 ($F85)"); - VarList::push_back(items, " 6 ($F86)"); - VarList::push_back(items, " 7 ($F87)"); - VarList::push_back(items, " 8 ($F88)"); - VarList::push_back(items, " 9 ($F89)"); - VarList::push_back(items, "10 ($F8A)"); - VarList::push_back(items, "11 ($F8B)"); - VarList::push_back(items, "12 ($F8C)"); - VarList::push_back(items, "13 ($F8D)"); - VarList::push_back(items, "14 ($F8E)"); - VarList::push_back(items, "15 ($F8F)"); - VarList::push_back(items, "16 ($F90)"); - VarList::push_back(items, "17 ($F91)"); - VarList::push_back(items, "18 ($F92)"); - VarList::push_back(items, "19 ($F93)"); - VarList::push_back(items, "20 ($F94)"); - VarList::push_back(items, "21 ($F95)"); - VarList::push_back(items, "22 ($F96)"); - VarList::push_back(items, "23 ($F97)"); - VarList::push_back(items, "24 ($F98)"); - VarList::push_back(items, "25 ($F99)"); - VarList::push_back(items, "26 ($F9A)"); - VarList::push_back(items, "27 ($F9B)"); - VarList::push_back(items, "28 ($F9C)"); - VarList::push_back(items, "29 ($F9D)"); - VarList::push_back(items, "30 ($F9E)"); - VarList::push_back(items, "31 ($F9F)"); - VarList::push_back(items, "32 ($FA0)"); - VarList::push_back(items, "33 ($FA1)"); - VarList::push_back(items, "34 ($FA2)"); - VarList::push_back(items, "35 ($FA3)"); - VarList::push_back(items, "36 ($FA4)"); - VarList::push_back(items, "37 ($FA5)"); - VarList::push_back(items, "38 ($FA6)"); - VarList::push_back(items, "39 ($FA7)"); - VarList::push_back(items, "40 ($FA8)"); - VarList::push_back(items, "41 ($FA9)"); - VarList::push_back(items, "42 ($FAA)"); - VarList::push_back(items, "43 ($FAB)"); - VarList::push_back(items, "44 ($FAC)"); - VarList::push_back(items, "45 ($FAD)"); - VarList::push_back(items, "46 ($FAE)"); - VarList::push_back(items, "47 ($FAF)"); - VarList::push_back(items, "48 ($FB0)"); - VarList::push_back(items, "49 ($FB1)"); - VarList::push_back(items, "50 ($FB2)"); - VarList::push_back(items, "51 ($FB3)"); - VarList::push_back(items, "52 ($FB4)"); - VarList::push_back(items, "53 ($FB5)"); - VarList::push_back(items, "54 ($FB6)"); - VarList::push_back(items, "55 ($FB7)"); - VarList::push_back(items, "56 ($FB8)"); - VarList::push_back(items, "57 ($FB9)"); - VarList::push_back(items, "58 ($FBA)"); - VarList::push_back(items, "59 ($FBB)"); - VarList::push_back(items, "60 ($FBC)"); - VarList::push_back(items, "61 ($FBD)"); - VarList::push_back(items, "62 ($FBE)"); - VarList::push_back(items, "63 ($FBF)"); + VarList::push_back(items, " 0 ($FF80)"); + VarList::push_back(items, " 1 ($FF81)"); + VarList::push_back(items, " 2 ($FF82)"); + VarList::push_back(items, " 3 ($FF83)"); + VarList::push_back(items, " 4 ($FF84)"); + VarList::push_back(items, " 5 ($FF85)"); + VarList::push_back(items, " 6 ($FF86)"); + VarList::push_back(items, " 7 ($FF87)"); + VarList::push_back(items, " 8 ($FF88)"); + VarList::push_back(items, " 9 ($FF89)"); + VarList::push_back(items, "10 ($FF8A)"); + VarList::push_back(items, "11 ($FF8B)"); + VarList::push_back(items, "12 ($FF8C)"); + VarList::push_back(items, "13 ($FF8D)"); + VarList::push_back(items, "14 ($FF8E)"); + VarList::push_back(items, "15 ($FF8F)"); + VarList::push_back(items, "16 ($FF90)"); + VarList::push_back(items, "17 ($FF91)"); + VarList::push_back(items, "18 ($FF92)"); + VarList::push_back(items, "19 ($FF93)"); + VarList::push_back(items, "20 ($FF94)"); + VarList::push_back(items, "21 ($FF95)"); + VarList::push_back(items, "22 ($FF96)"); + VarList::push_back(items, "23 ($FF97)"); + VarList::push_back(items, "24 ($FF98)"); + VarList::push_back(items, "25 ($FF99)"); + VarList::push_back(items, "26 ($FF9A)"); + VarList::push_back(items, "27 ($FF9B)"); + VarList::push_back(items, "28 ($FF9C)"); + VarList::push_back(items, "29 ($FF9D)"); + VarList::push_back(items, "30 ($FF9E)"); + VarList::push_back(items, "31 ($FF9F)"); + VarList::push_back(items, "32 ($FFA0)"); + VarList::push_back(items, "33 ($FFA1)"); + VarList::push_back(items, "34 ($FFA2)"); + VarList::push_back(items, "35 ($FFA3)"); + VarList::push_back(items, "36 ($FFA4)"); + VarList::push_back(items, "37 ($FFA5)"); + VarList::push_back(items, "38 ($FFA6)"); + VarList::push_back(items, "39 ($FFA7)"); + VarList::push_back(items, "40 ($FFA8)"); + VarList::push_back(items, "41 ($FFA9)"); + VarList::push_back(items, "42 ($FFAA)"); + VarList::push_back(items, "43 ($FFAB)"); + VarList::push_back(items, "44 ($FFAC)"); + VarList::push_back(items, "45 ($FFAD)"); + VarList::push_back(items, "46 ($FFAE)"); + VarList::push_back(items, "47 ($FFAF)"); + VarList::push_back(items, "48 ($FFB0)"); + VarList::push_back(items, "49 ($FFB1)"); + VarList::push_back(items, "50 ($FFB2)"); + VarList::push_back(items, "51 ($FFB3)"); + VarList::push_back(items, "52 ($FFB4)"); + VarList::push_back(items, "53 ($FFB5)"); + VarList::push_back(items, "54 ($FFB6)"); + VarList::push_back(items, "55 ($FFB7)"); + VarList::push_back(items, "56 ($FFB8)"); + VarList::push_back(items, "57 ($FFB9)"); + VarList::push_back(items, "58 ($FFBA)"); + VarList::push_back(items, "59 ($FFBB)"); + VarList::push_back(items, "60 ($FFBC)"); + VarList::push_back(items, "61 ($FFBD)"); + VarList::push_back(items, "62 ($FFBE)"); + VarList::push_back(items, "63 ($FFBF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("64 ($FBF) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("64 ($FFBF) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -145,14 +145,14 @@ string CartridgeBFWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$F80", "$F81", "$F82", "$F83", "$F84", "$F85", "$F86", "$F87", - "$F88", "$F89", "$F8A", "$F8B", "$F8C", "$F8D", "$F8E", "$F8F", - "$F90", "$F91", "$F92", "$F93", "$F94", "$F95", "$F96", "$F97", - "$F98", "$F99", "$F9A", "$F9B", "$F9C", "$F9D", "$F9E", "$F9F", - "$FA0", "$FA1", "$FA2", "$FA3", "$FA4", "$FA5", "$FA6", "$FA7", - "$FA8", "$FA9", "$FAA", "$FAB", "$FAC", "$FAD", "$FAE", "$FAF", - "$FB0", "$FB1", "$FB2", "$FB3", "$FB4", "$FB5", "$FB6", "$FB7", - "$FB8", "$FB9", "$FBA", "$FBB", "$FBC", "$FBD", "$FBE", "$FBF" + "$FF80", "$FF81", "$FF82", "$FF83", "$FF84", "$FF85", "$FF86", "$FF87", + "$FF88", "$FF89", "$FF8A", "$FF8B", "$FF8C", "$FF8D", "$FF8E", "$FF8F", + "$FF90", "$FF91", "$FF92", "$FF93", "$FF94", "$FF95", "$FF96", "$FF97", + "$FF98", "$FF99", "$FF9A", "$FF9B", "$FF9C", "$FF9D", "$FF9E", "$FF9F", + "$FFA0", "$FFA1", "$FFA2", "$FFA3", "$FFA4", "$FFA5", "$FFA6", "$FFA7", + "$FFA8", "$FFA9", "$FFAA", "$FFAB", "$FFAC", "$FFAD", "$FFAE", "$FFAF", + "$FFB0", "$FFB1", "$FFB2", "$FFB3", "$FFB4", "$FFB5", "$FFB6", "$FFB7", + "$FFB8", "$FFB9", "$FFBA", "$FFBB", "$FFBC", "$FFBD", "$FFBE", "$FFBF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartBUSWidget.cxx b/src/debugger/gui/CartBUSWidget.cxx index cd4be7e53..6ce333815 100644 --- a/src/debugger/gui/CartBUSWidget.cxx +++ b/src/debugger/gui/CartBUSWidget.cxx @@ -34,7 +34,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( << "32K ROM, seven 4K banks are accessible to 2600\n" << "8K BUS RAM\n" << "BUS registers accessible @ $F000 - $F03F\n" - << "Banks accessible at hotspots $FF5 to $FFB\n" + << "Banks accessible at hotspots $FFF5 to $FFFB\n" << "Startup bank = " << cart.myStartBank << "\n"; #if 0 @@ -53,26 +53,26 @@ CartridgeBUSWidget::CartridgeBUSWidget( myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF5)"); - VarList::push_back(items, "1 ($FF6)"); - VarList::push_back(items, "2 ($FF7)"); - VarList::push_back(items, "3 ($FF8)"); - VarList::push_back(items, "4 ($FF9)"); - VarList::push_back(items, "5 ($FFA)"); - VarList::push_back(items, "6 ($FFB)"); + VarList::push_back(items, "0 ($FFF5)"); + VarList::push_back(items, "1 ($FFF6)"); + VarList::push_back(items, "2 ($FFF7)"); + VarList::push_back(items, "3 ($FFF8)"); + VarList::push_back(items, "4 ($FFF9)"); + VarList::push_back(items, "5 ($FFFA)"); + VarList::push_back(items, "6 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); - int lwidth = _font.getStringWidth("Datastream Increments: "); // get width of the widest label + int lwidth = _font.getStringWidth("Datastream Increments "); // get width of the widest label // Datastream Pointers xpos = 0; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Datastream Pointers: ", kTextAlignLeft); + myFontHeight, "Datastream Pointers ", kTextAlignLeft); xpos += lwidth; myDatastreamPointers = new DataGridWidget(boss, _nfont, 0, ypos+myLineHeight-2, 4, 4, 6, 32, Common::Base::F_16_3_2); @@ -82,7 +82,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Datastream Increments xpos = 0 + myDatastreamPointers->getWidth(); new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Datastream Increments: ", kTextAlignLeft); + myFontHeight, "Datastream Increments ", kTextAlignLeft); myDatastreamIncrements = new DataGridWidget(boss, _nfont, xpos, ypos+myLineHeight-2, 4, 4, 5, 32, Common::Base::F_16_2_2); myDatastreamIncrements->setTarget(this); @@ -91,7 +91,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Datastream Maps xpos = 0; ypos += myLineHeight*5 + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Address Maps: ", kTextAlignLeft); + myFontHeight, "Address Maps ", kTextAlignLeft); myAddressMaps = new DataGridWidget(boss, _nfont, 0, ypos+myLineHeight-2, 8, 5, 8, 32, Common::Base::F_16_8); myAddressMaps->setTarget(this); @@ -100,7 +100,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Music counters xpos = 10; ypos += myLineHeight*6 + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Counters: ", kTextAlignLeft); + myFontHeight, "Music Counters ", kTextAlignLeft); xpos += lwidth; myMusicCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); @@ -110,7 +110,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Music frequencies xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Frequencies: ", kTextAlignLeft); + myFontHeight, "Music Frequencies ", kTextAlignLeft); xpos += lwidth; myMusicFrequencies = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); @@ -120,7 +120,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Music waveforms xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Waveforms: ", kTextAlignLeft); + myFontHeight, "Music Waveforms ", kTextAlignLeft); xpos += lwidth; myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); @@ -130,7 +130,7 @@ CartridgeBUSWidget::CartridgeBUSWidget( // Music waveform sizes xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Waveform Sizes: ", kTextAlignLeft); + myFontHeight, "Music Waveform Sizes ", kTextAlignLeft); xpos += lwidth; myMusicWaveformSizes = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_2); @@ -304,7 +304,7 @@ string CartridgeBUSWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartCDFWidget.cxx b/src/debugger/gui/CartCDFWidget.cxx index 959895ed8..67adb6d5b 100644 --- a/src/debugger/gui/CartCDFWidget.cxx +++ b/src/debugger/gui/CartCDFWidget.cxx @@ -61,7 +61,7 @@ CartridgeCDFWidget::CartridgeCDFWidget( VarList::push_back(items, "5 ($FFFA)"); VarList::push_back(items, "6 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), myLineHeight, items, "Set bank ", _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); @@ -360,7 +360,7 @@ string CartridgeCDFWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartCMWidget.cxx b/src/debugger/gui/CartCMWidget.cxx index 72580c894..e101fa79b 100644 --- a/src/debugger/gui/CartCMWidget.cxx +++ b/src/debugger/gui/CartCMWidget.cxx @@ -50,16 +50,16 @@ CartridgeCMWidget::CartridgeCMWidget( VarList::push_back(items, " 3 "); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 0 "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); // Raw SWCHA value (this will be broken down further in other UI elements) - int lwidth = _font.getStringWidth("Current column: "); + int lwidth = _font.getStringWidth("Current column "); ypos += myLineHeight + 8; new StaticTextWidget(boss, _font, xpos, ypos+2, lwidth, myFontHeight, - "Current SWCHA: ", kTextAlignLeft); + "Current SWCHA ", kTextAlignLeft); xpos += lwidth; mySWCHA = new ToggleBitWidget(boss, _nfont, xpos, ypos, 8, 1); mySWCHA->setTarget(this); @@ -68,7 +68,7 @@ CartridgeCMWidget::CartridgeCMWidget( // Current column number xpos = 10; ypos += myLineHeight + 5; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Current column: ", kTextAlignLeft); + myFontHeight, "Current column ", kTextAlignLeft); xpos += lwidth; myColumn = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16); @@ -136,12 +136,12 @@ CartridgeCMWidget::CartridgeCMWidget( // Ram state (combination of several bits in SWCHA) ypos += myLineHeight + 8; - lwidth = _font.getStringWidth("Ram State: "); + lwidth = _font.getStringWidth("Ram State "); new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Ram State: ", kTextAlignLeft); - myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-1, + myFontHeight, "Ram State ", kTextAlignLeft); + myRAM = new EditTextWidget(boss, _nfont, xpos+lwidth, ypos-2, _nfont.getStringWidth(" Write-only "), myLineHeight, ""); - myRAM->setEditable(false); + myRAM->setEditable(false, true); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/CartCTYWidget.cxx b/src/debugger/gui/CartCTYWidget.cxx index 2b7ce8001..4d6f12ec4 100644 --- a/src/debugger/gui/CartCTYWidget.cxx +++ b/src/debugger/gui/CartCTYWidget.cxx @@ -38,17 +38,17 @@ CartridgeCTYWidget::CartridgeCTYWidget( ypos = addBaseInformation(size, "Chris D. Walton", info) + myLineHeight; VariantList items; - VarList::push_back(items, "1 ($FF5)"); - VarList::push_back(items, "2 ($FF6)"); - VarList::push_back(items, "3 ($FF7)"); - VarList::push_back(items, "4 ($FF8)"); - VarList::push_back(items, "5 ($FF9)"); - VarList::push_back(items, "6 ($FFA)"); - VarList::push_back(items, "7 ($FFB)"); + VarList::push_back(items, "1 ($FFF5)"); + VarList::push_back(items, "2 ($FFF6)"); + VarList::push_back(items, "3 ($FFF7)"); + VarList::push_back(items, "4 ($FFF8)"); + VarList::push_back(items, "5 ($FFF9)"); + VarList::push_back(items, "6 ($FFFA)"); + VarList::push_back(items, "7 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -91,7 +91,7 @@ string CartridgeCTYWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "", "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "", "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; uInt16 bank = myCart.getBank(); buf << "Bank = " << std::dec << bank << ", hotspot = " << spot[bank]; diff --git a/src/debugger/gui/CartCVPlusWidget.cxx b/src/debugger/gui/CartCVPlusWidget.cxx index bd27175b9..98c98373d 100644 --- a/src/debugger/gui/CartCVPlusWidget.cxx +++ b/src/debugger/gui/CartCVPlusWidget.cxx @@ -44,7 +44,7 @@ CartridgeCVPlusWidget::CartridgeCVPlusWidget( VarList::push_back(items, Variant(i).toString() + " ($3D)"); ostringstream label; - label << "Set bank ($F800 - $FFFF): "; + label << "Set bank ($F800 - $FFFF) "; myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("xxx ($3D) "), myLineHeight, items, label.str(), diff --git a/src/debugger/gui/CartDASHWidget.cxx b/src/debugger/gui/CartDASHWidget.cxx index b8a720fdd..cf617856f 100644 --- a/src/debugger/gui/CartDASHWidget.cxx +++ b/src/debugger/gui/CartDASHWidget.cxx @@ -99,7 +99,7 @@ CartridgeDASHWidget::CartridgeDASHWidget( int xoffset = xpos_s+t->getWidth() + 10; myBankState[2*i] = new EditTextWidget(boss, _font, xoffset, ypos_s, w - xoffset - 10, myLineHeight, ""); - myBankState[2*i]->setEditable(false); + myBankState[2*i]->setEditable(false, true); ypos_s += myLineHeight + 4; label.str(""); @@ -109,7 +109,7 @@ CartridgeDASHWidget::CartridgeDASHWidget( myBankState[2*i+1] = new EditTextWidget(boss, _font, xoffset, ypos_s, w - xoffset - 10, myLineHeight, ""); - myBankState[2*i+1]->setEditable(false); + myBankState[2*i+1]->setEditable(false, true); xpos = 10; ypos+= 2 * myLineHeight; diff --git a/src/debugger/gui/CartDFSCWidget.cxx b/src/debugger/gui/CartDFSCWidget.cxx index 5ef0191b1..d4450326f 100644 --- a/src/debugger/gui/CartDFSCWidget.cxx +++ b/src/debugger/gui/CartDFSCWidget.cxx @@ -40,50 +40,50 @@ CartridgeDFSCWidget::CartridgeDFSCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << (start + 0x100) - << " - " << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << " - " << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($FC0)"); - VarList::push_back(items, " 1 ($FC1)"); - VarList::push_back(items, " 2 ($FC2)"); - VarList::push_back(items, " 3 ($FC3)"); - VarList::push_back(items, " 4 ($FC4)"); - VarList::push_back(items, " 5 ($FC5)"); - VarList::push_back(items, " 6 ($FC6)"); - VarList::push_back(items, " 7 ($FC7)"); - VarList::push_back(items, " 8 ($FC8)"); - VarList::push_back(items, " 9 ($FC9)"); - VarList::push_back(items, "10 ($FCA)"); - VarList::push_back(items, "11 ($FCB)"); - VarList::push_back(items, "12 ($FCC)"); - VarList::push_back(items, "13 ($FCD)"); - VarList::push_back(items, "14 ($FCE)"); - VarList::push_back(items, "15 ($FCF)"); - VarList::push_back(items, "16 ($FD0)"); - VarList::push_back(items, "17 ($FD1)"); - VarList::push_back(items, "18 ($FD2)"); - VarList::push_back(items, "19 ($FD3)"); - VarList::push_back(items, "20 ($FD4)"); - VarList::push_back(items, "21 ($FD5)"); - VarList::push_back(items, "22 ($FD6)"); - VarList::push_back(items, "23 ($FD7)"); - VarList::push_back(items, "24 ($FD8)"); - VarList::push_back(items, "25 ($FD9)"); - VarList::push_back(items, "26 ($FDA)"); - VarList::push_back(items, "27 ($FDB)"); - VarList::push_back(items, "28 ($FDC)"); - VarList::push_back(items, "29 ($FDD)"); - VarList::push_back(items, "30 ($FDE)"); - VarList::push_back(items, "31 ($FDF)"); + VarList::push_back(items, " 0 ($FFC0)"); + VarList::push_back(items, " 1 ($FFC1)"); + VarList::push_back(items, " 2 ($FFC2)"); + VarList::push_back(items, " 3 ($FFC3)"); + VarList::push_back(items, " 4 ($FFC4)"); + VarList::push_back(items, " 5 ($FFC5)"); + VarList::push_back(items, " 6 ($FFC6)"); + VarList::push_back(items, " 7 ($FFC7)"); + VarList::push_back(items, " 8 ($FFC8)"); + VarList::push_back(items, " 9 ($FFC9)"); + VarList::push_back(items, "10 ($FFCA)"); + VarList::push_back(items, "11 ($FFCB)"); + VarList::push_back(items, "12 ($FFCC)"); + VarList::push_back(items, "13 ($FFCD)"); + VarList::push_back(items, "14 ($FFCE)"); + VarList::push_back(items, "15 ($FFCF)"); + VarList::push_back(items, "16 ($FFD0)"); + VarList::push_back(items, "17 ($FFD1)"); + VarList::push_back(items, "18 ($FFD2)"); + VarList::push_back(items, "19 ($FFD3)"); + VarList::push_back(items, "20 ($FFD4)"); + VarList::push_back(items, "21 ($FFD5)"); + VarList::push_back(items, "22 ($FFD6)"); + VarList::push_back(items, "23 ($FFD7)"); + VarList::push_back(items, "24 ($FFD8)"); + VarList::push_back(items, "25 ($FFD9)"); + VarList::push_back(items, "26 ($FFDA)"); + VarList::push_back(items, "27 ($FFDB)"); + VarList::push_back(items, "28 ($FFDC)"); + VarList::push_back(items, "29 ($FFDD)"); + VarList::push_back(items, "30 ($FFDE)"); + VarList::push_back(items, "31 ($FFDF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FE0) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FFE0) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -126,10 +126,10 @@ string CartridgeDFSCWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FC0", "$FC1", "$FC2", "$FC3", "$FC4", "$FC5", "$FC6", "$FC7", - "$FC8", "$FC9", "$FCA", "$FCB", "$FCC", "$FCD", "$FCE", "$FCF", - "$FD0", "$FD1", "$FD2", "$FD3", "$FD4", "$FD5", "$FD6", "$FE7", - "$FD8", "$FD9", "$FDA", "$FDB", "$FDC", "$FDD", "$FDE", "$FDF" + "$FFC0", "$FFC1", "$FFC2", "$FFC3", "$FFC4", "$FFC5", "$FFC6", "$FFC7", + "$FFC8", "$FFC9", "$FFCA", "$FFCB", "$FFCC", "$FFCD", "$FFCE", "$FFCF", + "$FFD0", "$FFD1", "$FFD2", "$FFD3", "$FFD4", "$FFD5", "$FFD6", "$FFE7", + "$FFD8", "$FFD9", "$FFDA", "$FFDB", "$FFDC", "$FFDD", "$FFDE", "$FFDF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartDFWidget.cxx b/src/debugger/gui/CartDFWidget.cxx index 40f52272c..00faa7e24 100644 --- a/src/debugger/gui/CartDFWidget.cxx +++ b/src/debugger/gui/CartDFWidget.cxx @@ -38,50 +38,50 @@ CartridgeDFWidget::CartridgeDFWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "CPUWIZ", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($FC0)"); - VarList::push_back(items, " 1 ($FC1)"); - VarList::push_back(items, " 2 ($FC2)"); - VarList::push_back(items, " 3 ($FC3)"); - VarList::push_back(items, " 4 ($FC4)"); - VarList::push_back(items, " 5 ($FC5)"); - VarList::push_back(items, " 6 ($FC6)"); - VarList::push_back(items, " 7 ($FC7)"); - VarList::push_back(items, " 8 ($FC8)"); - VarList::push_back(items, " 9 ($FC9)"); - VarList::push_back(items, "10 ($FCA)"); - VarList::push_back(items, "11 ($FCB)"); - VarList::push_back(items, "12 ($FCC)"); - VarList::push_back(items, "13 ($FCD)"); - VarList::push_back(items, "14 ($FCE)"); - VarList::push_back(items, "15 ($FCF)"); - VarList::push_back(items, "16 ($FD0)"); - VarList::push_back(items, "17 ($FD1)"); - VarList::push_back(items, "18 ($FD2)"); - VarList::push_back(items, "19 ($FD3)"); - VarList::push_back(items, "20 ($FD4)"); - VarList::push_back(items, "21 ($FD5)"); - VarList::push_back(items, "22 ($FD6)"); - VarList::push_back(items, "23 ($FD7)"); - VarList::push_back(items, "24 ($FD8)"); - VarList::push_back(items, "25 ($FD9)"); - VarList::push_back(items, "26 ($FDA)"); - VarList::push_back(items, "27 ($FDB)"); - VarList::push_back(items, "28 ($FDC)"); - VarList::push_back(items, "29 ($FDD)"); - VarList::push_back(items, "30 ($FDE)"); - VarList::push_back(items, "31 ($FDF)"); + VarList::push_back(items, " 0 ($FFC0)"); + VarList::push_back(items, " 1 ($FFC1)"); + VarList::push_back(items, " 2 ($FFC2)"); + VarList::push_back(items, " 3 ($FFC3)"); + VarList::push_back(items, " 4 ($FFC4)"); + VarList::push_back(items, " 5 ($FFC5)"); + VarList::push_back(items, " 6 ($FFC6)"); + VarList::push_back(items, " 7 ($FFC7)"); + VarList::push_back(items, " 8 ($FFC8)"); + VarList::push_back(items, " 9 ($FFC9)"); + VarList::push_back(items, "10 ($FFCA)"); + VarList::push_back(items, "11 ($FFCB)"); + VarList::push_back(items, "12 ($FFCC)"); + VarList::push_back(items, "13 ($FFCD)"); + VarList::push_back(items, "14 ($FFCE)"); + VarList::push_back(items, "15 ($FFCF)"); + VarList::push_back(items, "16 ($FFD0)"); + VarList::push_back(items, "17 ($FFD1)"); + VarList::push_back(items, "18 ($FFD2)"); + VarList::push_back(items, "19 ($FFD3)"); + VarList::push_back(items, "20 ($FFD4)"); + VarList::push_back(items, "21 ($FFD5)"); + VarList::push_back(items, "22 ($FFD6)"); + VarList::push_back(items, "23 ($FFD7)"); + VarList::push_back(items, "24 ($FFD8)"); + VarList::push_back(items, "25 ($FFD9)"); + VarList::push_back(items, "26 ($FFDA)"); + VarList::push_back(items, "27 ($FFDB)"); + VarList::push_back(items, "28 ($FFDC)"); + VarList::push_back(items, "29 ($FFDD)"); + VarList::push_back(items, "30 ($FFDE)"); + VarList::push_back(items, "31 ($FFDF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FDF) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("31 ($FFDF) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -113,10 +113,10 @@ string CartridgeDFWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FC0", "$FC1", "$FC2", "$FC3", "$FC4", "$FC5", "$FC6", "$FC7", - "$FC8", "$FC9", "$FCA", "$FCB", "$FCC", "$FCD", "$FCE", "$FCF", - "$FD0", "$FD1", "$FD2", "$FD3", "$FD4", "$FD5", "$FD6", "$FD7", - "$FD8", "$FD9", "$FDA", "$FDB", "$FDC", "$FDD", "$FDE", "$FDF" + "$FFC0", "$FFC1", "$FFC2", "$FFC3", "$FFC4", "$FFC5", "$FFC6", "$FFC7", + "$FFC8", "$FFC9", "$FFCA", "$FFCB", "$FFCC", "$FFCD", "$FFCE", "$FFCF", + "$FFD0", "$FFD1", "$FFD2", "$FFD3", "$FFD4", "$FFD5", "$FFD6", "$FFD7", + "$FFD8", "$FFD9", "$FFDA", "$FFDB", "$FFDC", "$FFDD", "$FFDE", "$FFDF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartDPCPlusWidget.cxx b/src/debugger/gui/CartDPCPlusWidget.cxx index 009dcb8d1..a4ea0feaa 100644 --- a/src/debugger/gui/CartDPCPlusWidget.cxx +++ b/src/debugger/gui/CartDPCPlusWidget.cxx @@ -34,7 +34,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( << "8K DPC RAM\n" << "DPC registers accessible @ $F000 - $F07F\n" << " $F000 - $F03F (R), $F040 - $F07F (W)\n" - << "Banks accessible at hotspots $FF6 to $FFB\n" + << "Banks accessible at hotspots $FFF6 to $FFFB\n" << "Startup bank = " << cart.myStartBank << "\n"; #if 0 @@ -53,24 +53,24 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF6)"); - VarList::push_back(items, "1 ($FF7)"); - VarList::push_back(items, "2 ($FF8)"); - VarList::push_back(items, "3 ($FF9)"); - VarList::push_back(items, "4 ($FFA)"); - VarList::push_back(items, "5 ($FFB)"); + VarList::push_back(items, "0 ($FFF6)"); + VarList::push_back(items, "1 ($FFF7)"); + VarList::push_back(items, "2 ($FFF8)"); + VarList::push_back(items, "3 ($FFF9)"); + VarList::push_back(items, "4 ($FFFA)"); + VarList::push_back(items, "5 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); // Top registers - int lwidth = _font.getStringWidth("Counter Registers: "); + int lwidth = _font.getStringWidth("Counter Registers "); xpos = 10; ypos += myLineHeight + 8; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Top Registers: ", kTextAlignLeft); + myFontHeight, "Top Registers ", kTextAlignLeft); xpos += lwidth; myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -80,7 +80,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Bottom registers xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Bottom Registers: ", kTextAlignLeft); + myFontHeight, "Bottom Registers ", kTextAlignLeft); xpos += lwidth; myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -90,7 +90,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Counter registers xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Counter Registers: ", kTextAlignLeft); + myFontHeight, "Counter Registers ", kTextAlignLeft); xpos += lwidth; myCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4); @@ -100,7 +100,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Fractional counter registers xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Frac Counters: ", kTextAlignLeft); + myFontHeight, "Frac Counters ", kTextAlignLeft); xpos += lwidth; myFracCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 4, 2, 8, 32, Common::Base::F_16_8); @@ -110,7 +110,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Fractional increment registers xpos = 10; ypos += myFracCounters->getHeight() + 8; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Frac Increments: ", kTextAlignLeft); + myFontHeight, "Frac Increments ", kTextAlignLeft); xpos += lwidth; myFracIncrements = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -120,7 +120,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Special function parameters xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Function Params: ", kTextAlignLeft); + myFontHeight, "Function Params ", kTextAlignLeft); xpos += lwidth; myParameter = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -130,7 +130,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Music counters xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Counters: ", kTextAlignLeft); + myFontHeight, "Music Counters ", kTextAlignLeft); xpos += lwidth; myMusicCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); @@ -140,7 +140,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Music frequencies xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Frequencies: ", kTextAlignLeft); + myFontHeight, "Music Frequencies ", kTextAlignLeft); xpos += lwidth; myMusicFrequencies = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 8, 32, Common::Base::F_16_8); @@ -150,7 +150,7 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( // Music waveforms xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music Waveforms: ", kTextAlignLeft); + myFontHeight, "Music Waveforms ", kTextAlignLeft); xpos += lwidth; myMusicWaveforms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 4, 16, Common::Base::F_16_4); @@ -158,10 +158,10 @@ CartridgeDPCPlusWidget::CartridgeDPCPlusWidget( myMusicWaveforms->setEditable(false); // Current random number - lwidth = _font.getStringWidth("Current random number: "); + lwidth = _font.getStringWidth("Current random number "); xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Current random number: ", kTextAlignLeft); + myFontHeight, "Current random number ", kTextAlignLeft); xpos += lwidth; myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 8, 32, Common::Base::F_16_8); @@ -325,7 +325,7 @@ string CartridgeDPCPlusWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartDPCWidget.cxx b/src/debugger/gui/CartDPCWidget.cxx index ce7587f79..fddf7f550 100644 --- a/src/debugger/gui/CartDPCWidget.cxx +++ b/src/debugger/gui/CartDPCWidget.cxx @@ -42,7 +42,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x80) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, @@ -50,26 +50,26 @@ CartridgeDPCWidget::CartridgeDPCWidget( myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF8)"); - VarList::push_back(items, "1 ($FF9)"); + VarList::push_back(items, "0 ($FFF8)"); + VarList::push_back(items, "1 ($FFF9)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); ypos += myLineHeight + 8; // Data fetchers - int lwidth = _font.getStringWidth("Data Fetchers: "); + int lwidth = _font.getStringWidth("Data Fetchers "); new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Data Fetchers: ", kTextAlignLeft); + myFontHeight, "Data Fetchers ", kTextAlignLeft); // Top registers - lwidth = _font.getStringWidth("Counter Registers: "); + lwidth = _font.getStringWidth("Counter Registers "); xpos = 18; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Top Registers: ", kTextAlignLeft); + myFontHeight, "Top Registers ", kTextAlignLeft); xpos += lwidth; myTops = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -79,7 +79,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( // Bottom registers xpos = 18; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Bottom Registers: ", kTextAlignLeft); + myFontHeight, "Bottom Registers ", kTextAlignLeft); xpos += lwidth; myBottoms = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -89,7 +89,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( // Counter registers xpos = 18; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Counter Registers: ", kTextAlignLeft); + myFontHeight, "Counter Registers ", kTextAlignLeft); xpos += lwidth; myCounters = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 4, 16, Common::Base::F_16_4); @@ -99,7 +99,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( // Flag registers xpos = 18; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Flag Registers: ", kTextAlignLeft); + myFontHeight, "Flag Registers ", kTextAlignLeft); xpos += lwidth; myFlags = new DataGridWidget(boss, _nfont, xpos, ypos-2, 8, 1, 2, 8, Common::Base::F_16); @@ -108,9 +108,9 @@ CartridgeDPCWidget::CartridgeDPCWidget( // Music mode xpos = 10; ypos += myLineHeight + 12; - lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7): "); + lwidth = _font.getStringWidth("Music mode (DF5/DF6/DF7) "); new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Music mode (DF5/DF6/DF7): ", kTextAlignLeft); + myFontHeight, "Music mode (DF5/DF6/DF7) ", kTextAlignLeft); xpos += lwidth; myMusicMode = new DataGridWidget(boss, _nfont, xpos, ypos-2, 3, 1, 2, 8, Common::Base::F_16); @@ -120,7 +120,7 @@ CartridgeDPCWidget::CartridgeDPCWidget( // Current random number xpos = 10; ypos += myLineHeight + 4; new StaticTextWidget(boss, _font, xpos, ypos, lwidth, - myFontHeight, "Current random number: ", kTextAlignLeft); + myFontHeight, "Current random number ", kTextAlignLeft); xpos += lwidth; myRandom = new DataGridWidget(boss, _nfont, xpos, ypos-2, 1, 1, 2, 8, Common::Base::F_16); @@ -227,7 +227,7 @@ string CartridgeDPCWidget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF8", "$FF9" }; + static const char* spot[] = { "$FFF8", "$FFF9" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartE0Widget.cxx b/src/debugger/gui/CartE0Widget.cxx index 189797bf9..7ffe02305 100644 --- a/src/debugger/gui/CartE0Widget.cxx +++ b/src/debugger/gui/CartE0Widget.cxx @@ -20,16 +20,16 @@ #include "CartE0Widget.hxx" static const char* seg0[] = { - "0 ($FE0)", "1 ($FE1)", "2 ($FE2)", "3 ($FE3)", - "4 ($FE4)", "5 ($FE5)", "6 ($FE6)", "7 ($FE7)" + "0 ($FFE0)", "1 ($FFE1)", "2 ($FFE2)", "3 ($FFE3)", + "4 ($FFE4)", "5 ($FFE5)", "6 ($FFE6)", "7 ($FFE7)" }; static const char* seg1[] = { - "0 ($FE8)", "1 ($FE9)", "2 ($FEA)", "3 ($FEB)", - "4 ($FEC)", "5 ($FED)", "6 ($FEE)", "7 ($FEF)" + "0 ($FFE8)", "1 ($FFE9)", "2 ($FFEA)", "3 ($FFEB)", + "4 ($FFEC)", "5 ($FFED)", "6 ($FFEE)", "7 ($FFEF)" }; static const char* seg2[] = { - "0 ($FF0)", "1 ($FF1)", "2 ($FF2)", "3 ($FF3)", - "4 ($FF4)", "5 ($FF5)", "6 ($FF6)", "7 ($FF7)" + "0 ($FFF0)", "1 ($FFF1)", "2 ($FFF2)", "3 ($FFF3)", + "4 ($FFF4)", "5 ($FFF5)", "6 ($FFF6)", "7 ($FFF7)" }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -70,26 +70,26 @@ CartridgeE0Widget::CartridgeE0Widget( VarList::push_back(items2, seg2[i]); } - const int lwidth = _font.getStringWidth("Set slice for segment X: "); + const int lwidth = _font.getStringWidth("Set slice for segment X "); mySlice0 = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"), - myLineHeight, items0, "Set slice for segment 0: ", + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FFF7)"), + myLineHeight, items0, "Set slice for segment 0 ", lwidth, kSlice0Changed); mySlice0->setTarget(this); addFocusWidget(mySlice0); ypos += mySlice0->getHeight() + 4; mySlice1 = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"), - myLineHeight, items1, "Set slice for segment 1: ", + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FFF7)"), + myLineHeight, items1, "Set slice for segment 1 ", lwidth, kSlice1Changed); mySlice1->setTarget(this); addFocusWidget(mySlice1); ypos += mySlice1->getHeight() + 4; mySlice2 = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FF7)"), - myLineHeight, items2, "Set slice for segment 2: ", + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("7 ($FFF7)"), + myLineHeight, items2, "Set slice for segment 2 ", lwidth, kSlice2Changed); mySlice2->setTarget(this); addFocusWidget(mySlice2); diff --git a/src/debugger/gui/CartE7Widget.cxx b/src/debugger/gui/CartE7Widget.cxx index ba005848d..790a52bb7 100644 --- a/src/debugger/gui/CartE7Widget.cxx +++ b/src/debugger/gui/CartE7Widget.cxx @@ -20,11 +20,11 @@ #include "CartE7Widget.hxx" static const char* spot_lower[] = { - "0 - ROM ($FE0)", "1 - ROM ($FE1)", "2 - ROM ($FE2)", "3 - ROM ($FE3)", - "4 - ROM ($FE4)", "5 - ROM ($FE5)", "6 - ROM ($FE6)", "7 - RAM ($FE7)" + "0 - ROM ($FFE0)", "1 - ROM ($FFE1)", "2 - ROM ($FFE2)", "3 - ROM ($FFE3)", + "4 - ROM ($FFE4)", "5 - ROM ($FFE5)", "6 - ROM ($FFE6)", "7 - RAM ($FFE7)" }; static const char* spot_upper[] = { - "0 - RAM ($FE8)", "1 - RAM ($FE9)", "2 - RAM ($FEA)", "3 - RAM ($FEB)" + "0 - RAM ($FFE8)", "1 - RAM ($FFE9)", "2 - RAM ($FFEA)", "3 - RAM ($FFEB)" }; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -65,18 +65,18 @@ CartridgeE7Widget::CartridgeE7Widget( for(int i = 0; i < 4; ++i) VarList::push_back(items1, spot_upper[i]); - const int lwidth = _font.getStringWidth("Set slice for upper 256B: "), - fwidth = _font.getStringWidth("3 - RAM ($FEB)"); + const int lwidth = _font.getStringWidth("Set slice for upper 256B "), + fwidth = _font.getStringWidth("3 - RAM ($FFEB)"); myLower2K = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, items0, - "Set slice for lower 2K: ", lwidth, kLowerChanged); + "Set slice for lower 2K ", lwidth, kLowerChanged); myLower2K->setTarget(this); addFocusWidget(myLower2K); ypos += myLower2K->getHeight() + 4; myUpper256B = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, myLineHeight, items1, - "Set slice for upper 256B: ", lwidth, kUpperChanged); + "Set slice for upper 256B ", lwidth, kUpperChanged); myUpper256B->setTarget(this); addFocusWidget(myUpper256B); } diff --git a/src/debugger/gui/CartEFSCWidget.cxx b/src/debugger/gui/CartEFSCWidget.cxx index 37546e35f..838a39aa1 100644 --- a/src/debugger/gui/CartEFSCWidget.cxx +++ b/src/debugger/gui/CartEFSCWidget.cxx @@ -40,7 +40,7 @@ CartridgeEFSCWidget::CartridgeEFSCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << (start + 0x100) - << " - " << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << " - " << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, @@ -48,26 +48,26 @@ CartridgeEFSCWidget::CartridgeEFSCWidget( info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($FE0)"); - VarList::push_back(items, " 1 ($FE1)"); - VarList::push_back(items, " 2 ($FE2)"); - VarList::push_back(items, " 3 ($FE3)"); - VarList::push_back(items, " 4 ($FE4)"); - VarList::push_back(items, " 5 ($FE5)"); - VarList::push_back(items, " 6 ($FE6)"); - VarList::push_back(items, " 7 ($FE7)"); - VarList::push_back(items, " 8 ($FE8)"); - VarList::push_back(items, " 9 ($FE9)"); - VarList::push_back(items, "10 ($FEA)"); - VarList::push_back(items, "11 ($FEB)"); - VarList::push_back(items, "12 ($FEC)"); - VarList::push_back(items, "13 ($FED)"); - VarList::push_back(items, "14 ($FEE)"); - VarList::push_back(items, "15 ($FEF)"); + VarList::push_back(items, " 0 ($FFE0)"); + VarList::push_back(items, " 1 ($FFE1)"); + VarList::push_back(items, " 2 ($FFE2)"); + VarList::push_back(items, " 3 ($FFE3)"); + VarList::push_back(items, " 4 ($FFE4)"); + VarList::push_back(items, " 5 ($FFE5)"); + VarList::push_back(items, " 6 ($FFE6)"); + VarList::push_back(items, " 7 ($FFE7)"); + VarList::push_back(items, " 8 ($FFE8)"); + VarList::push_back(items, " 9 ($FFE9)"); + VarList::push_back(items, "10 ($FFEA)"); + VarList::push_back(items, "11 ($FFEB)"); + VarList::push_back(items, "12 ($FFEC)"); + VarList::push_back(items, "13 ($FFED)"); + VarList::push_back(items, "14 ($FFEE)"); + VarList::push_back(items, "15 ($FFEF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FFE0) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -110,8 +110,8 @@ string CartridgeEFSCWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FE0", "$FE1", "$FE2", "$FE3", "$FE4", "$FE5", "$FE6", "$FE7", - "$FE8", "$FE9", "$FEA", "$FEB", "$FEC", "$FED", "$FEE", "$FEF" + "$FFE0", "$FFE1", "$FFE2", "$FFE3", "$FFE4", "$FFE5", "$FFE6", "$FFE7", + "$FFE8", "$FFE9", "$FFEA", "$FFEB", "$FFEC", "$FFED", "$FFEE", "$FFEF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartEFWidget.cxx b/src/debugger/gui/CartEFWidget.cxx index bd15302c4..9eda82221 100644 --- a/src/debugger/gui/CartEFWidget.cxx +++ b/src/debugger/gui/CartEFWidget.cxx @@ -38,7 +38,7 @@ CartridgeEFWidget::CartridgeEFWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << std::dec << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, @@ -46,26 +46,26 @@ CartridgeEFWidget::CartridgeEFWidget( info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, " 0 ($FE0)"); - VarList::push_back(items, " 1 ($FE1)"); - VarList::push_back(items, " 2 ($FE2)"); - VarList::push_back(items, " 3 ($FE3)"); - VarList::push_back(items, " 4 ($FE4)"); - VarList::push_back(items, " 5 ($FE5)"); - VarList::push_back(items, " 6 ($FE6)"); - VarList::push_back(items, " 7 ($FE7)"); - VarList::push_back(items, " 8 ($FE8)"); - VarList::push_back(items, " 9 ($FE9)"); - VarList::push_back(items, "10 ($FEA)"); - VarList::push_back(items, "11 ($FEB)"); - VarList::push_back(items, "12 ($FEC)"); - VarList::push_back(items, "13 ($FED)"); - VarList::push_back(items, "14 ($FEE)"); - VarList::push_back(items, "15 ($FEF)"); + VarList::push_back(items, " 0 ($FFE0)"); + VarList::push_back(items, " 1 ($FFE1)"); + VarList::push_back(items, " 2 ($FFE2)"); + VarList::push_back(items, " 3 ($FFE3)"); + VarList::push_back(items, " 4 ($FFE4)"); + VarList::push_back(items, " 5 ($FFE5)"); + VarList::push_back(items, " 6 ($FFE6)"); + VarList::push_back(items, " 7 ($FFE7)"); + VarList::push_back(items, " 8 ($FFE8)"); + VarList::push_back(items, " 9 ($FFE9)"); + VarList::push_back(items, "10 ($FFEA)"); + VarList::push_back(items, "11 ($FFEB)"); + VarList::push_back(items, "12 ($FFEC)"); + VarList::push_back(items, "13 ($FFED)"); + VarList::push_back(items, "14 ($FFEE)"); + VarList::push_back(items, "15 ($FFEF)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FE0) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($FFE0) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -97,8 +97,8 @@ string CartridgeEFWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FE0", "$FE1", "$FE2", "$FE3", "$FE4", "$FE5", "$FE6", "$FE7", - "$FE8", "$FE9", "$FEA", "$FEB", "$FEC", "$FED", "$FEE", "$FEF" + "$FFE0", "$FFE1", "$FFE2", "$FFE3", "$FFE4", "$FFE5", "$FFE6", "$FFE7", + "$FFE8", "$FFE9", "$FFEA", "$FFEB", "$FFEC", "$FFED", "$FFEE", "$FFEF" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF0Widget.cxx b/src/debugger/gui/CartF0Widget.cxx index 1d57da240..353126c4f 100644 --- a/src/debugger/gui/CartF0Widget.cxx +++ b/src/debugger/gui/CartF0Widget.cxx @@ -65,8 +65,8 @@ CartridgeF0Widget::CartridgeF0Widget( VarList::push_back(items, " 15"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -97,7 +97,7 @@ string CartridgeF0Widget::bankState() { ostringstream& buf = buffer(); - buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = $FF0"; + buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = $FFF0"; return buf.str(); } diff --git a/src/debugger/gui/CartF4SCWidget.cxx b/src/debugger/gui/CartF4SCWidget.cxx index e54ad7de9..1452bf531 100644 --- a/src/debugger/gui/CartF4SCWidget.cxx +++ b/src/debugger/gui/CartF4SCWidget.cxx @@ -40,25 +40,25 @@ CartridgeF4SCWidget::CartridgeF4SCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x100) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str(), 15) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF4)"); - VarList::push_back(items, "1 ($FF5)"); - VarList::push_back(items, "2 ($FF6)"); - VarList::push_back(items, "3 ($FF7)"); - VarList::push_back(items, "4 ($FF8)"); - VarList::push_back(items, "5 ($FF9)"); - VarList::push_back(items, "6 ($FFA)"); - VarList::push_back(items, "7 ($FFB)"); + VarList::push_back(items, "0 ($FFF4)"); + VarList::push_back(items, "1 ($FFF5)"); + VarList::push_back(items, "2 ($FFF6)"); + VarList::push_back(items, "3 ($FFF7)"); + VarList::push_back(items, "4 ($FFF8)"); + VarList::push_back(items, "5 ($FFF9)"); + VarList::push_back(items, "6 ($FFFA)"); + VarList::push_back(items, "7 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -101,7 +101,7 @@ string CartridgeF4SCWidget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF4", "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF4", "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF4Widget.cxx b/src/debugger/gui/CartF4Widget.cxx index fab3b3ade..a1a0ab95b 100644 --- a/src/debugger/gui/CartF4Widget.cxx +++ b/src/debugger/gui/CartF4Widget.cxx @@ -38,25 +38,25 @@ CartridgeF4Widget::CartridgeF4Widget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str(), 15) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF4)"); - VarList::push_back(items, "1 ($FF5)"); - VarList::push_back(items, "2 ($FF6)"); - VarList::push_back(items, "3 ($FF7)"); - VarList::push_back(items, "4 ($FF8)"); - VarList::push_back(items, "5 ($FF9)"); - VarList::push_back(items, "6 ($FFA)"); - VarList::push_back(items, "7 ($FFB)"); + VarList::push_back(items, "0 ($FFF4)"); + VarList::push_back(items, "1 ($FFF5)"); + VarList::push_back(items, "2 ($FFF6)"); + VarList::push_back(items, "3 ($FFF7)"); + VarList::push_back(items, "4 ($FFF8)"); + VarList::push_back(items, "5 ($FFF9)"); + VarList::push_back(items, "6 ($FFFA)"); + VarList::push_back(items, "7 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -88,7 +88,7 @@ string CartridgeF4Widget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF4", "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF4", "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF6SCWidget.cxx b/src/debugger/gui/CartF6SCWidget.cxx index cac35d4ee..62aa33ce7 100644 --- a/src/debugger/gui/CartF6SCWidget.cxx +++ b/src/debugger/gui/CartF6SCWidget.cxx @@ -40,21 +40,21 @@ CartridgeF6SCWidget::CartridgeF6SCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x100) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF6)"); - VarList::push_back(items, "1 ($FF7)"); - VarList::push_back(items, "2 ($FF8)"); - VarList::push_back(items, "3 ($FF9)"); + VarList::push_back(items, "0 ($FFF6)"); + VarList::push_back(items, "1 ($FFF7)"); + VarList::push_back(items, "2 ($FFF8)"); + VarList::push_back(items, "3 ($FFF9)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -96,7 +96,7 @@ string CartridgeF6SCWidget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF6", "$FF7", "$FF8", "$FF9" }; + static const char* spot[] = { "$FFF6", "$FFF7", "$FFF8", "$FFF9" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF6Widget.cxx b/src/debugger/gui/CartF6Widget.cxx index c2191b633..971afd96d 100644 --- a/src/debugger/gui/CartF6Widget.cxx +++ b/src/debugger/gui/CartF6Widget.cxx @@ -38,21 +38,21 @@ CartridgeF6Widget::CartridgeF6Widget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF6)"); - VarList::push_back(items, "1 ($FF7)"); - VarList::push_back(items, "2 ($FF8)"); - VarList::push_back(items, "3 ($FF9)"); + VarList::push_back(items, "0 ($FFF6)"); + VarList::push_back(items, "1 ($FFF7)"); + VarList::push_back(items, "2 ($FFF8)"); + VarList::push_back(items, "3 ($FFF9)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -83,7 +83,7 @@ string CartridgeF6Widget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF6", "$FF7", "$FF8", "$FF9" }; + static const char* spot[] = { "$FFF6", "$FFF7", "$FFF8", "$FFF9" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF8SCWidget.cxx b/src/debugger/gui/CartF8SCWidget.cxx index 6af9fd713..7b16242ad 100644 --- a/src/debugger/gui/CartF8SCWidget.cxx +++ b/src/debugger/gui/CartF8SCWidget.cxx @@ -40,19 +40,19 @@ CartridgeF8SCWidget::CartridgeF8SCWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x100) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF8)"); - VarList::push_back(items, "1 ($FF9)"); + VarList::push_back(items, "0 ($FFF8)"); + VarList::push_back(items, "1 ($FFF9)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -78,7 +78,7 @@ void CartridgeF8SCWidget::loadConfig() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CartridgeF8SCWidget::handleCommand(CommandSender* sender, - int cmd, int data, int id) + int cmd, int data, int id) { if(cmd == kBankChanged) { @@ -94,7 +94,7 @@ string CartridgeF8SCWidget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF8", "$FF9" }; + static const char* spot[] = { "$FFF8", "$FFF9" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartF8Widget.cxx b/src/debugger/gui/CartF8Widget.cxx index 9cb5bdac6..3070a61bc 100644 --- a/src/debugger/gui/CartF8Widget.cxx +++ b/src/debugger/gui/CartF8Widget.cxx @@ -38,19 +38,19 @@ CartridgeF8Widget::CartridgeF8Widget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << start << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "Atari", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF8)"); - VarList::push_back(items, "1 ($FF9)"); + VarList::push_back(items, "0 ($FFF8)"); + VarList::push_back(items, "1 ($FFF9)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -81,7 +81,7 @@ string CartridgeF8Widget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF8", "$FF9" }; + static const char* spot[] = { "$FFF8", "$FFF9" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartFA2Widget.cxx b/src/debugger/gui/CartFA2Widget.cxx index 069bceb21..7e86f2252 100644 --- a/src/debugger/gui/CartFA2Widget.cxx +++ b/src/debugger/gui/CartFA2Widget.cxx @@ -32,7 +32,7 @@ CartridgeFA2Widget::CartridgeFA2Widget( info << "Modified FA RAM+, six or seven 4K banks\n" << "256 bytes RAM @ $F000 - $F1FF\n" << " $F100 - $F1FF (R), $F000 - $F0FF (W)\n" - << "RAM can be loaded/saved to Harmony flash by accessing $FF4\n" + << "RAM can be loaded/saved to Harmony flash by accessing $FFF4\n" << "Startup bank = " << cart.myStartBank << "\n"; // Eventually, we should query this from the debugger/disassembler @@ -42,7 +42,7 @@ CartridgeFA2Widget::CartridgeFA2Widget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x200) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, @@ -50,19 +50,19 @@ CartridgeFA2Widget::CartridgeFA2Widget( info.str(), 15) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF5)"); - VarList::push_back(items, "1 ($FF6)"); - VarList::push_back(items, "2 ($FF7)"); - VarList::push_back(items, "3 ($FF8)"); - VarList::push_back(items, "4 ($FF9)"); - VarList::push_back(items, "5 ($FFA)"); + VarList::push_back(items, "0 ($FFF5)"); + VarList::push_back(items, "1 ($FFF6)"); + VarList::push_back(items, "2 ($FFF7)"); + VarList::push_back(items, "3 ($FFF8)"); + VarList::push_back(items, "4 ($FFF9)"); + VarList::push_back(items, "5 ($FFFA)"); if(cart.bankCount() == 7) - VarList::push_back(items, "6 ($FFB)"); + VarList::push_back(items, "6 ($FFFB)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); ypos += myLineHeight + 20; @@ -70,8 +70,8 @@ CartridgeFA2Widget::CartridgeFA2Widget( const int bwidth = _font.getStringWidth("Erase") + 20; StaticTextWidget* t = new StaticTextWidget(boss, _font, xpos, ypos, - _font.getStringWidth("Harmony Flash: "), - myFontHeight, "Harmony Flash: ", kTextAlignLeft); + _font.getStringWidth("Harmony Flash "), + myFontHeight, "Harmony Flash ", kTextAlignLeft); xpos += t->getWidth() + 4; myFlashErase = @@ -147,7 +147,7 @@ string CartridgeFA2Widget::bankState() ostringstream& buf = buffer(); static const char* spot[] = { - "$FF5", "$FF6", "$FF7", "$FF8", "$FF9", "$FFA", "$FFB" + "$FFF5", "$FFF6", "$FFF7", "$FFF8", "$FFF9", "$FFFA", "$FFFB" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartFAWidget.cxx b/src/debugger/gui/CartFAWidget.cxx index cd455974a..bbd6a04f0 100644 --- a/src/debugger/gui/CartFAWidget.cxx +++ b/src/debugger/gui/CartFAWidget.cxx @@ -40,20 +40,20 @@ CartridgeFAWidget::CartridgeFAWidget( uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset]; start -= start % 0x1000; info << "Bank " << i << " @ $" << Common::Base::HEX4 << (start + 0x200) << " - " - << "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n"; + << "$" << (start + 0xFFF) << " (hotspot = $F" << (spot+i) << ")\n"; } int xpos = 10, ypos = addBaseInformation(size, "CBS", info.str()) + myLineHeight; VariantList items; - VarList::push_back(items, "0 ($FF8)"); - VarList::push_back(items, "1 ($FF9)"); - VarList::push_back(items, "2 ($FFA)"); + VarList::push_back(items, "0 ($FFF8)"); + VarList::push_back(items, "1 ($FFF9)"); + VarList::push_back(items, "2 ($FFFA)"); myBank = - new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFFx) "), + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } @@ -95,7 +95,7 @@ string CartridgeFAWidget::bankState() { ostringstream& buf = buffer(); - static const char* spot[] = { "$FF8", "$FF9", "$FFA" }; + static const char* spot[] = { "$FFF8", "$FFF9", "$FFFA" }; buf << "Bank = " << std::dec << myCart.myCurrentBank << ", hotspot = " << spot[myCart.myCurrentBank]; diff --git a/src/debugger/gui/CartMCWidget.cxx b/src/debugger/gui/CartMCWidget.cxx index da7514111..e0902cebf 100644 --- a/src/debugger/gui/CartMCWidget.cxx +++ b/src/debugger/gui/CartMCWidget.cxx @@ -56,12 +56,12 @@ CartridgeMCWidget::CartridgeMCWidget( VarList::push_back(items, b + " (RAM)", b); } - const int lwidth = _font.getStringWidth("Set slice for segment X ($3X): "), + const int lwidth = _font.getStringWidth("Set slice for segment X ($3X) "), fwidth = _font.getStringWidth("255 (ROM)"); mySlice0 = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, - myLineHeight, items, "Set slice for segment 0 ($3C): ", + myLineHeight, items, "Set slice for segment 0 ($3C) ", lwidth, kSlice0Changed); mySlice0->setTarget(this); addFocusWidget(mySlice0); @@ -69,7 +69,7 @@ CartridgeMCWidget::CartridgeMCWidget( mySlice1 = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, - myLineHeight, items, "Set slice for segment 1 ($3D): ", + myLineHeight, items, "Set slice for segment 1 ($3D) ", lwidth, kSlice1Changed); mySlice1->setTarget(this); addFocusWidget(mySlice1); @@ -77,7 +77,7 @@ CartridgeMCWidget::CartridgeMCWidget( mySlice2 = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, - myLineHeight, items, "Set slice for segment 2 ($3E): ", + myLineHeight, items, "Set slice for segment 2 ($3E) ", lwidth, kSlice2Changed); mySlice2->setTarget(this); addFocusWidget(mySlice2); @@ -85,7 +85,7 @@ CartridgeMCWidget::CartridgeMCWidget( mySlice3 = new PopUpWidget(boss, _font, xpos, ypos-2, fwidth, - myLineHeight, items, "Set slice for segment 3 ($3F): ", + myLineHeight, items, "Set slice for segment 3 ($3F) ", lwidth, kSlice3Changed); mySlice3->setTarget(this); addFocusWidget(mySlice3); diff --git a/src/debugger/gui/CartMDMWidget.cxx b/src/debugger/gui/CartMDMWidget.cxx index 952534739..4cd13fffc 100644 --- a/src/debugger/gui/CartMDMWidget.cxx +++ b/src/debugger/gui/CartMDMWidget.cxx @@ -48,8 +48,8 @@ CartridgeMDMWidget::CartridgeMDMWidget( myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("xxx ($0FFF) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); diff --git a/src/debugger/gui/CartSBWidget.cxx b/src/debugger/gui/CartSBWidget.cxx index c2d963400..29b925494 100644 --- a/src/debugger/gui/CartSBWidget.cxx +++ b/src/debugger/gui/CartSBWidget.cxx @@ -56,8 +56,8 @@ CartridgeSBWidget::CartridgeSBWidget( myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("XX ($800) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/CartUAWidget.cxx b/src/debugger/gui/CartUAWidget.cxx index 390f87464..5a80a5745 100644 --- a/src/debugger/gui/CartUAWidget.cxx +++ b/src/debugger/gui/CartUAWidget.cxx @@ -50,8 +50,8 @@ CartridgeUAWidget::CartridgeUAWidget( VarList::push_back(items, "1 ($240)"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("0 ($FFx) "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/CartWDWidget.cxx b/src/debugger/gui/CartWDWidget.cxx index d31ca103b..ce36cb015 100644 --- a/src/debugger/gui/CartWDWidget.cxx +++ b/src/debugger/gui/CartWDWidget.cxx @@ -57,8 +57,8 @@ CartridgeWDWidget::CartridgeWDWidget( VarList::push_back(items, "15 ($3F) [6,0,5,1*]", 15); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth("15 ($3F) [6,0,5,1*]"), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/CartX07Widget.cxx b/src/debugger/gui/CartX07Widget.cxx index d32218bf8..00d51c9b7 100644 --- a/src/debugger/gui/CartX07Widget.cxx +++ b/src/debugger/gui/CartX07Widget.cxx @@ -66,8 +66,8 @@ CartridgeX07Widget::CartridgeX07Widget( VarList::push_back(items, " 15"); myBank = new PopUpWidget(boss, _font, xpos, ypos-2, _font.getStringWidth(" 15 "), - myLineHeight, items, "Set bank: ", - _font.getStringWidth("Set bank: "), kBankChanged); + myLineHeight, items, "Set bank ", + _font.getStringWidth("Set bank "), kBankChanged); myBank->setTarget(this); addFocusWidget(myBank); } diff --git a/src/debugger/gui/RomWidget.cxx b/src/debugger/gui/RomWidget.cxx index 9de78da8d..921c322c8 100644 --- a/src/debugger/gui/RomWidget.cxx +++ b/src/debugger/gui/RomWidget.cxx @@ -48,7 +48,7 @@ RomWidget::RomWidget(GuiObject* boss, const GUI::Font& lfont, const GUI::Font& n "Bank", kTextAlignLeft); xpos += t->getWidth() + 5; - myBank = new EditTextWidget(boss, nfont, xpos, ypos-1, + myBank = new EditTextWidget(boss, nfont, xpos, ypos-2, _w - 2 - xpos, nfont.getLineHeight()); // Create rom listing From 50cef5767019ba31c241e8f0e0b3706feade4d76 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 6 May 2017 19:47:42 -0230 Subject: [PATCH 3/6] Great colon purge Part4: All in-game dialogs. --- src/gui/AudioDialog.cxx | 8 ++--- src/gui/BrowserDialog.cxx | 6 ++-- src/gui/ComboDialog.cxx | 16 ++++----- src/gui/ConfigPathDialog.cxx | 26 +++++++------- src/gui/EventMappingWidget.cxx | 8 ++--- src/gui/GameInfoDialog.cxx | 62 ++++++++++++++++---------------- src/gui/GlobalPropsDialog.cxx | 18 +++++----- src/gui/HelpDialog.cxx | 10 +++--- src/gui/InputDialog.cxx | 20 +++++------ src/gui/JoystickDialog.cxx | 4 +-- src/gui/LauncherDialog.cxx | 4 +-- src/gui/LauncherFilterDialog.cxx | 4 +-- src/gui/LoggerDialog.cxx | 4 +-- src/gui/RomAuditDialog.cxx | 10 +++--- src/gui/SnapshotDialog.cxx | 16 ++++----- src/gui/UIDialog.cxx | 30 ++++++++-------- src/gui/VideoDialog.cxx | 60 +++++++++++++++---------------- 17 files changed, 153 insertions(+), 153 deletions(-) diff --git a/src/gui/AudioDialog.cxx b/src/gui/AudioDialog.cxx index 7788f3674..475846fed 100644 --- a/src/gui/AudioDialog.cxx +++ b/src/gui/AudioDialog.cxx @@ -42,7 +42,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, buttonWidth = font.getStringWidth("Defaults") + 20, buttonHeight = font.getLineHeight() + 4; int xpos, ypos; - int lwidth = font.getStringWidth("Sample Size (*): "), + int lwidth = font.getStringWidth("Sample Size (*) "), pwidth = font.getStringWidth("512 bytes"); WidgetArray wid; VariantList items; @@ -55,7 +55,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, xpos = 3 * fontWidth; ypos = 10; myVolumeSlider = new SliderWidget(this, font, xpos, ypos, 6*fontWidth, lineHeight, - "Volume: ", lwidth, kVolumeChanged); + "Volume ", lwidth, kVolumeChanged); myVolumeSlider->setMinValue(1); myVolumeSlider->setMaxValue(100); wid.push_back(myVolumeSlider); myVolumeLabel = new StaticTextWidget(this, font, @@ -75,7 +75,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "4 KB", "4096"); myFragsizePopup = new PopUpWidget(this, font, xpos, ypos, pwidth + myVolumeLabel->getWidth() - 4, lineHeight, - items, "Sample size (*): ", lwidth); + items, "Sample size (*) ", lwidth); wid.push_back(myFragsizePopup); ypos += lineHeight + 4; @@ -88,7 +88,7 @@ AudioDialog::AudioDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "48000 Hz", "48000"); myFreqPopup = new PopUpWidget(this, font, xpos, ypos, pwidth + myVolumeLabel->getWidth() - 4, lineHeight, - items, "Frequency (*): ", lwidth); + items, "Frequency (*) ", lwidth); wid.push_back(myFreqPopup); ypos += lineHeight + 4; diff --git a/src/gui/BrowserDialog.cxx b/src/gui/BrowserDialog.cxx index 3b6cdfb1e..2ad9fd396 100644 --- a/src/gui/BrowserDialog.cxx +++ b/src/gui/BrowserDialog.cxx @@ -74,9 +74,9 @@ BrowserDialog::BrowserDialog(GuiObject* boss, const GUI::Font& font, // Add currently selected item ypos += _fileList->getHeight() + 4; - _type = new StaticTextWidget(this, font, xpos, ypos, - font.getStringWidth("Name: "), lineHeight, - "Name:", kTextAlignCenter); + _type = new StaticTextWidget(this, font, xpos, ypos+2, + font.getStringWidth("Name "), lineHeight, + "Name", kTextAlignCenter); _selected = new EditTextWidget(this, font, xpos + _type->getWidth(), ypos, _w - _type->getWidth() - 2 * xpos, lineHeight, ""); _selected->setEditable(false); diff --git a/src/gui/ComboDialog.cxx b/src/gui/ComboDialog.cxx index 6e8369b12..feefac42c 100644 --- a/src/gui/ComboDialog.cxx +++ b/src/gui/ComboDialog.cxx @@ -69,14 +69,14 @@ ComboDialog::ComboDialog(GuiObject* boss, const GUI::Font& font, }; xpos = 10; - myEvents[0] = nullptr; ADD_EVENT_POPUP(0, "Event 1: "); - myEvents[1] = nullptr; ADD_EVENT_POPUP(1, "Event 2: "); - myEvents[2] = nullptr; ADD_EVENT_POPUP(2, "Event 3: "); - myEvents[3] = nullptr; ADD_EVENT_POPUP(3, "Event 4: "); - myEvents[4] = nullptr; ADD_EVENT_POPUP(4, "Event 5: "); - myEvents[5] = nullptr; ADD_EVENT_POPUP(5, "Event 6: "); - myEvents[6] = nullptr; ADD_EVENT_POPUP(6, "Event 7: "); - myEvents[7] = nullptr; ADD_EVENT_POPUP(7, "Event 8: "); + myEvents[0] = nullptr; ADD_EVENT_POPUP(0, "Event 1 "); + myEvents[1] = nullptr; ADD_EVENT_POPUP(1, "Event 2 "); + myEvents[2] = nullptr; ADD_EVENT_POPUP(2, "Event 3 "); + myEvents[3] = nullptr; ADD_EVENT_POPUP(3, "Event 4 "); + myEvents[4] = nullptr; ADD_EVENT_POPUP(4, "Event 5 "); + myEvents[5] = nullptr; ADD_EVENT_POPUP(5, "Event 6 "); + myEvents[6] = nullptr; ADD_EVENT_POPUP(6, "Event 7 "); + myEvents[7] = nullptr; ADD_EVENT_POPUP(7, "Event 8 "); // Add Defaults, OK and Cancel buttons ButtonWidget* b; diff --git a/src/gui/ConfigPathDialog.cxx b/src/gui/ConfigPathDialog.cxx index 692492ae7..5fac271b3 100644 --- a/src/gui/ConfigPathDialog.cxx +++ b/src/gui/ConfigPathDialog.cxx @@ -38,7 +38,7 @@ ConfigPathDialog::ConfigPathDialog( { const int lineHeight = font.getLineHeight(), fontWidth = font.getMaxCharWidth(), - buttonWidth = font.getStringWidth("Properties file:") + 20, + buttonWidth = font.getStringWidth("Properties file") + 20, buttonHeight = font.getLineHeight() + 4; const int vBorder = 8; int xpos, ypos; @@ -54,7 +54,7 @@ ConfigPathDialog::ConfigPathDialog( // ROM path ButtonWidget* romButton = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Rom path:", kChooseRomDirCmd); + "Rom path", kChooseRomDirCmd); wid.push_back(romButton); xpos += buttonWidth + 10; myRomPath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -64,7 +64,7 @@ ConfigPathDialog::ConfigPathDialog( // Cheat file xpos = vBorder; ypos += romButton->getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Cheat file:", kChooseCheatFileCmd); + "Cheat file", kChooseCheatFileCmd); wid.push_back(b); xpos += buttonWidth + 10; myCheatFile = new EditTextWidget(this, font, xpos, ypos + 2, @@ -74,7 +74,7 @@ ConfigPathDialog::ConfigPathDialog( // Palette file xpos = vBorder; ypos += b->getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Palette file:", kChoosePaletteFileCmd); + "Palette file", kChoosePaletteFileCmd); wid.push_back(b); xpos += buttonWidth + 10; myPaletteFile = new EditTextWidget(this, font, xpos, ypos + 2, @@ -84,7 +84,7 @@ ConfigPathDialog::ConfigPathDialog( // Properties file xpos = vBorder; ypos += b->getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Properties file:", kChoosePropsFileCmd); + "Properties file", kChoosePropsFileCmd); wid.push_back(b); xpos += buttonWidth + 10; myPropsFile = new EditTextWidget(this, font, xpos, ypos + 2, @@ -94,7 +94,7 @@ ConfigPathDialog::ConfigPathDialog( // State directory xpos = vBorder; ypos += b->getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "State path:", kChooseStateDirCmd); + "State path", kChooseStateDirCmd); wid.push_back(b); xpos += buttonWidth + 10; myStatePath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -104,7 +104,7 @@ ConfigPathDialog::ConfigPathDialog( // NVRAM directory xpos = vBorder; ypos += b->getHeight() + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "NVRAM path:", kChooseNVRamDirCmd); + "NVRAM path", kChooseNVRamDirCmd); wid.push_back(b); xpos += buttonWidth + 10; myNVRamPath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -206,7 +206,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select ROM directory:", myRomPath->getText(), + myBrowser->show("Select ROM directory", myRomPath->getText(), BrowserDialog::Directories, LauncherDialog::kRomDirChosenCmd); break; @@ -214,7 +214,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select cheat file:", myCheatFile->getText(), + myBrowser->show("Select cheat file", myCheatFile->getText(), BrowserDialog::FileLoad, kCheatFileChosenCmd); break; @@ -222,7 +222,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select palette file:", myPaletteFile->getText(), + myBrowser->show("Select palette file", myPaletteFile->getText(), BrowserDialog::FileLoad, kPaletteFileChosenCmd); break; @@ -230,7 +230,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select properties file:", myPropsFile->getText(), + myBrowser->show("Select properties file", myPropsFile->getText(), BrowserDialog::FileLoad, kPropsFileChosenCmd); break; @@ -238,7 +238,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select NVRAM directory:", myNVRamPath->getText(), + myBrowser->show("Select NVRAM directory", myNVRamPath->getText(), BrowserDialog::Directories, kNVRamDirChosenCmd); break; @@ -246,7 +246,7 @@ void ConfigPathDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select state directory:", myStatePath->getText(), + myBrowser->show("Select state directory", myStatePath->getText(), BrowserDialog::Directories, kStateDirChosenCmd); break; diff --git a/src/gui/EventMappingWidget.cxx b/src/gui/EventMappingWidget.cxx index 55f8d09de..764a92c91 100644 --- a/src/gui/EventMappingWidget.cxx +++ b/src/gui/EventMappingWidget.cxx @@ -106,13 +106,13 @@ EventMappingWidget::EventMappingWidget(GuiObject* boss, const GUI::Font& font, // Show message for currently selected event xpos = 10; ypos = 5 + myActionsList->getHeight() + 5; StaticTextWidget* t; - t = new StaticTextWidget(boss, font, xpos, ypos, font.getStringWidth("Action:"), - fontHeight, "Action:", kTextAlignLeft); + t = new StaticTextWidget(boss, font, xpos, ypos+2, font.getStringWidth("Action"), + fontHeight, "Action", kTextAlignLeft); t->setFlags(WIDGET_CLEARBG); - myKeyMapping = new EditTextWidget(boss, font, xpos + t->getWidth() + 5, ypos, + myKeyMapping = new EditTextWidget(boss, font, xpos + t->getWidth() + 8, ypos, _w - xpos - t->getWidth() - 15, lineHeight, ""); - myKeyMapping->setEditable(false); + myKeyMapping->setEditable(false, true); myKeyMapping->clearFlags(WIDGET_RETAIN_FOCUS); } diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 7a6be8540..722a760d1 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -65,52 +65,52 @@ GameInfoDialog::GameInfoDialog( tabID = myTab->addTab("Cartridge"); xpos = 10; - lwidth = font.getStringWidth("Manufacturer: "); + lwidth = font.getStringWidth("Manufacturer "); fwidth = _w - xpos - lwidth - 10; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Name:", kTextAlignLeft); + "Name", kTextAlignLeft); myName = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myName); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "MD5:", kTextAlignLeft); + "MD5", kTextAlignLeft); myMD5 = new StaticTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, "", kTextAlignLeft); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Manufacturer:", kTextAlignLeft); + "Manufacturer", kTextAlignLeft); myManufacturer = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myManufacturer); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Model:", kTextAlignLeft); + "Model", kTextAlignLeft); myModelNo = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myModelNo); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Rarity:", kTextAlignLeft); + "Rarity", kTextAlignLeft); myRarity = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myRarity); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Note:", kTextAlignLeft); + "Note", kTextAlignLeft); myNote = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myNote); ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Sound:", kTextAlignLeft); + "Sound", kTextAlignLeft); pwidth = font.getStringWidth("Stereo"); items.clear(); VarList::push_back(items, "Mono", "MONO"); @@ -121,7 +121,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 3; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Type:", kTextAlignLeft); + "Type", kTextAlignLeft); pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)"); items.clear(); for(int i = 0; i < Cartridge::ourNumBSTypes; ++i) @@ -139,10 +139,10 @@ GameInfoDialog::GameInfoDialog( tabID = myTab->addTab("Console"); xpos = 10; ypos = vBorder; - lwidth = font.getStringWidth("Right Difficulty: "); + lwidth = font.getStringWidth("Right Difficulty "); pwidth = font.getStringWidth("B & W"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Left Difficulty:", kTextAlignLeft); + "Left Difficulty", kTextAlignLeft); items.clear(); VarList::push_back(items, "B", "B"); VarList::push_back(items, "A", "A"); @@ -152,7 +152,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 5; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Right Difficulty:", kTextAlignLeft); + "Right Difficulty", kTextAlignLeft); // ... use same items as above myRightDiff = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); @@ -160,7 +160,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 5; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "TV Type:", kTextAlignLeft); + "TV Type", kTextAlignLeft); items.clear(); VarList::push_back(items, "Color", "COLOR"); VarList::push_back(items, "B & W", "BW"); @@ -177,10 +177,10 @@ GameInfoDialog::GameInfoDialog( tabID = myTab->addTab("Controller"); xpos = 10; ypos = vBorder; - lwidth = font.getStringWidth("P0 Controller: "); + lwidth = font.getStringWidth("P0 Controller "); pwidth = font.getStringWidth("Paddles_IAxis"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "P0 Controller:", kTextAlignLeft); + "P0 Controller", kTextAlignLeft); ctrls.clear(); VarList::push_back(ctrls, "Joystick", "JOYSTICK" ); VarList::push_back(ctrls, "Paddles", "PADDLES" ); @@ -218,7 +218,7 @@ GameInfoDialog::GameInfoDialog( xpos = 10; ypos += lineHeight + 5; pwidth = font.getStringWidth("Paddles_IAxis"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "P1 Controller:", kTextAlignLeft); + "P1 Controller", kTextAlignLeft); myP1Controller = new PopUpWidget(myTab, font, xpos+lwidth, ypos, pwidth, lineHeight, ctrls, "", 0, 0); wid.push_back(myP1Controller); @@ -235,7 +235,7 @@ GameInfoDialog::GameInfoDialog( xpos = 10; ypos += lineHeight + 5; pwidth = font.getStringWidth("Yes"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Swap Paddles:", kTextAlignLeft); + "Swap Paddles", kTextAlignLeft); items.clear(); VarList::push_back(items, "Yes", "YES"); VarList::push_back(items, "No", "NO"); @@ -244,18 +244,18 @@ GameInfoDialog::GameInfoDialog( wid.push_back(mySwapPaddles); ypos += lineHeight + 8; - lwidth = font.getStringWidth("Mouse axis mode: "); + lwidth = font.getStringWidth("Mouse axis mode "); pwidth = font.getStringWidth("Specific axis"); items.clear(); VarList::push_back(items, "Automatic", "AUTO"); VarList::push_back(items, "Specific axis", "specific"); myMouseControl = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "Mouse axis mode: ", lwidth, kMCtrlChanged); + "Mouse axis mode ", lwidth, kMCtrlChanged); wid.push_back(myMouseControl); // Mouse controller specific axis - lwidth = font.getStringWidth("X-Axis is: "); + lwidth = font.getStringWidth("X-Axis is "); pwidth = font.getStringWidth("MindLink 0"); items.clear(); VarList::push_back(items, "None", MouseControl::NoControl); @@ -270,18 +270,18 @@ GameInfoDialog::GameInfoDialog( xpos = 45; ypos += lineHeight + 4; myMouseX = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "X-Axis is: ", lwidth); + "X-Axis is ", lwidth); wid.push_back(myMouseX); ypos += lineHeight + 4; myMouseY = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "Y-Axis is: ", lwidth); + "Y-Axis is ", lwidth); wid.push_back(myMouseY); xpos = 10; ypos += lineHeight + 8; - lwidth = font.getStringWidth("Mouse axis range: "); + lwidth = font.getStringWidth("Mouse axis range "); myMouseRange = new SliderWidget(myTab, font, xpos, ypos, 8*fontWidth, lineHeight, - "Mouse axis range: ", lwidth, kMRangeChanged); + "Mouse axis range ", lwidth, kMRangeChanged); myMouseRange->setMinValue(1); myMouseRange->setMaxValue(100); wid.push_back(myMouseRange); @@ -299,10 +299,10 @@ GameInfoDialog::GameInfoDialog( tabID = myTab->addTab("Display"); xpos = 10; ypos = vBorder; - lwidth = font.getStringWidth("Use Phosphor: "); + lwidth = font.getStringWidth("Use Phosphor "); pwidth = font.getStringWidth("Auto-detect"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Format:", kTextAlignLeft); + "Format", kTextAlignLeft); items.clear(); VarList::push_back(items, "Auto-detect", "AUTO"); VarList::push_back(items, "NTSC", "NTSC"); @@ -317,7 +317,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 5; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "YStart:", kTextAlignLeft); + "YStart", kTextAlignLeft); myYStart = new SliderWidget(myTab, font, xpos+lwidth, ypos, 8*fontWidth, lineHeight, "", 0, kYStartChanged); @@ -330,7 +330,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 5; new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Height:", kTextAlignLeft); + "Height", kTextAlignLeft); myHeight = new SliderWidget(myTab, font, xpos+lwidth, ypos, 8*fontWidth, lineHeight, "", 0, kHeightChanged); myHeight->setMinValue(FrameManager::minViewableHeight-1); @@ -343,7 +343,7 @@ GameInfoDialog::GameInfoDialog( ypos += lineHeight + 5; pwidth = font.getStringWidth("Yes"); new StaticTextWidget(myTab, font, xpos, ypos+1, lwidth, fontHeight, - "Use Phosphor:", kTextAlignLeft); + "Use Phosphor", kTextAlignLeft); items.clear(); VarList::push_back(items, "Yes", "YES"); VarList::push_back(items, "No", "NO"); @@ -352,8 +352,8 @@ GameInfoDialog::GameInfoDialog( wid.push_back(myPhosphor); myPPBlend = new SliderWidget(myTab, font, xpos + lwidth + myPhosphor->getWidth() + 10, - ypos, 8*fontWidth, lineHeight, "Blend: ", - font.getStringWidth("Blend: "), + ypos, 8*fontWidth, lineHeight, "Blend ", + font.getStringWidth("Blend "), kPPBlendChanged); myPPBlend->setMinValue(1); myPPBlend->setMaxValue(100); wid.push_back(myPPBlend); diff --git a/src/gui/GlobalPropsDialog.cxx b/src/gui/GlobalPropsDialog.cxx index 097deaa8f..68a81bf03 100644 --- a/src/gui/GlobalPropsDialog.cxx +++ b/src/gui/GlobalPropsDialog.cxx @@ -39,7 +39,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) buttonWidth = font.getStringWidth("Defaults") + 20, buttonHeight = font.getLineHeight() + 4; int xpos, ypos; - int lwidth = font.getStringWidth("Right Difficulty: "), + int lwidth = font.getStringWidth("Right Difficulty "), pwidth = font.getStringWidth("CM (SpectraVideo CompuMate)"); WidgetArray wid; VariantList items; @@ -53,7 +53,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) // Bankswitch type new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, - "Bankswitch type:", kTextAlignLeft); + "Bankswitch type", kTextAlignLeft); for(int i = 0; i < Cartridge::ourNumBSTypes; ++i) VarList::push_back(items, Cartridge::ourBSList[i].desc, Cartridge::ourBSList[i].type); myBSType = new PopUpWidget(this, font, xpos+lwidth, ypos, @@ -64,7 +64,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) // Left difficulty pwidth = font.getStringWidth("Debugger"); new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, - "Left Difficulty:", kTextAlignLeft); + "Left Difficulty", kTextAlignLeft); items.clear(); VarList::push_back(items, "Default", "DEFAULT"); VarList::push_back(items, "B", "B"); @@ -76,7 +76,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) // Right difficulty new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, - "Right Difficulty:", kTextAlignLeft); + "Right Difficulty", kTextAlignLeft); // ... use same items as above myRightDiff = new PopUpWidget(this, font, xpos+lwidth, ypos, pwidth, lineHeight, items, "", 0, 0); @@ -85,7 +85,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) // TV type new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, - "TV Type:", kTextAlignLeft); + "TV Type", kTextAlignLeft); items.clear(); VarList::push_back(items, "Default", "DEFAULT"); VarList::push_back(items, "Color", "COLOR"); @@ -97,7 +97,7 @@ GlobalPropsDialog::GlobalPropsDialog(GuiObject* boss, const GUI::Font& font) // Start in debugger mode new StaticTextWidget(this, font, xpos, ypos+1, lwidth, fontHeight, - "Startup Mode:", kTextAlignLeft); + "Startup Mode", kTextAlignLeft); items.clear(); VarList::push_back(items, "Console", "false"); VarList::push_back(items, "Debugger", "true"); @@ -151,7 +151,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y, // Left joystick StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos+2, - font.getStringWidth("Left Joy:"), fontHeight, "Left Joy:", + font.getStringWidth("Left Joy"), fontHeight, "Left Joy", kTextAlignLeft); xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; myJoy[kJ0Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ0Up); @@ -171,7 +171,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y, // Right joystick t = new StaticTextWidget(this, font, xpos, ypos+2, - font.getStringWidth("Right Joy:"), fontHeight, "Right Joy:", + font.getStringWidth("Right Joy"), fontHeight, "Right Joy", kTextAlignLeft); xpos += t->getWidth()/2 - 5; ypos += t->getHeight() + 10; myJoy[kJ1Up] = new CheckboxWidget(this, font, xpos, ypos, "", kJ1Up); @@ -190,7 +190,7 @@ int GlobalPropsDialog::addHoldWidgets(const GUI::Font& font, int x, int y, // Console Select/Reset t = new StaticTextWidget(this, font, xpos, ypos+2, - font.getStringWidth("Console:"), fontHeight, "Console:", + font.getStringWidth("Console"), fontHeight, "Console", kTextAlignLeft); xpos -= 10; ypos += t->getHeight() + 10; myHoldSelect = new CheckboxWidget(this, font, xpos, ypos, "Select"); diff --git a/src/gui/HelpDialog.cxx b/src/gui/HelpDialog.cxx index ed4733d1a..7e0ad499d 100644 --- a/src/gui/HelpDialog.cxx +++ b/src/gui/HelpDialog.cxx @@ -103,7 +103,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title) switch(page) { case 1: - title = "Common commands:"; + title = "Common commands"; #ifndef BSPF_MAC_OSX ADD_BIND("Ctrl Q", "Quit emulation"); #else @@ -121,7 +121,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title) break; case 2: - title = "Special commands:"; + title = "Special commands"; ADD_BIND("Ctrl g", "Grab mouse (keep in window)"); ADD_BIND("Ctrl f", "Switch between NTSC/PAL/SECAM"); ADD_BIND("Ctrl s", "Save game properties"); @@ -132,7 +132,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title) break; case 3: - title = "TV Filters:"; + title = "TV Filters"; ADD_BIND(ALT_" 1", "Disable filtering"); ADD_BIND(ALT_" 2", "Enable 'Composite' mode"); ADD_BIND(ALT_" 3", "Enable 'S-video' mode"); @@ -146,7 +146,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title) break; case 4: - title = "Developer commands:"; + title = "Developer commands"; ADD_BIND("~", "Enter/exit debugger"); ADD_LINE(); ADD_BIND(ALT_" PgUp", "Increase Display.YStart"); @@ -156,7 +156,7 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title) break; case 5: - title = "All other commands:"; + title = "All other commands"; ADD_LINE(); ADD_BIND("Remapped Events", ""); ADD_TEXT("Most other commands can be"); diff --git a/src/gui/InputDialog.cxx b/src/gui/InputDialog.cxx index 2c4429a3e..42f7af5ec 100644 --- a/src/gui/InputDialog.cxx +++ b/src/gui/InputDialog.cxx @@ -104,13 +104,13 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) // Stelladaptor mappings xpos = 5; ypos = 5; - lwidth = font.getStringWidth("Use mouse as a controller: "); + lwidth = font.getStringWidth("Use mouse as a controller "); pwidth = font.getStringWidth("-UI, -Emulation"); VarList::push_back(items, "Left / Right", "lr"); VarList::push_back(items, "Right / Left", "rl"); mySAPort = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "Stelladaptor port order: ", lwidth); + "Stelladaptor port order ", lwidth); wid.push_back(mySAPort); // Use mouse as controller @@ -120,7 +120,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) VarList::push_back(items, "Analog devices", "analog"); VarList::push_back(items, "Never", "never"); myMouseControl = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "Use mouse as a controller: ", lwidth); + "Use mouse as a controller ", lwidth); wid.push_back(myMouseControl); // Mouse cursor state @@ -131,7 +131,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) VarList::push_back(items, "+UI, -Emulation", "2"); VarList::push_back(items, "+UI, +Emulation", "3"); myCursorState = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, items, - "Mouse cursor visibility: ", lwidth); + "Mouse cursor visibility ", lwidth); wid.push_back(myCursorState); #ifndef WINDOWED_SUPPORT myCursorState->clearFlags(WIDGET_ENABLED); @@ -139,21 +139,21 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) // Add AtariVox serial port ypos += lineHeight + 5; - lwidth = font.getStringWidth("AVox serial port: "); + lwidth = font.getStringWidth("AVox serial port "); int fwidth = _w - xpos - lwidth - 20; new StaticTextWidget(myTab, font, xpos, ypos, lwidth, fontHeight, - "AVox serial port: ", kTextAlignLeft); + "AVox serial port ", kTextAlignLeft); myAVoxPort = new EditTextWidget(myTab, font, xpos+lwidth, ypos, fwidth, fontHeight, ""); wid.push_back(myAVoxPort); - lwidth = font.getStringWidth("Digital paddle sensitivity: "); + lwidth = font.getStringWidth("Digital paddle sensitivity "); pwidth = font.getMaxCharWidth() * 8; // Add joystick deadzone setting ypos += lineHeight + 8; myDeadzone = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "Joystick deadzone size: ", lwidth, kDeadzoneChanged); + "Joystick deadzone size ", lwidth, kDeadzoneChanged); myDeadzone->setMinValue(0); myDeadzone->setMaxValue(29); xpos += myDeadzone->getWidth() + 5; myDeadzoneLabel = new StaticTextWidget(myTab, font, xpos, ypos+1, 5*fontWidth, @@ -164,7 +164,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) // Add paddle speed (digital emulation) xpos = 5; ypos += lineHeight + 4; myDPaddleSpeed = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "Digital paddle sensitivity: ", + "Digital paddle sensitivity ", lwidth, kDPSpeedChanged); myDPaddleSpeed->setMinValue(1); myDPaddleSpeed->setMaxValue(20); xpos += myDPaddleSpeed->getWidth() + 5; @@ -176,7 +176,7 @@ void InputDialog::addDevicePortTab(const GUI::Font& font) // Add paddle speed (mouse emulation) xpos = 5; ypos += lineHeight + 4; myMPaddleSpeed = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "Mouse paddle sensitivity: ", + "Mouse paddle sensitivity ", lwidth, kMPSpeedChanged); myMPaddleSpeed->setMinValue(1); myMPaddleSpeed->setMaxValue(20); xpos += myMPaddleSpeed->getWidth() + 5; diff --git a/src/gui/JoystickDialog.cxx b/src/gui/JoystickDialog.cxx index 1868b20ac..c72c2d2bc 100644 --- a/src/gui/JoystickDialog.cxx +++ b/src/gui/JoystickDialog.cxx @@ -45,8 +45,8 @@ JoystickDialog::JoystickDialog(GuiObject* boss, const GUI::Font& font, // Joystick ID ypos = _h - buttonHeight - 10; StaticTextWidget* t = new StaticTextWidget(this, font, xpos, ypos, - font.getStringWidth("Joystick ID: "), font.getFontHeight(), - "Joystick ID: ", kTextAlignLeft); + font.getStringWidth("Joystick ID "), font.getFontHeight(), + "Joystick ID ", kTextAlignLeft); xpos += t->getWidth() + 4; myJoyText = new EditTextWidget(this, font, xpos, ypos-2, font.getStringWidth("Unplugged")+8, font.getLineHeight(), ""); diff --git a/src/gui/LauncherDialog.cxx b/src/gui/LauncherDialog.cxx index 6ee095be3..f1f9e2354 100644 --- a/src/gui/LauncherDialog.cxx +++ b/src/gui/LauncherDialog.cxx @@ -116,7 +116,7 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent, // Add note textwidget to show any notes for the currently selected ROM xpos = 10; xpos += 5; ypos += myList->getHeight() + 4; - lwidth = font.getStringWidth("Note:"); + lwidth = font.getStringWidth("Note"); myDirLabel = new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, "Dir:", kTextAlignLeft); xpos += lwidth + 5; @@ -515,7 +515,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd, if(!myRomDir) myRomDir = make_ptr(this, instance().frameBuffer().font(), _w, _h); - myRomDir->show("Select ROM directory:", "~", + myRomDir->show("Select ROM directory", "~", BrowserDialog::Directories, kStartupRomDirChosenCmd); break; diff --git a/src/gui/LauncherFilterDialog.cxx b/src/gui/LauncherFilterDialog.cxx index 14ffa9e3b..a1a553d9a 100644 --- a/src/gui/LauncherFilterDialog.cxx +++ b/src/gui/LauncherFilterDialog.cxx @@ -39,7 +39,7 @@ LauncherFilterDialog::LauncherFilterDialog(GuiObject* boss, const GUI::Font& fon buttonWidth = font.getStringWidth("Defaults") + 20, buttonHeight = font.getLineHeight() + 4; int xpos, ypos; - int lwidth = font.getStringWidth("Show: "), + int lwidth = font.getStringWidth("Show "), pwidth = font.getStringWidth("ROMs ending with"); WidgetArray wid; VariantList items; @@ -55,7 +55,7 @@ LauncherFilterDialog::LauncherFilterDialog(GuiObject* boss, const GUI::Font& fon VarList::push_back(items, "ROMs ending with", "__EXTS"); myFileType = new PopUpWidget(this, font, xpos, ypos, pwidth, lineHeight, items, - "Show: ", lwidth, kFileTypeChanged); + "Show ", lwidth, kFileTypeChanged); wid.push_back(myFileType); ypos += lineHeight + 10; diff --git a/src/gui/LoggerDialog.cxx b/src/gui/LoggerDialog.cxx index 1cd9ce1d8..606e7bc50 100644 --- a/src/gui/LoggerDialog.cxx +++ b/src/gui/LoggerDialog.cxx @@ -67,8 +67,8 @@ LoggerDialog::LoggerDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Verbose", "2"); myLogLevel = new PopUpWidget(this, font, xpos, ypos, font.getStringWidth("Verbose"), - lineHeight, items, "Log level: ", - font.getStringWidth("Log level: ")); + lineHeight, items, "Log level ", + font.getStringWidth("Log level ")); wid.push_back(myLogLevel); // Should log output also be shown on the console? diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index 6cd6d414e..521a77453 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -44,7 +44,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, const int lineHeight = font.getLineHeight(), fontWidth = font.getMaxCharWidth(), fontHeight = font.getFontHeight(), - buttonWidth = font.getStringWidth("Audit path:") + 20, + buttonWidth = font.getStringWidth("Audit path") + 20, buttonHeight = font.getLineHeight() + 4, lwidth = font.getStringWidth("ROMs without properties (skipped): "); int xpos = vBorder, ypos = vBorder; @@ -57,7 +57,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, // Audit path ButtonWidget* romButton = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Audit path:", kChooseAuditDirCmd); + "Audit path", kChooseAuditDirCmd); wid.push_back(romButton); xpos += buttonWidth + 10; myRomPath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -67,14 +67,14 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, // Show results of ROM audit xpos = vBorder + 10; ypos += buttonHeight + 10; new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, - "ROMs with properties (renamed): ", kTextAlignLeft); + "ROMs with properties (renamed) ", kTextAlignLeft); myResults1 = new StaticTextWidget(this, font, xpos + lwidth, ypos, _w - lwidth - 20, fontHeight, "", kTextAlignLeft); myResults1->setFlags(WIDGET_CLEARBG); ypos += buttonHeight; new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, - "ROMs without properties (skipped): ", kTextAlignLeft); + "ROMs without properties (skipped) ", kTextAlignLeft); myResults2 = new StaticTextWidget(this, font, xpos + lwidth, ypos, _w - lwidth - 20, fontHeight, "", kTextAlignLeft); @@ -190,7 +190,7 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd, break; case kChooseAuditDirCmd: - myBrowser->show("Select ROM directory to audit:", myRomPath->getText(), + myBrowser->show("Select ROM directory to audit", myRomPath->getText(), BrowserDialog::Directories, kAuditDirChosenCmd); break; diff --git a/src/gui/SnapshotDialog.cxx b/src/gui/SnapshotDialog.cxx index e5bd0edbb..b3c3785ed 100644 --- a/src/gui/SnapshotDialog.cxx +++ b/src/gui/SnapshotDialog.cxx @@ -35,7 +35,7 @@ SnapshotDialog::SnapshotDialog( { const int lineHeight = font.getLineHeight(), fontWidth = font.getMaxCharWidth(), - buttonWidth = font.getStringWidth("Save path:") + 20, + buttonWidth = font.getStringWidth("Save path") + 20, buttonHeight = font.getLineHeight() + 4; const int vBorder = 10; int xpos, ypos, lwidth, fwidth; @@ -50,7 +50,7 @@ SnapshotDialog::SnapshotDialog( // Snapshot path (save files) b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Save path:", kChooseSnapSaveDirCmd); + "Save path", kChooseSnapSaveDirCmd); wid.push_back(b); xpos += buttonWidth + 10; mySnapSavePath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -60,7 +60,7 @@ SnapshotDialog::SnapshotDialog( // Snapshot path (load files) xpos = vBorder; ypos += buttonHeight + 3; b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight, - "Load path:", kChooseSnapLoadDirCmd); + "Load path", kChooseSnapLoadDirCmd); wid.push_back(b); xpos += buttonWidth + 10; mySnapLoadPath = new EditTextWidget(this, font, xpos, ypos + 2, @@ -68,7 +68,7 @@ SnapshotDialog::SnapshotDialog( wid.push_back(mySnapLoadPath); // Snapshot naming - lwidth = font.getStringWidth("Continuous snapshot interval: "); + lwidth = font.getStringWidth("Continuous snapshot interval "); fwidth = font.getStringWidth("internal database"); VariantList items; VarList::push_back(items, "actual ROM name", "rom"); @@ -76,7 +76,7 @@ SnapshotDialog::SnapshotDialog( xpos = vBorder+10; ypos += buttonHeight + 8; mySnapName = new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items, - "Save snapshots according to: ", lwidth); + "Save snapshots according to ", lwidth); wid.push_back(mySnapName); // Snapshot interval (continuous mode) @@ -94,7 +94,7 @@ SnapshotDialog::SnapshotDialog( ypos += buttonHeight; mySnapInterval = new PopUpWidget(this, font, xpos, ypos, fwidth, lineHeight, items, - "Continuous snapshot interval: ", lwidth); + "Continuous snapshot interval ", lwidth); wid.push_back(mySnapInterval); // Booleans for saving snapshots @@ -184,7 +184,7 @@ void SnapshotDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select snapshot save directory:", mySnapSavePath->getText(), + myBrowser->show("Select snapshot save directory", mySnapSavePath->getText(), BrowserDialog::Directories, kSnapSaveDirChosenCmd); break; @@ -192,7 +192,7 @@ void SnapshotDialog::handleCommand(CommandSender* sender, int cmd, // This dialog is resizable under certain conditions, so we need // to re-create it as necessary createBrowser(); - myBrowser->show("Select snapshot load directory:", mySnapLoadPath->getText(), + myBrowser->show("Select snapshot load directory", mySnapLoadPath->getText(), BrowserDialog::Directories, kSnapLoadDirChosenCmd); break; diff --git a/src/gui/UIDialog.cxx b/src/gui/UIDialog.cxx index 5e33189b8..b192f75d6 100644 --- a/src/gui/UIDialog.cxx +++ b/src/gui/UIDialog.cxx @@ -64,11 +64,11 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, ////////////////////////////////////////////////////////// // 1) Launcher options tabID = myTab->addTab(" Launcher "); - lwidth = font.getStringWidth("Exit to Launcher: "); + lwidth = font.getStringWidth("Exit to Launcher "); // Launcher width and height myLauncherWidthSlider = new SliderWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, "Launcher Width: ", + lineHeight, "Launcher Width ", lwidth, kLWidthChanged); myLauncherWidthSlider->setMinValue(FrameBuffer::kFBMinW); myLauncherWidthSlider->setMaxValue(ds.w); @@ -82,7 +82,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, ypos += lineHeight + 4; myLauncherHeightSlider = new SliderWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, "Launcher Height: ", + lineHeight, "Launcher Height ", lwidth, kLHeightChanged); myLauncherHeightSlider->setMinValue(FrameBuffer::kFBMinH); myLauncherHeightSlider->setMaxValue(ds.h); @@ -103,7 +103,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Large", "large"); myLauncherFontPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, - "Launcher Font: ", lwidth); + "Launcher Font ", lwidth); wid.push_back(myLauncherFontPopup); ypos += lineHeight + 4; @@ -114,7 +114,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "2x (1000x760)", "2"); myRomViewerPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, - "ROM Info viewer: ", lwidth); + "ROM Info viewer ", lwidth); wid.push_back(myRomViewerPopup); ypos += lineHeight + 4; @@ -125,7 +125,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Always", "1"); myLauncherExitPopup = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, - "Exit to Launcher: ", lwidth); + "Exit to Launcher ", lwidth); wid.push_back(myLauncherExitPopup); ypos += lineHeight + 4; @@ -144,12 +144,12 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, wid.clear(); tabID = myTab->addTab(" Debugger "); #ifdef DEBUGGER_SUPPORT - lwidth = font.getStringWidth("Debugger Height: "); + lwidth = font.getStringWidth("Debugger Height "); xpos = ypos = vBorder; // Debugger width and height myDebuggerWidthSlider = new SliderWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, "Debugger Width: ", + lineHeight, "Debugger Width ", lwidth, kDWidthChanged); myDebuggerWidthSlider->setMinValue(DebuggerDialog::kSmallFontMinW); myDebuggerWidthSlider->setMaxValue(ds.w); @@ -163,7 +163,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, ypos += lineHeight + 4; myDebuggerHeightSlider = new SliderWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, "Debugger Height: ", + lineHeight, "Debugger Height ", lwidth, kDHeightChanged); myDebuggerHeightSlider->setMinValue(DebuggerDialog::kSmallFontMinH); myDebuggerHeightSlider->setMaxValue(ds.h); @@ -192,7 +192,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, ypos += b->getHeight() + 12; // Font style (bold label vs. text, etc) - lwidth = font.getStringWidth("Font Style: "); + lwidth = font.getStringWidth("Font Style "); pwidth = font.getStringWidth("Bold non-labels only"); xpos = vBorder; items.clear(); @@ -202,7 +202,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "All Bold font", "3"); myDebuggerFontStyle = new PopUpWidget(myTab, font, xpos, ypos+1, pwidth, lineHeight, items, - "Font Style: ", lwidth); + "Font Style ", lwidth); wid.push_back(myDebuggerFontStyle); // Debugger is only realistically available in windowed modes 800x600 or greater @@ -232,7 +232,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, // 3) Misc. options wid.clear(); tabID = myTab->addTab(" Misc. "); - lwidth = font.getStringWidth("Interface Palette (*): "); + lwidth = font.getStringWidth("Interface Palette (*) "); pwidth = font.getStringWidth("Standard"); xpos = ypos = vBorder; @@ -242,7 +242,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Standard", "standard"); VarList::push_back(items, "Classic", "classic"); myPalettePopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "Interface Palette (*): ", lwidth); + items, "Interface Palette (*) ", lwidth); wid.push_back(myPalettePopup); ypos += lineHeight + 4; @@ -258,7 +258,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "900 ms", "900"); VarList::push_back(items, "1 second", "1000"); myListDelayPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "List quick delay (*): ", lwidth); + items, "List quick delay (*) ", lwidth); wid.push_back(myListDelayPopup); ypos += lineHeight + 4; @@ -275,7 +275,7 @@ UIDialog::UIDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "9 lines", "9"); VarList::push_back(items, "10 lines", "10"); myWheelLinesPopup = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "Mouse wheel scroll: ", lwidth); + items, "Mouse wheel scroll ", lwidth); wid.push_back(myWheelLinesPopup); ypos += lineHeight + 4; diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 7ec4d8e7c..e33ce0cf2 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -45,7 +45,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, buttonWidth = font.getStringWidth("Defaults") + 20, buttonHeight = font.getLineHeight() + 4; int xpos, ypos, tabID; - int lwidth = font.getStringWidth("NTSC Aspect: "), + int lwidth = font.getStringWidth("NTSC Aspect "), pwidth = font.getStringWidth("XXXXxXXXX"); WidgetArray wid; VariantList items; @@ -66,13 +66,13 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // Video renderer myRenderer = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, instance().frameBuffer().supportedRenderers(), - "Renderer: ", lwidth); + "Renderer ", lwidth); wid.push_back(myRenderer); ypos += lineHeight + 4; // TIA filters (will be dynamically filled later) myTIAZoom = new PopUpWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, items, "TIA Zoom: ", lwidth); + lineHeight, items, "TIA Zoom ", lwidth); wid.push_back(myTIAZoom); ypos += lineHeight + 4; @@ -82,7 +82,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Z26", "z26"); VarList::push_back(items, "User", "user"); myTIAPalette = new PopUpWidget(myTab, font, xpos, ypos, pwidth, - lineHeight, items, "TIA Palette: ", lwidth); + lineHeight, items, "TIA Palette ", lwidth); wid.push_back(myTIAPalette); ypos += lineHeight + 4; @@ -91,7 +91,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Linear", "linear"); VarList::push_back(items, "Nearest", "nearest"); myTIAInterpolate = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "TIA Inter: ", lwidth); + items, "TIA Inter ", lwidth); wid.push_back(myTIAInterpolate); ypos += lineHeight + 4; @@ -100,14 +100,14 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "Sleep", "sleep"); VarList::push_back(items, "Busy-wait", "busy"); myFrameTiming = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "Timing (*): ", lwidth); + items, "Timing (*) ", lwidth); wid.push_back(myFrameTiming); ypos += lineHeight + 4; // Aspect ratio (NTSC mode) myNAspectRatio = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "NTSC Aspect: ", lwidth, kNAspectRatioChanged); + "NTSC Aspect ", lwidth, kNAspectRatioChanged); myNAspectRatio->setMinValue(80); myNAspectRatio->setMaxValue(120); wid.push_back(myNAspectRatio); myNAspectRatioLabel = @@ -119,7 +119,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // Aspect ratio (PAL mode) myPAspectRatio = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "PAL Aspect: ", lwidth, kPAspectRatioChanged); + "PAL Aspect ", lwidth, kPAspectRatioChanged); myPAspectRatio->setMinValue(80); myPAspectRatio->setMaxValue(120); wid.push_back(myPAspectRatio); myPAspectRatioLabel = @@ -131,7 +131,7 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, // Framerate myFrameRate = new SliderWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - "Framerate: ", lwidth, kFrameRateChanged); + "Framerate ", lwidth, kFrameRateChanged); myFrameRate->setMinValue(0); myFrameRate->setMaxValue(300); myFrameRate->setStepValue(10); wid.push_back(myFrameRate); @@ -205,18 +205,18 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, VarList::push_back(items, "RGB", NTSCFilter::PRESET_RGB); VarList::push_back(items, "Bad adjust", NTSCFilter::PRESET_BAD); VarList::push_back(items, "Custom", NTSCFilter::PRESET_CUSTOM); - lwidth = font.getStringWidth("TV Mode: "); + lwidth = font.getStringWidth("TV Mode "); pwidth = font.getStringWidth("Bad adjust"), myTVMode = new PopUpWidget(myTab, font, xpos, ypos, pwidth, lineHeight, - items, "TV Mode: ", lwidth, kTVModeChanged); + items, "TV Mode ", lwidth, kTVModeChanged); wid.push_back(myTVMode); ypos += lineHeight + 4; // Custom adjustables (using macro voodoo) xpos += 8; ypos += 4; pwidth = lwidth; - lwidth = font.getStringWidth("Saturation: "); + lwidth = font.getStringWidth("Saturation "); #define CREATE_CUSTOM_SLIDERS(obj, desc) \ myTV ## obj = \ @@ -230,16 +230,16 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, myTV ## obj->setFlags(WIDGET_CLEARBG); \ ypos += lineHeight + 4 - CREATE_CUSTOM_SLIDERS(Contrast, "Contrast: "); - CREATE_CUSTOM_SLIDERS(Bright, "Brightness: "); - CREATE_CUSTOM_SLIDERS(Hue, "Hue: "); - CREATE_CUSTOM_SLIDERS(Satur, "Saturation: "); - CREATE_CUSTOM_SLIDERS(Gamma, "Gamma: "); - CREATE_CUSTOM_SLIDERS(Sharp, "Sharpness: "); - CREATE_CUSTOM_SLIDERS(Res, "Resolution: "); - CREATE_CUSTOM_SLIDERS(Artifacts, "Artifacts: "); - CREATE_CUSTOM_SLIDERS(Fringe, "Fringing: "); - CREATE_CUSTOM_SLIDERS(Bleed, "Bleeding: "); + CREATE_CUSTOM_SLIDERS(Contrast, "Contrast "); + CREATE_CUSTOM_SLIDERS(Bright, "Brightness "); + CREATE_CUSTOM_SLIDERS(Hue, "Hue "); + CREATE_CUSTOM_SLIDERS(Satur, "Saturation "); + CREATE_CUSTOM_SLIDERS(Gamma, "Gamma "); + CREATE_CUSTOM_SLIDERS(Sharp, "Sharpness "); + CREATE_CUSTOM_SLIDERS(Res, "Resolution "); + CREATE_CUSTOM_SLIDERS(Artifacts, "Artifacts "); + CREATE_CUSTOM_SLIDERS(Fringe, "Fringing "); + CREATE_CUSTOM_SLIDERS(Bleed, "Bleeding "); xpos += myTVContrast->getWidth() + myTVContrastLabel->getWidth() + 20; ypos = 8; @@ -249,20 +249,20 @@ VideoDialog::VideoDialog(OSystem& osystem, DialogContainer& parent, "Jitter/Roll effect", kTVJitterChanged); wid.push_back(myTVJitter); ypos += lineHeight; - lwidth = font.getStringWidth("Intensity: "); + lwidth = font.getStringWidth("Intensity "); pwidth = font.getMaxCharWidth() * 6; - CREATE_CUSTOM_SLIDERS(JitterRec, "Recovery: "); + CREATE_CUSTOM_SLIDERS(JitterRec, "Recovery "); myTVJitterRec->setMinValue(1); myTVJitterRec->setMaxValue(20); ypos += 4; // Scanline intensity and interpolation myTVScanLabel = - new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings:"), - fontHeight, "Scanline settings:", kTextAlignLeft); + new StaticTextWidget(myTab, font, xpos, ypos, font.getStringWidth("Scanline settings"), + fontHeight, "Scanline settings", kTextAlignLeft); ypos += lineHeight; xpos += 20; - CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity: "); + CREATE_CUSTOM_SLIDERS(ScanIntense, "Intensity "); myTVScanInterpolate = new CheckboxWidget(myTab, font, xpos, ypos, "Interpolation"); @@ -319,7 +319,7 @@ void VideoDialog::loadConfig() // the desktop and which renderer we're using const VariantList& items = instance().frameBuffer().supportedTIAZoomLevels(); myTIAZoom->addItems(items); - myTIAZoom->setSelected(instance().settings().getString("tia.zoom"), "2"); + myTIAZoom->setSelected(instance().settings().getString("tia.zoom"), "3"); // TIA Palette myTIAPalette->setSelected( @@ -491,8 +491,8 @@ void VideoDialog::setDefaults() { case 0: // General { - myRenderer->setSelected("soft", ""); - myTIAZoom->setSelected("2", ""); + myRenderer->setSelectedIndex(0); + myTIAZoom->setSelected("3", ""); myTIAPalette->setSelected("standard", ""); myFrameTiming->setSelected("sleep", ""); myTIAInterpolate->setSelected("nearest", ""); From 670c72a1ed863adc4fba92a853a72b9492d94ecf Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 6 May 2017 21:23:15 -0230 Subject: [PATCH 4/6] Fixed bug in 'ROM Audit' mode; sometimes ROMs without properties would be erroneously renamed. Also improved ROM Audit dialog a little. Updated changelog. --- Changes.txt | 14 +++++++++- src/gui/RomAuditDialog.cxx | 54 ++++++++++++++++++++------------------ src/gui/RomAuditDialog.hxx | 4 +-- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/Changes.txt b/Changes.txt index 6ea310e49..13477b55c 100644 --- a/Changes.txt +++ b/Changes.txt @@ -46,6 +46,9 @@ addresses; previously they only worked for write addresses - The previous trap'm' commands are now renamed 'trap', 'trapread' and 'trapwrite' + - The TIA tab now shows 'old' contents of player and ball registers + - Various UI items are crossed out when disabled, to more clearly + indicate their current state - Command completion now works with internal functions and pseudo-ops (basically, anything starting with the '_' character) - In general, input error checking is much more strictly enforced @@ -71,6 +74,12 @@ this bug has only ever occurred in Windows XP, but it's been there since Stella 4.1. + * Fixed bug in 'Rom Audit' functionality; sometimes ROMs without a + valid properties entry were being renamed as "Untitled.bin". + + * For the entire UI, removed colons and generally made the UI items + easier to read. + * When in 'ROM launcher mode', Stella now uses slightly less CPU time. * Added ROM properties for D.K. VCS homebrew ROM, thanks to Andreas @@ -112,8 +121,11 @@ both libraries are now compiled into the app whenever one is selected. This fixes issues with a newer ZLIB not working with an older PNG, etc. + * Updated build scripts for Visual Studio 2017 (Windows) and MacOS + Sierra (latest version of Xcode). + * Updated UNIX configure script to work with the clang 5+ and gcc 7+ - compiler versions. + compiler versions, and fixed compile issues on aarch64 architectures. -Have fun! diff --git a/src/gui/RomAuditDialog.cxx b/src/gui/RomAuditDialog.cxx index 521a77453..9f10aca4a 100644 --- a/src/gui/RomAuditDialog.cxx +++ b/src/gui/RomAuditDialog.cxx @@ -46,7 +46,7 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, fontHeight = font.getFontHeight(), buttonWidth = font.getStringWidth("Audit path") + 20, buttonHeight = font.getLineHeight() + 4, - lwidth = font.getStringWidth("ROMs without properties (skipped): "); + lwidth = font.getStringWidth("ROMs without properties (skipped) "); int xpos = vBorder, ypos = vBorder; WidgetArray wid; @@ -68,17 +68,15 @@ RomAuditDialog::RomAuditDialog(OSystem& osystem, DialogContainer& parent, xpos = vBorder + 10; ypos += buttonHeight + 10; new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, "ROMs with properties (renamed) ", kTextAlignLeft); - myResults1 = new StaticTextWidget(this, font, xpos + lwidth, ypos, - _w - lwidth - 20, fontHeight, "", - kTextAlignLeft); - myResults1->setFlags(WIDGET_CLEARBG); + myResults1 = new EditTextWidget(this, font, xpos + lwidth, ypos - 2, + _w - xpos - lwidth - 10, lineHeight, ""); + myResults1->setEditable(false, true); ypos += buttonHeight; new StaticTextWidget(this, font, xpos, ypos, lwidth, fontHeight, "ROMs without properties (skipped) ", kTextAlignLeft); - myResults2 = new StaticTextWidget(this, font, xpos + lwidth, ypos, - _w - lwidth - 20, fontHeight, "", - kTextAlignLeft); - myResults2->setFlags(WIDGET_CLEARBG); + myResults2 = new EditTextWidget(this, font, xpos + lwidth, ypos - 2, + _w - xpos - lwidth - 10, lineHeight, ""); + myResults2->setEditable(false, true); ypos += buttonHeight + 8; new StaticTextWidget(this, font, xpos, ypos, _w - 20, fontHeight, @@ -102,16 +100,16 @@ void RomAuditDialog::loadConfig() instance().settings().getString("romdir") : currentdir; myRomPath->setText(path); - myResults1->setLabel(""); - myResults2->setLabel(""); + myResults1->setText(""); + myResults2->setText(""); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void RomAuditDialog::auditRoms() { const string& auditPath = myRomPath->getText(); - myResults1->setLabel(""); - myResults2->setLabel(""); + myResults1->setText(""); + myResults2->setText(""); FilesystemNode node(auditPath); FSList files; @@ -129,6 +127,7 @@ void RomAuditDialog::auditRoms() int renamed = 0, notfound = 0; for(uInt32 idx = 0; idx < files.size(); idx++) { + bool renameSucceeded = false; string extension; if(files[idx].isFile() && LauncherFilterDialog::isValidRomName(files[idx], extension)) @@ -136,19 +135,22 @@ void RomAuditDialog::auditRoms() // Calculate the MD5 so we can get the rest of the info // from the PropertiesSet (stella.pro) const string& md5 = MD5::hash(files[idx]); - instance().propSet().getMD5(md5, props); - const string& name = props.get(Cartridge_Name); - - // Only rename the file if we found a valid properties entry - if(name != "" && name != files[idx].getName()) + if(instance().propSet().getMD5(md5, props)) { - const string& newfile = node.getPath() + name + "." + extension; + const string& name = props.get(Cartridge_Name); - if(files[idx].getPath() != newfile && files[idx].rename(newfile)) - renamed++; + // Only rename the file if we found a valid properties entry + if(name != "" && name != files[idx].getName()) + { + const string& newfile = node.getPath() + name + "." + extension; + if(files[idx].getPath() != newfile && files[idx].rename(newfile)) + renameSucceeded = true; + } } + if(renameSucceeded) + ++renamed; else - notfound++; + ++notfound; } // Update the progress bar, indicating one more ROM has been processed @@ -156,8 +158,8 @@ void RomAuditDialog::auditRoms() } progress.close(); - myResults1->setValue(renamed); - myResults2->setValue(notfound); + myResults1->setText(Variant(renamed).toString()); + myResults2->setText(Variant(notfound).toString()); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -198,8 +200,8 @@ void RomAuditDialog::handleCommand(CommandSender* sender, int cmd, { FilesystemNode dir(myBrowser->getResult()); myRomPath->setText(dir.getShortPath()); - myResults1->setLabel(""); - myResults2->setLabel(""); + myResults1->setText(""); + myResults2->setText(""); break; } diff --git a/src/gui/RomAuditDialog.hxx b/src/gui/RomAuditDialog.hxx index bbb4e98e0..757f30856 100644 --- a/src/gui/RomAuditDialog.hxx +++ b/src/gui/RomAuditDialog.hxx @@ -58,8 +58,8 @@ class RomAuditDialog : public Dialog EditTextWidget* myRomPath; // Show the results of the ROM audit - StaticTextWidget* myResults1; - StaticTextWidget* myResults2; + EditTextWidget* myResults1; + EditTextWidget* myResults2; // Show a message about the dangers of using this function unique_ptr myConfirmMsg; From ba3e5a36a01813fa277c403a6ff82fe9ef2b6cf9 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 6 May 2017 22:55:04 -0230 Subject: [PATCH 5/6] Updated changelog; fixes were included for both AArch64 and ppc64le. --- Changes.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changes.txt b/Changes.txt index 13477b55c..2ecf15ba6 100644 --- a/Changes.txt +++ b/Changes.txt @@ -125,7 +125,8 @@ Sierra (latest version of Xcode). * Updated UNIX configure script to work with the clang 5+ and gcc 7+ - compiler versions, and fixed compile issues on aarch64 architectures. + compiler versions, and fixed compile issues on AArch64 and ppc64le + architectures. -Have fun! From 0cb9b89d7d4c31466ae2dade66bb195ee9cd45fe Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 7 May 2017 00:04:09 -0230 Subject: [PATCH 6/6] Fixed minor compile warnings in Visual Studio. --- src/debugger/gui/PaddleWidget.cxx | 20 ++++++++++---------- src/debugger/gui/RiotWidget.cxx | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/debugger/gui/PaddleWidget.cxx b/src/debugger/gui/PaddleWidget.cxx index 301f183cd..e83abaccd 100644 --- a/src/debugger/gui/PaddleWidget.cxx +++ b/src/debugger/gui/PaddleWidget.cxx @@ -44,8 +44,8 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p0string, lwidth, kP0Changed); myP0Resistance->setMinValue(0); - myP0Resistance->setMaxValue(Paddles::MAX_RESISTANCE); - myP0Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); + myP0Resistance->setMaxValue(uInt32(Paddles::MAX_RESISTANCE)); + myP0Resistance->setStepValue(uInt32(Paddles::MAX_RESISTANCE/100)); myP0Resistance->setTarget(this); xpos += 20; ypos += myP0Resistance->getHeight() + 4; @@ -58,8 +58,8 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, new SliderWidget(boss, font, xpos, ypos, 10*fontWidth, lineHeight, p1string, lwidth, kP1Changed); myP1Resistance->setMinValue(0); - myP1Resistance->setMaxValue(Paddles::MAX_RESISTANCE); - myP1Resistance->setStepValue(Paddles::MAX_RESISTANCE/100); + myP1Resistance->setMaxValue(uInt32(Paddles::MAX_RESISTANCE)); + myP1Resistance->setStepValue(uInt32(Paddles::MAX_RESISTANCE/100)); myP1Resistance->setTarget(this); xpos += 20; ypos += myP1Resistance->getHeight() + 4; @@ -71,10 +71,10 @@ PaddleWidget::PaddleWidget(GuiObject* boss, const GUI::Font& font, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void PaddleWidget::loadConfig() { - myP0Resistance->setValue(Paddles::MAX_RESISTANCE - - Int32(myController.read(Controller::Nine))); - myP1Resistance->setValue(Paddles::MAX_RESISTANCE - - Int32(myController.read(Controller::Five))); + myP0Resistance->setValue(Int32(Paddles::MAX_RESISTANCE - + myController.read(Controller::Nine))); + myP1Resistance->setValue(Int32(Paddles::MAX_RESISTANCE - + myController.read(Controller::Five))); myP0Fire->setState(!myController.read(Controller::Four)); myP1Fire->setState(!myController.read(Controller::Three)); } @@ -87,11 +87,11 @@ void PaddleWidget::handleCommand( { case kP0Changed: myController.set(Controller::Nine, - Paddles::MAX_RESISTANCE - myP0Resistance->getValue()); + Int32(Paddles::MAX_RESISTANCE - myP0Resistance->getValue())); break; case kP1Changed: myController.set(Controller::Five, - Paddles::MAX_RESISTANCE - myP1Resistance->getValue()); + Int32(Paddles::MAX_RESISTANCE - myP1Resistance->getValue())); break; case kP0Fire: myController.set(Controller::Four, !myP0Fire->getState()); diff --git a/src/debugger/gui/RiotWidget.cxx b/src/debugger/gui/RiotWidget.cxx index d35e6fbfa..5adb3ab17 100644 --- a/src/debugger/gui/RiotWidget.cxx +++ b/src/debugger/gui/RiotWidget.cxx @@ -464,6 +464,8 @@ ControllerWidget* RiotWidget::addControlWidget(GuiObject* boss, const GUI::Font& return new SaveKeyWidget(boss, font, x, y, controller); case Controller::TrakBall: // TODO - implement this return new NullControlWidget(boss, font, x, y, controller); + default: + return nullptr; // make compiler happy } }