mirror of https://github.com/stella-emu/stella.git
completed change tracking on RIOT tab (except for controllers).
This commit is contained in:
parent
d3575f3290
commit
90733875b2
|
@ -54,6 +54,9 @@ const DebuggerState& RiotDebug::getState()
|
|||
myState.INPT4 = inpt(4);
|
||||
myState.INPT5 = inpt(5);
|
||||
|
||||
myState.INPTLatch = vblank(6);
|
||||
myState.INPTDump = vblank(7);
|
||||
|
||||
// Timer registers
|
||||
myState.TIM1T = tim1T();
|
||||
myState.TIM8T = tim8T();
|
||||
|
@ -92,6 +95,9 @@ void RiotDebug::saveOldState()
|
|||
myOldState.INPT4 = inpt(4);
|
||||
myOldState.INPT5 = inpt(5);
|
||||
|
||||
myOldState.INPTLatch = vblank(6);
|
||||
myOldState.INPTDump = vblank(7);
|
||||
|
||||
// Timer registers
|
||||
myOldState.TIM1T = tim1T();
|
||||
myOldState.TIM8T = tim8T();
|
||||
|
|
|
@ -40,6 +40,7 @@ class RiotState : public DebuggerState
|
|||
|
||||
// These are actually from the TIA, but are I/O related
|
||||
uInt8 INPT0, INPT1, INPT2, INPT3, INPT4, INPT5;
|
||||
bool INPTLatch, INPTDump;
|
||||
};
|
||||
|
||||
class RiotDebug : public DebuggerSystem
|
||||
|
|
|
@ -288,8 +288,8 @@ void RiotWidget::loadConfig()
|
|||
myRightINPT->setList(alist, vlist, changed);
|
||||
|
||||
// Update TIA VBLANK bits
|
||||
myINPTLatch->setState(riot.vblank(6));
|
||||
myINPTDump->setState(riot.vblank(7));
|
||||
myINPTLatch->setState(riot.vblank(6), state.INPTLatch != oldstate.INPTLatch);
|
||||
myINPTDump->setState(riot.vblank(7), state.INPTDump != oldstate.INPTDump);
|
||||
|
||||
// Update timer write registers
|
||||
alist.clear(); vlist.clear(); changed.clear();
|
||||
|
@ -317,16 +317,17 @@ void RiotWidget::loadConfig()
|
|||
|
||||
// Console switches (inverted, since 'selected' in the UI
|
||||
// means 'grounded' in the system)
|
||||
myP0Diff->setSelectedIndex(riot.diffP0());
|
||||
myP1Diff->setSelectedIndex(riot.diffP1());
|
||||
myP0Diff->setSelectedIndex(riot.diffP0(), state.swchbReadBits[1] != oldstate.swchbReadBits[1]);
|
||||
myP1Diff->setSelectedIndex(riot.diffP1(), state.swchbReadBits[0] != oldstate.swchbReadBits[0]);
|
||||
|
||||
bool devSettings = instance().settings().getBool("dev.settings");
|
||||
myConsole->setText(instance().settings().getString(devSettings ? "dev.console" : "plr.console") == "7800" ? "Atari 7800" : "Atari 2600");
|
||||
myConsole->setEditable(false, true);
|
||||
|
||||
myTVType->setSelectedIndex(riot.tvType());
|
||||
mySelect->setState(!riot.select());
|
||||
myReset->setState(!riot.reset());
|
||||
myTVType->setSelectedIndex(riot.tvType(), state.swchbReadBits[4] != oldstate.swchbReadBits[4]);
|
||||
myPause->setState(!riot.tvType(), state.swchbReadBits[4] != oldstate.swchbReadBits[4]);
|
||||
mySelect->setState(!riot.select(), state.swchbReadBits[6] != oldstate.swchbReadBits[6]);
|
||||
myReset->setState(!riot.reset(), state.swchbReadBits[7] != oldstate.swchbReadBits[7]);
|
||||
|
||||
myLeftControl->loadConfig();
|
||||
myRightControl->loadConfig();
|
||||
|
|
|
@ -55,7 +55,8 @@ PopUpWidget::PopUpWidget(GuiObject* boss, const GUI::Font& font,
|
|||
: Widget(boss, font, x, y - 1, w, h + 2),
|
||||
CommandSender(boss),
|
||||
_label(label),
|
||||
_labelWidth(labelWidth)
|
||||
_labelWidth(labelWidth),
|
||||
_changed(false)
|
||||
{
|
||||
_flags = WIDGET_ENABLED | WIDGET_RETAIN_FOCUS;
|
||||
_bgcolor = kDlgColor;
|
||||
|
@ -92,8 +93,9 @@ void PopUpWidget::setSelected(const Variant& tag, const Variant& def)
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void PopUpWidget::setSelectedIndex(int idx)
|
||||
void PopUpWidget::setSelectedIndex(int idx, bool changed)
|
||||
{
|
||||
_changed = changed;
|
||||
myMenu->setSelectedIndex(idx);
|
||||
}
|
||||
|
||||
|
@ -231,7 +233,7 @@ void PopUpWidget::drawWidget(bool hilite)
|
|||
s.vLine(x + w - 1, _y, _y +_h - 1, kShadowColor);
|
||||
|
||||
// Fill the background
|
||||
s.fillRect(x + 1, _y + 1, w - 2, _h - 2, kWidColor);
|
||||
s.fillRect(x + 1, _y + 1, w - 2, _h - 2, _changed ? kDbgChangedColor : kWidColor);
|
||||
// Draw an arrow pointing down at the right end to signal this is a dropdown/popup
|
||||
s.drawBitmap(up_down_arrows, x + w - 10, _y + myArrowsY,
|
||||
!isEnabled() ? kColor : hilite ? kTextColorHi : kTextColor);
|
||||
|
|
|
@ -50,7 +50,7 @@ class PopUpWidget : public Widget, public CommandSender
|
|||
See ContextMenu.hxx for more information. */
|
||||
void setSelected(const Variant& tag,
|
||||
const Variant& def = EmptyVariant);
|
||||
void setSelectedIndex(int idx);
|
||||
void setSelectedIndex(int idx, bool changed = false);
|
||||
void setSelectedMax();
|
||||
void clearSelection();
|
||||
|
||||
|
@ -78,6 +78,7 @@ class PopUpWidget : public Widget, public CommandSender
|
|||
|
||||
string _label;
|
||||
int _labelWidth;
|
||||
bool _changed;
|
||||
|
||||
private:
|
||||
// Following constructors and assignment operators not supported
|
||||
|
|
|
@ -653,17 +653,18 @@ void CheckboxWidget::drawWidget(bool hilite)
|
|||
if(_drawBox)
|
||||
s.box(_x, _y + _boxY, 14, 14, kColor, kShadowColor);
|
||||
// Do we draw a square or cross?
|
||||
s.fillRect(_x + 2, _y + _boxY + 2, 10, 10, _changed ? kDbgChangedColor : isEnabled() ? _bgcolor : kColor);
|
||||
s.fillRect(_x + 2, _y + _boxY + 2, 10, 10, _changed ? kDbgChangedColor
|
||||
: isEnabled() ? _bgcolor : kColor);
|
||||
if(_state)
|
||||
s.drawBitmap(_img, _x + 3, _y + _boxY + 3, isEnabled() ? kCheckColor : kShadowColor);
|
||||
#else
|
||||
if(_drawBox)
|
||||
s.frameRect(_x, _y + _boxY, 14, 14, hilite ? kScrollColorHi : kShadowColor);
|
||||
// Do we draw a square or cross?
|
||||
s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? kDbgChangedColor : isEnabled() ? _bgcolor : kColor);
|
||||
s.fillRect(_x + 1, _y + _boxY + 1, 12, 12, _changed ? kDbgChangedColor
|
||||
: isEnabled() ? _bgcolor : kColor);
|
||||
if(_state)
|
||||
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled()
|
||||
? hilite ? kScrollColorHi : kCheckColor
|
||||
s.drawBitmap(_img, _x + 2, _y + _boxY + 2, isEnabled() ? hilite ? kScrollColorHi : kCheckColor
|
||||
: kShadowColor, 10);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue