mirror of https://github.com/stella-emu/stella.git
Rearranged debug colours and collision widgets in TIA tab.
This commit is contained in:
parent
f1c35ee730
commit
1d30f1ddc0
|
@ -56,23 +56,23 @@ const DebuggerState& TIADebug::getState()
|
||||||
if(myTIA.myFrameManager.layout() == FrameLayout::ntsc)
|
if(myTIA.myFrameManager.layout() == FrameLayout::ntsc)
|
||||||
{
|
{
|
||||||
myState.fixedCols.push_back(myTIA.P0ColorNTSC);
|
myState.fixedCols.push_back(myTIA.P0ColorNTSC);
|
||||||
myState.fixedCols.push_back(myTIA.M0ColorNTSC);
|
|
||||||
myState.fixedCols.push_back(myTIA.P1ColorNTSC);
|
myState.fixedCols.push_back(myTIA.P1ColorNTSC);
|
||||||
myState.fixedCols.push_back(myTIA.M1ColorNTSC);
|
|
||||||
myState.fixedCols.push_back(myTIA.BLColorNTSC);
|
|
||||||
myState.fixedCols.push_back(myTIA.PFColorNTSC);
|
myState.fixedCols.push_back(myTIA.PFColorNTSC);
|
||||||
myState.fixedCols.push_back(myTIA.BKColorNTSC);
|
myState.fixedCols.push_back(myTIA.BKColorNTSC);
|
||||||
|
myState.fixedCols.push_back(myTIA.M0ColorNTSC);
|
||||||
|
myState.fixedCols.push_back(myTIA.M1ColorNTSC);
|
||||||
|
myState.fixedCols.push_back(myTIA.BLColorNTSC);
|
||||||
myState.fixedCols.push_back(myTIA.HBLANKColor);
|
myState.fixedCols.push_back(myTIA.HBLANKColor);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
myState.fixedCols.push_back(myTIA.P0ColorPAL);
|
myState.fixedCols.push_back(myTIA.P0ColorPAL);
|
||||||
myState.fixedCols.push_back(myTIA.M0ColorPAL);
|
|
||||||
myState.fixedCols.push_back(myTIA.P1ColorPAL);
|
myState.fixedCols.push_back(myTIA.P1ColorPAL);
|
||||||
myState.fixedCols.push_back(myTIA.M1ColorPAL);
|
|
||||||
myState.fixedCols.push_back(myTIA.BLColorPAL);
|
|
||||||
myState.fixedCols.push_back(myTIA.PFColorPAL);
|
myState.fixedCols.push_back(myTIA.PFColorPAL);
|
||||||
myState.fixedCols.push_back(myTIA.BKColorPAL);
|
myState.fixedCols.push_back(myTIA.BKColorPAL);
|
||||||
|
myState.fixedCols.push_back(myTIA.M0ColorPAL);
|
||||||
|
myState.fixedCols.push_back(myTIA.M1ColorPAL);
|
||||||
|
myState.fixedCols.push_back(myTIA.BLColorPAL);
|
||||||
myState.fixedCols.push_back(myTIA.HBLANKColor);
|
myState.fixedCols.push_back(myTIA.HBLANKColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -804,8 +804,8 @@ string TIADebug::debugColors() const
|
||||||
<< " Orange " << colorSwatch(myTIA.M0ColorNTSC) << " Missile 0\n"
|
<< " Orange " << colorSwatch(myTIA.M0ColorNTSC) << " Missile 0\n"
|
||||||
<< " Yellow " << colorSwatch(myTIA.P1ColorNTSC) << " Player 1\n"
|
<< " Yellow " << colorSwatch(myTIA.P1ColorNTSC) << " Player 1\n"
|
||||||
<< " Green " << colorSwatch(myTIA.M1ColorNTSC) << " Missile 1\n"
|
<< " Green " << colorSwatch(myTIA.M1ColorNTSC) << " Missile 1\n"
|
||||||
<< " Blue " << colorSwatch(myTIA.BLColorNTSC) << " Ball\n"
|
<< " Blue " << colorSwatch(myTIA.PFColorNTSC) << " Playfield\n"
|
||||||
<< " Purple " << colorSwatch(myTIA.PFColorNTSC) << " Playfield\n"
|
<< " Purple " << colorSwatch(myTIA.BLColorNTSC) << " Ball\n"
|
||||||
<< " Grey " << colorSwatch(myTIA.BKColorNTSC) << " Background\n"
|
<< " Grey " << colorSwatch(myTIA.BKColorNTSC) << " Background\n"
|
||||||
<< " White " << colorSwatch(myTIA.HBLANKColor) << " HMOVE\n";
|
<< " White " << colorSwatch(myTIA.HBLANKColor) << " HMOVE\n";
|
||||||
}
|
}
|
||||||
|
@ -815,8 +815,8 @@ string TIADebug::debugColors() const
|
||||||
<< " Orange " << colorSwatch(myTIA.M0ColorPAL) << " Missile 0\n"
|
<< " Orange " << colorSwatch(myTIA.M0ColorPAL) << " Missile 0\n"
|
||||||
<< " Yellow " << colorSwatch(myTIA.P1ColorPAL) << " Player 1\n"
|
<< " Yellow " << colorSwatch(myTIA.P1ColorPAL) << " Player 1\n"
|
||||||
<< " Green " << colorSwatch(myTIA.M1ColorPAL) << " Missile 1\n"
|
<< " Green " << colorSwatch(myTIA.M1ColorPAL) << " Missile 1\n"
|
||||||
<< " Blue " << colorSwatch(myTIA.BLColorPAL) << " Ball\n"
|
<< " Blue " << colorSwatch(myTIA.PFColorPAL) << " Playfield\n"
|
||||||
<< " Purple " << colorSwatch(myTIA.PFColorPAL) << " Playfield\n"
|
<< " Purple " << colorSwatch(myTIA.BLColorPAL) << " Ball\n"
|
||||||
<< " Grey " << colorSwatch(myTIA.BKColorPAL) << " Background\n"
|
<< " Grey " << colorSwatch(myTIA.BKColorPAL) << " Background\n"
|
||||||
<< " White " << colorSwatch(myTIA.HBLANKColor) << " HMOVE\n";
|
<< " White " << colorSwatch(myTIA.HBLANKColor) << " HMOVE\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,4 +55,9 @@ void ColorWidget::drawWidget(bool hilite)
|
||||||
|
|
||||||
// Show the currently selected color
|
// Show the currently selected color
|
||||||
s.fillRect(_x+1, _y+1, _w-2, _h-1, _color);
|
s.fillRect(_x+1, _y+1, _w-2, _h-1, _color);
|
||||||
|
|
||||||
|
// Cross out the grid?
|
||||||
|
if(_crossGrid)
|
||||||
|
for(uInt32 row = 1; row < 4; ++row)
|
||||||
|
s.hLine(_x, _y + (row * _h/4), _x + _w - 2, kColor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,8 @@ class ColorWidget : public Widget, public CommandSender
|
||||||
void setColor(int color);
|
void setColor(int color);
|
||||||
int getColor() const { return _color; }
|
int getColor() const { return _color; }
|
||||||
|
|
||||||
|
void setCrossed(bool enable) { _crossGrid = enable; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void drawWidget(bool hilite) override;
|
void drawWidget(bool hilite) override;
|
||||||
|
|
||||||
|
@ -49,6 +51,8 @@ class ColorWidget : public Widget, public CommandSender
|
||||||
int _color;
|
int _color;
|
||||||
int _cmd;
|
int _cmd;
|
||||||
|
|
||||||
|
bool _crossGrid;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Following constructors and assignment operators not supported
|
// Following constructors and assignment operators not supported
|
||||||
ColorWidget() = delete;
|
ColorWidget() = delete;
|
||||||
|
|
|
@ -638,8 +638,8 @@ void DataGridWidget::drawWidget(bool hilite)
|
||||||
_scrollBar->recalc(); // takes care of the draw
|
_scrollBar->recalc(); // takes care of the draw
|
||||||
|
|
||||||
// Cross out the grid?
|
// Cross out the grid?
|
||||||
if (_crossGrid)
|
if(_crossGrid)
|
||||||
for (row = 0; row < 4; ++row)
|
for(row = 1; row < 4; ++row)
|
||||||
s.hLine(_x, _y + (row * lineheight/4), _x + linewidth, kColor);
|
s.hLine(_x, _y + (row * lineheight/4), _x + linewidth, kColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ TiaOutputWidget::TiaOutputWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
VarList::push_back(l, "Set breakpoint", "bp");
|
VarList::push_back(l, "Set breakpoint", "bp");
|
||||||
VarList::push_back(l, "Set zoom position", "zoom");
|
VarList::push_back(l, "Set zoom position", "zoom");
|
||||||
VarList::push_back(l, "Save snapshot", "snap");
|
VarList::push_back(l, "Save snapshot", "snap");
|
||||||
VarList::push_back(l, "Toggle fixed debug colors (from beam pos)", "fixed");
|
|
||||||
myMenu = make_ptr<ContextMenu>(this, font, l);
|
myMenu = make_ptr<ContextMenu>(this, font, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,10 +134,6 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in
|
||||||
{
|
{
|
||||||
instance().debugger().parser().run("savesnap");
|
instance().debugger().parser().run("savesnap");
|
||||||
}
|
}
|
||||||
else if(rmb == "fixed")
|
|
||||||
{
|
|
||||||
instance().console().tia().toggleFixedColors();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
fontHeight = lfont.getFontHeight(),
|
fontHeight = lfont.getFontHeight(),
|
||||||
lineHeight = lfont.getLineHeight(),
|
lineHeight = lfont.getLineHeight(),
|
||||||
buttonW = 7 * fontWidth;
|
buttonW = 7 * fontWidth;
|
||||||
int xpos = 10, ypos = 15 + lineHeight, buttonX = 0, buttonY = 0;
|
int xpos = 10, ypos = 10 + lineHeight, buttonX = 0, buttonY = 0;
|
||||||
StaticTextWidget* t = nullptr;
|
StaticTextWidget* t = nullptr;
|
||||||
ButtonWidget* b = nullptr;
|
ButtonWidget* b = nullptr;
|
||||||
|
|
||||||
|
@ -60,27 +60,56 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(myColorRegs);
|
addFocusWidget(myColorRegs);
|
||||||
|
|
||||||
xpos += myColorRegs->colWidth() + 5;
|
xpos += myColorRegs->colWidth() + 5;
|
||||||
myCOLUP0Color = new ColorWidget(boss, nfont, xpos, ypos+2, 30, lineHeight - 4);
|
myCOLUP0Color = new ColorWidget(boss, nfont, xpos, ypos+2, 1.5*lineHeight, lineHeight - 4);
|
||||||
myCOLUP0Color->setTarget(this);
|
myCOLUP0Color->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUP1Color = new ColorWidget(boss, nfont, xpos, ypos+2, 30, lineHeight - 4);
|
myCOLUP1Color = new ColorWidget(boss, nfont, xpos, ypos+2, 1.5*lineHeight, lineHeight - 4);
|
||||||
myCOLUP1Color->setTarget(this);
|
myCOLUP1Color->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUPFColor = new ColorWidget(boss, nfont, xpos, ypos+2, 30, lineHeight - 4);
|
myCOLUPFColor = new ColorWidget(boss, nfont, xpos, ypos+2, 1.5*lineHeight, lineHeight - 4);
|
||||||
myCOLUPFColor->setTarget(this);
|
myCOLUPFColor->setTarget(this);
|
||||||
|
|
||||||
ypos += lineHeight;
|
ypos += lineHeight;
|
||||||
myCOLUBKColor = new ColorWidget(boss, nfont, xpos, ypos+2, 30, lineHeight - 4);
|
myCOLUBKColor = new ColorWidget(boss, nfont, xpos, ypos+2, 1.5*lineHeight, lineHeight - 4);
|
||||||
myCOLUBKColor->setTarget(this);
|
myCOLUBKColor->setTarget(this);
|
||||||
|
|
||||||
|
// Fixed debug colors
|
||||||
|
xpos += myCOLUP0Color->getWidth() + 30; ypos = 10;
|
||||||
|
myFixedEnabled = new CheckboxWidget(boss, lfont, xpos, ypos, "Debug Colors", kDbgClCmd);
|
||||||
|
myFixedEnabled->setTarget(this);
|
||||||
|
addFocusWidget(myFixedEnabled);
|
||||||
|
|
||||||
|
const char* dbgLabels[] = { "P0", "P1", "PF", "BK", "M0", "M1", "BL", "HM" };
|
||||||
|
for(uInt32 row = 0; row <= 3; ++row)
|
||||||
|
{
|
||||||
|
ypos += lineHeight;
|
||||||
|
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
|
||||||
|
dbgLabels[row], kTextAlignLeft);
|
||||||
|
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
|
||||||
|
ypos + 2, 1.5*lineHeight, lineHeight - 4);
|
||||||
|
myFixedColors[row]->setTarget(this);
|
||||||
|
}
|
||||||
|
xpos += t->getWidth() + myFixedColors[0]->getWidth() + 24;
|
||||||
|
ypos = 10;
|
||||||
|
for(uInt32 row = 4; row <= 7; ++row)
|
||||||
|
{
|
||||||
|
ypos += lineHeight;
|
||||||
|
t = new StaticTextWidget(boss, lfont, xpos, ypos + 2, 2*fontWidth, fontHeight,
|
||||||
|
dbgLabels[row], kTextAlignLeft);
|
||||||
|
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth() + 4,
|
||||||
|
ypos + 2, 1.5*lineHeight, lineHeight - 4);
|
||||||
|
myFixedColors[row]->setTarget(this);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Collision register bits
|
// Collision register bits
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
xpos += myCOLUBKColor->getWidth() + 2*fontWidth + 30; ypos -= 4*lineHeight + 5;
|
xpos += myFixedColors[0]->getWidth() + 2*fontWidth + 60; ypos = 10;
|
||||||
|
|
||||||
// Add all 15 collision bits (with labels)
|
// Add all 15 collision bits (with labels)
|
||||||
|
uInt32 cxclrY = 0;
|
||||||
xpos -= 2*fontWidth + 5; ypos += lineHeight;
|
xpos -= 2*fontWidth + 5; ypos += lineHeight;
|
||||||
const char* rowLabel[] = { "P0", "P1", "M0", "M1", "BL" };
|
const char* rowLabel[] = { "P0", "P1", "M0", "M1", "BL" };
|
||||||
const char* colLabel[] = { "PF", "BL", "M1", "M0", "P1" };
|
const char* colLabel[] = { "PF", "BL", "M1", "M0", "P1" };
|
||||||
|
@ -99,6 +128,11 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
myCollision[idx]->setID(idx);
|
myCollision[idx]->setID(idx);
|
||||||
myCollision[idx]->setEditable(false); // TODO - enable this?
|
myCollision[idx]->setEditable(false); // TODO - enable this?
|
||||||
|
|
||||||
|
// We need to know where the PF_BL register is, to properly position
|
||||||
|
// the CXCLR button
|
||||||
|
if(idx == kBL_PFID)
|
||||||
|
cxclrY = collY;
|
||||||
|
|
||||||
// Add horizontal label
|
// Add horizontal label
|
||||||
uInt32 labelx = collX;
|
uInt32 labelx = collX;
|
||||||
if(lwidth > uInt32(myCollision[idx]->getWidth()))
|
if(lwidth > uInt32(myCollision[idx]->getWidth()))
|
||||||
|
@ -118,46 +152,17 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
|
|
||||||
// Clear all collision bits
|
// Clear all collision bits
|
||||||
buttonX = collX + 5*(myCollision[0]->getWidth() + 10) - buttonW - 10;
|
buttonX = collX + 5*(myCollision[0]->getWidth() + 10) - buttonW - 10;
|
||||||
buttonY = collY - lineHeight - 8;
|
buttonY = lineHeight == 15 ? cxclrY : cxclrY - 4;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||||
"CxClr", kCxclrCmd);
|
"CXCLR", kCxclrCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
// Fixed debug colors
|
|
||||||
xpos = collX + 5*(lwidth + 5) + 70; ypos -= lineHeight;
|
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos, 18*fontWidth, fontHeight,
|
|
||||||
"Fixed Debug Colors", kTextAlignLeft);
|
|
||||||
xpos -= 50; ypos += lineHeight;
|
|
||||||
|
|
||||||
const char* dbgLabels[] = {
|
|
||||||
"Player 0", "Missile 0", "Player 1", "Missile 1",
|
|
||||||
"Ball", "Playfield", "Background", "HMOVE"
|
|
||||||
};
|
|
||||||
for(uInt32 row = 0; row <= 3; ++row, ypos += lineHeight+3)
|
|
||||||
{
|
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos, 10*fontWidth, fontHeight,
|
|
||||||
dbgLabels[row], kTextAlignLeft);
|
|
||||||
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth(), ypos,
|
|
||||||
30, lineHeight - 4);
|
|
||||||
myFixedColors[row]->setTarget(this);
|
|
||||||
}
|
|
||||||
xpos += t->getWidth() + myFixedColors[0]->getWidth() + 12;
|
|
||||||
ypos -= 4 * (lineHeight+3);
|
|
||||||
for(uInt32 row = 4; row <= 7; ++row, ypos += lineHeight+3)
|
|
||||||
{
|
|
||||||
t = new StaticTextWidget(boss, lfont, xpos, ypos, 10*fontWidth, fontHeight,
|
|
||||||
dbgLabels[row], kTextAlignLeft);
|
|
||||||
myFixedColors[row] = new ColorWidget(boss, nfont, xpos + 2 + t->getWidth(), ypos,
|
|
||||||
30, lineHeight - 4);
|
|
||||||
myFixedColors[row]->setTarget(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// P0 register info
|
// P0 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// grP0 (new)
|
// grP0 (new)
|
||||||
xpos = 10; ypos = collY + 8;
|
xpos = 10; ypos = collY + 4;
|
||||||
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
new StaticTextWidget(boss, lfont, xpos, ypos+2, 2*fontWidth, fontHeight,
|
||||||
"P0", kTextAlignLeft);
|
"P0", kTextAlignLeft);
|
||||||
xpos += 2*fontWidth + 5;
|
xpos += 2*fontWidth + 5;
|
||||||
|
@ -200,8 +205,9 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
|
|
||||||
// P0 reset
|
// P0 reset
|
||||||
xpos += myRefP0->getWidth() + 12;
|
xpos += myRefP0->getWidth() + 12;
|
||||||
|
buttonX = xpos;
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
||||||
"ResP0", kResP0Cmd);
|
"RESP0", kResP0Cmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
|
@ -285,7 +291,7 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
// P1 reset
|
// P1 reset
|
||||||
xpos += myRefP1->getWidth() + 12;
|
xpos += myRefP1->getWidth() + 12;
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
||||||
"ResP1", kResP1Cmd);
|
"RESP1", kResP1Cmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
|
@ -369,21 +375,21 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
myNusizM0->setID(kNusizM0ID);
|
myNusizM0->setID(kNusizM0ID);
|
||||||
addFocusWidget(myNusizM0);
|
addFocusWidget(myNusizM0);
|
||||||
|
|
||||||
// M0 reset
|
|
||||||
xpos += myNusizM0->getWidth() + 15;
|
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"ResM0", kResM0Cmd);
|
|
||||||
b->setTarget(this);
|
|
||||||
addFocusWidget(b);
|
|
||||||
|
|
||||||
// M0 reset to player 0
|
// M0 reset to player 0
|
||||||
xpos += b->getWidth() + 15;
|
xpos += myNusizM0->getWidth() + 15;
|
||||||
myResMP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
myResMP0 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||||
"Reset to P0", kCheckActionCmd);
|
"Reset to P0", kCheckActionCmd);
|
||||||
myResMP0->setTarget(this);
|
myResMP0->setTarget(this);
|
||||||
myResMP0->setID(kResMP0ID);
|
myResMP0->setID(kResMP0ID);
|
||||||
addFocusWidget(myResMP0);
|
addFocusWidget(myResMP0);
|
||||||
|
|
||||||
|
// M0 reset
|
||||||
|
xpos = buttonX;
|
||||||
|
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
||||||
|
"RESM0", kResM0Cmd);
|
||||||
|
b->setTarget(this);
|
||||||
|
addFocusWidget(b);
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// M1 register info
|
// M1 register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
@ -432,21 +438,21 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
myNusizM1->setID(kNusizM1ID);
|
myNusizM1->setID(kNusizM1ID);
|
||||||
addFocusWidget(myNusizM1);
|
addFocusWidget(myNusizM1);
|
||||||
|
|
||||||
// M1 reset
|
|
||||||
xpos += myNusizM1->getWidth() + 15;
|
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
|
||||||
"ResM1", kResM1Cmd);
|
|
||||||
b->setTarget(this);
|
|
||||||
addFocusWidget(b);
|
|
||||||
|
|
||||||
// M1 reset to player 0
|
// M1 reset to player 0
|
||||||
xpos += b->getWidth() + 15;
|
xpos += myNusizM1->getWidth() + 15;
|
||||||
myResMP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
myResMP1 = new CheckboxWidget(boss, lfont, xpos, ypos+1,
|
||||||
"Reset to P1", kCheckActionCmd);
|
"Reset to P1", kCheckActionCmd);
|
||||||
myResMP1->setTarget(this);
|
myResMP1->setTarget(this);
|
||||||
myResMP1->setID(kResMP1ID);
|
myResMP1->setID(kResMP1ID);
|
||||||
addFocusWidget(myResMP1);
|
addFocusWidget(myResMP1);
|
||||||
|
|
||||||
|
// M1 reset
|
||||||
|
xpos = buttonX;
|
||||||
|
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
||||||
|
"RESM1", kResM1Cmd);
|
||||||
|
b->setTarget(this);
|
||||||
|
addFocusWidget(b);
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// BL register info
|
// BL register info
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
@ -496,9 +502,9 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
addFocusWidget(mySizeBL);
|
addFocusWidget(mySizeBL);
|
||||||
|
|
||||||
// Reset ball
|
// Reset ball
|
||||||
xpos += mySizeBL->getWidth() + 15;
|
xpos = buttonX;
|
||||||
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, xpos, ypos, buttonW, lineHeight,
|
||||||
"ResBL", kResBLCmd);
|
"RESBL", kResBLCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
|
@ -613,25 +619,25 @@ TiaWidget::TiaWidget(GuiObject* boss, const GUI::Font& lfont,
|
||||||
buttonX = xpos + myDelayQueueWidget->getWidth() + 20;
|
buttonX = xpos + myDelayQueueWidget->getWidth() + 20;
|
||||||
buttonY = ypos;
|
buttonY = ypos;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||||
"WSync", kWsyncCmd);
|
"WSYNC", kWsyncCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonY += lineHeight + 3;
|
buttonY += lineHeight + 3;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||||
"RSync", kRsyncCmd);
|
"RSYNC", kRsyncCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonY += lineHeight + 3;
|
buttonY += lineHeight + 3;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||||
"HMove", kHmoveCmd);
|
"HMOVE", kHmoveCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
buttonY += lineHeight + 3;
|
buttonY += lineHeight + 3;
|
||||||
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
b = new ButtonWidget(boss, lfont, buttonX, buttonY, buttonW, lineHeight,
|
||||||
"HmClr", kHmclrCmd);
|
"HMCLR", kHmclrCmd);
|
||||||
b->setTarget(this);
|
b->setTarget(this);
|
||||||
addFocusWidget(b);
|
addFocusWidget(b);
|
||||||
|
|
||||||
|
@ -691,6 +697,10 @@ void TiaWidget::handleCommand(CommandSender* sender, int cmd, int data, int id)
|
||||||
tia.strobeCxclr();
|
tia.strobeCxclr();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kDbgClCmd:
|
||||||
|
myFixedEnabled->setState(tia.tia().toggleFixedColors());
|
||||||
|
break;
|
||||||
|
|
||||||
case kPPinCmd:
|
case kPPinCmd:
|
||||||
tia.tia().driveUnusedPinsRandom(myUndrivenPins->getState());
|
tia.tia().driveUnusedPinsRandom(myUndrivenPins->getState());
|
||||||
break;
|
break;
|
||||||
|
@ -888,14 +898,24 @@ void TiaWidget::loadConfig()
|
||||||
}
|
}
|
||||||
myColorRegs->setList(alist, vlist, changed);
|
myColorRegs->setList(alist, vlist, changed);
|
||||||
|
|
||||||
|
bool fixed = tia.tia().usingFixedColors();
|
||||||
|
|
||||||
myCOLUP0Color->setColor(state.coluRegs[0]);
|
myCOLUP0Color->setColor(state.coluRegs[0]);
|
||||||
myCOLUP1Color->setColor(state.coluRegs[1]);
|
myCOLUP1Color->setColor(state.coluRegs[1]);
|
||||||
myCOLUPFColor->setColor(state.coluRegs[2]);
|
myCOLUPFColor->setColor(state.coluRegs[2]);
|
||||||
myCOLUBKColor->setColor(state.coluRegs[3]);
|
myCOLUBKColor->setColor(state.coluRegs[3]);
|
||||||
|
myCOLUP0Color->setCrossed(fixed);
|
||||||
|
myCOLUP1Color->setCrossed(fixed);
|
||||||
|
myCOLUPFColor->setCrossed(fixed);
|
||||||
|
myCOLUBKColor->setCrossed(fixed);
|
||||||
|
|
||||||
// Fixed debug colors
|
// Fixed debug colors
|
||||||
|
myFixedEnabled->setState(fixed);
|
||||||
for(uInt32 c = 0; c < 8; ++c)
|
for(uInt32 c = 0; c < 8; ++c)
|
||||||
|
{
|
||||||
myFixedColors[c]->setColor(state.fixedCols[c]);
|
myFixedColors[c]->setColor(state.fixedCols[c]);
|
||||||
|
myFixedColors[c]->setCrossed(!fixed);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Collision register bits
|
// Collision register bits
|
||||||
|
|
|
@ -46,6 +46,7 @@ class TiaWidget : public Widget, public CommandSender
|
||||||
ColorWidget* myCOLUPFColor;
|
ColorWidget* myCOLUPFColor;
|
||||||
ColorWidget* myCOLUBKColor;
|
ColorWidget* myCOLUBKColor;
|
||||||
|
|
||||||
|
CheckboxWidget* myFixedEnabled;
|
||||||
ColorWidget* myFixedColors[8];
|
ColorWidget* myFixedColors[8];
|
||||||
|
|
||||||
TogglePixelWidget* myGRP0;
|
TogglePixelWidget* myGRP0;
|
||||||
|
@ -138,6 +139,7 @@ class TiaWidget : public Widget, public CommandSender
|
||||||
kHmoveCmd = 'Shmv',
|
kHmoveCmd = 'Shmv',
|
||||||
kHmclrCmd = 'Shmc',
|
kHmclrCmd = 'Shmc',
|
||||||
kCxclrCmd = 'Scxl',
|
kCxclrCmd = 'Scxl',
|
||||||
|
kDbgClCmd = 'DBGc',
|
||||||
kPPinCmd = 'PPin'
|
kPPinCmd = 'PPin'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,6 @@ void TogglePixelWidget::drawWidget(bool hilite)
|
||||||
|
|
||||||
// Cross out the bits?
|
// Cross out the bits?
|
||||||
if(_crossBits)
|
if(_crossBits)
|
||||||
for (row = 0; row < 4; ++row)
|
for(row = 1; row < 4; ++row)
|
||||||
s.hLine(_x, _y + (row * lineheight/4), _x + linewidth, kColor);
|
s.hLine(_x, _y + (row * lineheight/4), _x + linewidth, kColor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -872,6 +872,12 @@ bool TIA::toggleFixedColors(uInt8 mode)
|
||||||
return on;
|
return on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
bool TIA::usingFixedColors() const
|
||||||
|
{
|
||||||
|
return myColorHBlank != 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
bool TIA::driveUnusedPinsRandom(uInt8 mode)
|
bool TIA::driveUnusedPinsRandom(uInt8 mode)
|
||||||
{
|
{
|
||||||
|
|
|
@ -266,7 +266,7 @@ class TIA : public Device
|
||||||
bool toggleCollisions();
|
bool toggleCollisions();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Enables/disable/toggle 'fixed debug colors' mode.
|
Enables/disable/toggle/query 'fixed debug colors' mode.
|
||||||
|
|
||||||
@param mode 1/0 indicates on/off, otherwise flip from
|
@param mode 1/0 indicates on/off, otherwise flip from
|
||||||
its current state
|
its current state
|
||||||
|
@ -274,6 +274,7 @@ class TIA : public Device
|
||||||
@return Whether the mode was enabled or disabled
|
@return Whether the mode was enabled or disabled
|
||||||
*/
|
*/
|
||||||
bool toggleFixedColors(uInt8 mode = 2);
|
bool toggleFixedColors(uInt8 mode = 2);
|
||||||
|
bool usingFixedColors() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Enable/disable/query state of 'undriven/floating TIA pins'.
|
Enable/disable/query state of 'undriven/floating TIA pins'.
|
||||||
|
@ -366,16 +367,16 @@ class TIA : public Device
|
||||||
M0ColorNTSC = 0x38, // orange
|
M0ColorNTSC = 0x38, // orange
|
||||||
P1ColorNTSC = 0x1c, // yellow
|
P1ColorNTSC = 0x1c, // yellow
|
||||||
M1ColorNTSC = 0xc4, // green
|
M1ColorNTSC = 0xc4, // green
|
||||||
BLColorNTSC = 0x9e, // blue
|
PFColorNTSC = 0x9e, // blue
|
||||||
PFColorNTSC = 0x66, // purple
|
BLColorNTSC = 0x66, // purple
|
||||||
BKColorNTSC = 0x0a, // grey
|
BKColorNTSC = 0x0a, // grey
|
||||||
|
|
||||||
P0ColorPAL = 0x62, // red
|
P0ColorPAL = 0x62, // red
|
||||||
M0ColorPAL = 0x4a, // orange
|
M0ColorPAL = 0x4a, // orange
|
||||||
P1ColorPAL = 0x2e, // yellow
|
P1ColorPAL = 0x2e, // yellow
|
||||||
M1ColorPAL = 0x34, // green
|
M1ColorPAL = 0x34, // green
|
||||||
BLColorPAL = 0xbc, // blue
|
PFColorPAL = 0xbc, // blue
|
||||||
PFColorPAL = 0xa6, // purple
|
BLColorPAL = 0xa6, // purple
|
||||||
BKColorPAL = 0x0a, // grey
|
BKColorPAL = 0x0a, // grey
|
||||||
|
|
||||||
HBLANKColor = 0x0e // white
|
HBLANKColor = 0x0e // white
|
||||||
|
|
Loading…
Reference in New Issue