In the debugger TIA output, set inactive pixels in GRPx and PFx to

COLUBK instead of always using colour 0 (black).  This is more
informative, as it displays how the registers actually work when
being drawn to the screen.  Thanks to Tjoppen of AtariAge for this.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2796 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-08-16 12:25:42 +00:00
parent 60dd213a0a
commit 8ea92e67ef
4 changed files with 15 additions and 3 deletions

View File

@ -60,6 +60,11 @@
constants vs. symbolic addresses in the symbol file. Eventually, constants vs. symbolic addresses in the symbol file. Eventually,
further information from the lst file may be used. 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 * Renamed 'Override properties' dialog (accessible from the ROM
launcher by a right-mouse-button click) to 'Power-on options', with launcher by a right-mouse-button click) to 'Power-on options', with
the following new options: the following new options:

View File

@ -856,6 +856,7 @@ void TiaWidget::loadConfig()
//////////////////////////// ////////////////////////////
// grP0 // grP0
myGRP0->setColor(state.coluRegs[0]); myGRP0->setColor(state.coluRegs[0]);
myGRP0->setBackgroundColor(state.coluRegs[3]);
myGRP0->setIntState(state.gr[P0], false); myGRP0->setIntState(state.gr[P0], false);
// posP0 // posP0
@ -878,6 +879,7 @@ void TiaWidget::loadConfig()
//////////////////////////// ////////////////////////////
// grP1 // grP1
myGRP1->setColor(state.coluRegs[1]); myGRP1->setColor(state.coluRegs[1]);
myGRP1->setBackgroundColor(state.coluRegs[3]);
myGRP1->setIntState(state.gr[P1], false); myGRP1->setIntState(state.gr[P1], false);
// posP1 // posP1
@ -954,14 +956,17 @@ void TiaWidget::loadConfig()
//////////////////////////// ////////////////////////////
// PF0 // PF0
myPF[0]->setColor(state.coluRegs[2]); myPF[0]->setColor(state.coluRegs[2]);
myPF[0]->setBackgroundColor(state.coluRegs[3]);
myPF[0]->setIntState(state.pf[0], true); // reverse bit order myPF[0]->setIntState(state.pf[0], true); // reverse bit order
// PF1 // PF1
myPF[1]->setColor(state.coluRegs[2]); myPF[1]->setColor(state.coluRegs[2]);
myPF[1]->setBackgroundColor(state.coluRegs[3]);
myPF[1]->setIntState(state.pf[1], false); myPF[1]->setIntState(state.pf[1], false);
// PF2 // PF2
myPF[2]->setColor(state.coluRegs[2]); myPF[2]->setColor(state.coluRegs[2]);
myPF[2]->setBackgroundColor(state.coluRegs[3]);
myPF[2]->setIntState(state.pf[2], true); // reverse bit order myPF[2]->setIntState(state.pf[2], true); // reverse bit order
// Reflect // Reflect

View File

@ -28,7 +28,8 @@
TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font, TogglePixelWidget::TogglePixelWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int cols, int rows) int x, int y, int cols, int rows)
: ToggleWidget(boss, font, x, y, cols, rows), : ToggleWidget(boss, font, x, y, cols, rows),
_pixelColor(0) _pixelColor(0),
_backgroundColor(kBGColor)
{ {
_rowHeight = _colWidth = font.getLineHeight(); _rowHeight = _colWidth = font.getLineHeight();
@ -136,7 +137,7 @@ void TogglePixelWidget::drawWidget(bool hilite)
// Either draw the pixel in given color, or erase (show background) // Either draw the pixel in given color, or erase (show background)
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
_stateList[pos] ? _pixelColor : kBGColor); _stateList[pos] ? _pixelColor : _backgroundColor);
} }
} }
} }

View File

@ -31,6 +31,7 @@ class TogglePixelWidget : public ToggleWidget
virtual ~TogglePixelWidget(); virtual ~TogglePixelWidget();
void setColor(int color) { _pixelColor = color; } void setColor(int color) { _pixelColor = color; }
void setBackgroundColor(int color) { _backgroundColor = color; }
void setState(const BoolArray& state); void setState(const BoolArray& state);
void setIntState(int value, bool swap); void setIntState(int value, bool swap);
@ -40,7 +41,7 @@ class TogglePixelWidget : public ToggleWidget
void drawWidget(bool hilite); void drawWidget(bool hilite);
private: private:
int _pixelColor; int _pixelColor, _backgroundColor;
bool _swapBits; bool _swapBits;
}; };