diff --git a/Changes.txt b/Changes.txt index 943d597db..386417fdb 100644 --- a/Changes.txt +++ b/Changes.txt @@ -60,6 +60,11 @@ constants vs. symbolic addresses in the symbol file. Eventually, further information from the lst file may be used. + - The various graphics registers in the TIA output (GRPx and PFx) + now have their background pixels (ie, pixels not actively being + drawn) set to COLUBK instead of always being black. Thanks to + Tjoppen of AtariAge for this idea and the actual code. + * Renamed 'Override properties' dialog (accessible from the ROM launcher by a right-mouse-button click) to 'Power-on options', with the following new options: diff --git a/src/debugger/gui/TiaWidget.cxx b/src/debugger/gui/TiaWidget.cxx index e23cd3e40..7a0935d1f 100644 --- a/src/debugger/gui/TiaWidget.cxx +++ b/src/debugger/gui/TiaWidget.cxx @@ -856,6 +856,7 @@ void TiaWidget::loadConfig() //////////////////////////// // grP0 myGRP0->setColor(state.coluRegs[0]); + myGRP0->setBackgroundColor(state.coluRegs[3]); myGRP0->setIntState(state.gr[P0], false); // posP0 @@ -878,6 +879,7 @@ void TiaWidget::loadConfig() //////////////////////////// // grP1 myGRP1->setColor(state.coluRegs[1]); + myGRP1->setBackgroundColor(state.coluRegs[3]); myGRP1->setIntState(state.gr[P1], false); // posP1 @@ -954,14 +956,17 @@ void TiaWidget::loadConfig() //////////////////////////// // PF0 myPF[0]->setColor(state.coluRegs[2]); + myPF[0]->setBackgroundColor(state.coluRegs[3]); myPF[0]->setIntState(state.pf[0], true); // reverse bit order // PF1 myPF[1]->setColor(state.coluRegs[2]); + myPF[1]->setBackgroundColor(state.coluRegs[3]); myPF[1]->setIntState(state.pf[1], false); // PF2 myPF[2]->setColor(state.coluRegs[2]); + myPF[2]->setBackgroundColor(state.coluRegs[3]); myPF[2]->setIntState(state.pf[2], true); // reverse bit order // Reflect diff --git a/src/debugger/gui/TogglePixelWidget.cxx b/src/debugger/gui/TogglePixelWidget.cxx index abab9c4b7..ba868a8db 100644 --- a/src/debugger/gui/TogglePixelWidget.cxx +++ b/src/debugger/gui/TogglePixelWidget.cxx @@ -28,7 +28,8 @@ TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font, int x, int y, int cols, int rows) : ToggleWidget(boss, font, x, y, cols, rows), - _pixelColor(0) + _pixelColor(0), + _backgroundColor(kBGColor) { _rowHeight = _colWidth = font.getLineHeight(); @@ -136,7 +137,7 @@ void TogglePixelWidget::drawWidget(bool hilite) // Either draw the pixel in given color, or erase (show background) s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, - _stateList[pos] ? _pixelColor : kBGColor); + _stateList[pos] ? _pixelColor : _backgroundColor); } } } diff --git a/src/debugger/gui/TogglePixelWidget.hxx b/src/debugger/gui/TogglePixelWidget.hxx index 6c8f3b23a..960af92cb 100644 --- a/src/debugger/gui/TogglePixelWidget.hxx +++ b/src/debugger/gui/TogglePixelWidget.hxx @@ -31,6 +31,7 @@ class TogglePixelWidget : public ToggleWidget virtual ~TogglePixelWidget(); void setColor(int color) { _pixelColor = color; } + void setBackgroundColor(int color) { _backgroundColor = color; } void setState(const BoolArray& state); void setIntState(int value, bool swap); @@ -40,7 +41,7 @@ class TogglePixelWidget : public ToggleWidget void drawWidget(bool hilite); private: - int _pixelColor; + int _pixelColor, _backgroundColor; bool _swapBits; };