mirror of https://github.com/stella-emu/stella.git
Added RIOT port B information to the I/O tab in the debugger.
I'm still waiting on a test ROM to verify that its output is valid. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2319 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
c95d5f804d
commit
d8b59f7083
|
@ -39,11 +39,15 @@ const DebuggerState& RiotDebug::getState()
|
||||||
myState.SWCHA_R = swcha();
|
myState.SWCHA_R = swcha();
|
||||||
myState.SWCHA_W = mySystem.m6532().myOutA;
|
myState.SWCHA_W = mySystem.m6532().myOutA;
|
||||||
myState.SWACNT = swacnt();
|
myState.SWACNT = swacnt();
|
||||||
myState.SWCHB = swchb();
|
myState.SWCHB_R = swchb();
|
||||||
|
myState.SWCHB_W = mySystem.m6532().myOutB;
|
||||||
|
myState.SWBCNT = swbcnt();
|
||||||
Debugger::set_bits(myState.SWCHA_R, myState.swchaReadBits);
|
Debugger::set_bits(myState.SWCHA_R, myState.swchaReadBits);
|
||||||
Debugger::set_bits(myState.SWCHA_W, myState.swchaWriteBits);
|
Debugger::set_bits(myState.SWCHA_W, myState.swchaWriteBits);
|
||||||
Debugger::set_bits(myState.SWACNT, myState.swacntBits);
|
Debugger::set_bits(myState.SWACNT, myState.swacntBits);
|
||||||
Debugger::set_bits(myState.SWCHB, myState.swchbBits);
|
Debugger::set_bits(myState.SWCHB_R, myState.swchbReadBits);
|
||||||
|
Debugger::set_bits(myState.SWCHB_W, myState.swchbWriteBits);
|
||||||
|
Debugger::set_bits(myState.SWBCNT, myState.swbcntBits);
|
||||||
|
|
||||||
// Timer registers
|
// Timer registers
|
||||||
myState.TIM1T = tim1T();
|
myState.TIM1T = tim1T();
|
||||||
|
@ -78,11 +82,15 @@ void RiotDebug::saveOldState()
|
||||||
myOldState.SWCHA_R = swcha();
|
myOldState.SWCHA_R = swcha();
|
||||||
myOldState.SWCHA_W = mySystem.m6532().myOutA;
|
myOldState.SWCHA_W = mySystem.m6532().myOutA;
|
||||||
myOldState.SWACNT = swacnt();
|
myOldState.SWACNT = swacnt();
|
||||||
myOldState.SWCHB = swchb();
|
myOldState.SWCHB_R = swchb();
|
||||||
|
myOldState.SWCHB_W = mySystem.m6532().myOutB;
|
||||||
|
myOldState.SWBCNT = swbcnt();
|
||||||
Debugger::set_bits(myOldState.SWCHA_R, myOldState.swchaReadBits);
|
Debugger::set_bits(myOldState.SWCHA_R, myOldState.swchaReadBits);
|
||||||
Debugger::set_bits(myOldState.SWCHA_W, myOldState.swchaWriteBits);
|
Debugger::set_bits(myOldState.SWCHA_W, myOldState.swchaWriteBits);
|
||||||
Debugger::set_bits(myOldState.SWACNT, myOldState.swacntBits);
|
Debugger::set_bits(myOldState.SWACNT, myOldState.swacntBits);
|
||||||
Debugger::set_bits(myOldState.SWCHB, myOldState.swchbBits);
|
Debugger::set_bits(myOldState.SWCHB_R, myOldState.swchbReadBits);
|
||||||
|
Debugger::set_bits(myOldState.SWCHB_W, myOldState.swchbWriteBits);
|
||||||
|
Debugger::set_bits(myOldState.SWBCNT, myOldState.swbcntBits);
|
||||||
|
|
||||||
// Timer registers
|
// Timer registers
|
||||||
myOldState.TIM1T = tim1T();
|
myOldState.TIM1T = tim1T();
|
||||||
|
@ -132,6 +140,15 @@ uInt8 RiotDebug::swacnt(int newVal)
|
||||||
return mySystem.peek(0x281);
|
return mySystem.peek(0x281);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
uInt8 RiotDebug::swbcnt(int newVal)
|
||||||
|
{
|
||||||
|
if(newVal > -1)
|
||||||
|
mySystem.poke(0x283, newVal);
|
||||||
|
|
||||||
|
return mySystem.peek(0x283);
|
||||||
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
uInt8 RiotDebug::tim1T(int newVal)
|
uInt8 RiotDebug::tim1T(int newVal)
|
||||||
{
|
{
|
||||||
|
@ -326,8 +343,12 @@ string RiotDebug::toString()
|
||||||
<< myDebugger.invIfChanged(state.SWCHA_W, oldstate.SWCHA_W) << " "
|
<< myDebugger.invIfChanged(state.SWCHA_W, oldstate.SWCHA_W) << " "
|
||||||
<< myDebugger.valueToString(0x281) + "/SWACNT="
|
<< myDebugger.valueToString(0x281) + "/SWACNT="
|
||||||
<< myDebugger.invIfChanged(state.SWACNT, oldstate.SWACNT) << " "
|
<< myDebugger.invIfChanged(state.SWACNT, oldstate.SWACNT) << " "
|
||||||
<< myDebugger.valueToString(0x282) + "/SWCHB="
|
<< myDebugger.valueToString(0x282) + "/SWCHB(R)="
|
||||||
<< myDebugger.invIfChanged(state.SWCHB, oldstate.SWCHB) << " "
|
<< myDebugger.invIfChanged(state.SWCHB_R, oldstate.SWCHB_R) << " "
|
||||||
|
<< myDebugger.valueToString(0x282) + "/SWCHB(W)="
|
||||||
|
<< myDebugger.invIfChanged(state.SWCHB_W, oldstate.SWCHB_W) << " "
|
||||||
|
<< myDebugger.valueToString(0x283) + "/SWBCNT="
|
||||||
|
<< myDebugger.invIfChanged(state.SWBCNT, oldstate.SWBCNT) << " "
|
||||||
<< endl
|
<< endl
|
||||||
|
|
||||||
// These are squirrely: some symbol files will define these as
|
// These are squirrely: some symbol files will define these as
|
||||||
|
|
|
@ -29,11 +29,13 @@ class RiotDebug;
|
||||||
class RiotState : public DebuggerState
|
class RiotState : public DebuggerState
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
uInt8 SWCHA_R, SWCHA_W, SWACNT, SWCHB;
|
uInt8 SWCHA_R, SWCHA_W, SWACNT, SWCHB_R, SWCHB_W, SWBCNT;
|
||||||
BoolArray swchaReadBits;
|
BoolArray swchaReadBits;
|
||||||
BoolArray swchaWriteBits;
|
BoolArray swchaWriteBits;
|
||||||
BoolArray swacntBits;
|
BoolArray swacntBits;
|
||||||
BoolArray swchbBits;
|
BoolArray swchbReadBits;
|
||||||
|
BoolArray swchbWriteBits;
|
||||||
|
BoolArray swbcntBits;
|
||||||
|
|
||||||
uInt8 TIM1T, TIM8T, TIM64T, TIM1024T, INTIM, TIMINT;
|
uInt8 TIM1T, TIM8T, TIM64T, TIM1024T, INTIM, TIMINT;
|
||||||
Int32 TIMCLKS;
|
Int32 TIMCLKS;
|
||||||
|
@ -57,6 +59,7 @@ class RiotDebug : public DebuggerSystem
|
||||||
uInt8 swcha(int newVal = -1);
|
uInt8 swcha(int newVal = -1);
|
||||||
uInt8 swacnt(int newVal = -1);
|
uInt8 swacnt(int newVal = -1);
|
||||||
uInt8 swchb(int newVal = -1);
|
uInt8 swchb(int newVal = -1);
|
||||||
|
uInt8 swbcnt(int newVal = -1);
|
||||||
|
|
||||||
/* Timer registers & associated clock */
|
/* Timer registers & associated clock */
|
||||||
uInt8 tim1T(int newVal = -1);
|
uInt8 tim1T(int newVal = -1);
|
||||||
|
|
|
@ -116,10 +116,18 @@ RiotWidget::RiotWidget(GuiObject* boss, const GUI::Font& font,
|
||||||
CREATE_IO_REGS("SWCHA(R):", mySWCHAReadBits, 0);
|
CREATE_IO_REGS("SWCHA(R):", mySWCHAReadBits, 0);
|
||||||
mySWCHAReadBits->setEditable(false);
|
mySWCHAReadBits->setEditable(false);
|
||||||
|
|
||||||
// SWCHB bits in 'peek' mode
|
// SWCHB bits in 'poke' mode
|
||||||
xpos = 10; ypos += 2 * lineHeight;
|
xpos = 10; ypos += 2 * lineHeight;
|
||||||
CREATE_IO_REGS("SWCHB:", mySWCHBBits, 0);
|
CREATE_IO_REGS("SWCHB(W):", mySWCHBWriteBits, kSWCHBBitsID);
|
||||||
mySWCHBBits->setEditable(false);
|
|
||||||
|
// SWBCNT bits
|
||||||
|
xpos = 10; ypos += lineHeight + 5;
|
||||||
|
CREATE_IO_REGS("SWBCNT:", mySWBCNTBits, kSWBCNTBitsID);
|
||||||
|
|
||||||
|
// SWCHB bits in 'peek' mode
|
||||||
|
xpos = 10; ypos += lineHeight + 5;
|
||||||
|
CREATE_IO_REGS("SWCHB(R):", mySWCHBReadBits, 0);
|
||||||
|
mySWCHBReadBits->setEditable(false);
|
||||||
|
|
||||||
// Timer registers (R/W)
|
// Timer registers (R/W)
|
||||||
const char* writeNames[] = { "TIM1T:", "TIM8T:", "TIM64T:", "TIM1024T:" };
|
const char* writeNames[] = { "TIM1T:", "TIM8T:", "TIM64T:", "TIM1024T:" };
|
||||||
|
@ -231,8 +239,14 @@ void RiotWidget::loadConfig()
|
||||||
// Update the SWCHA register booleans (peek mode)
|
// Update the SWCHA register booleans (peek mode)
|
||||||
IO_REGS_UPDATE(mySWCHAReadBits, swchaReadBits);
|
IO_REGS_UPDATE(mySWCHAReadBits, swchaReadBits);
|
||||||
|
|
||||||
// Update the SWCHB register booleans
|
// Update the SWCHB register booleans (poke mode)
|
||||||
IO_REGS_UPDATE(mySWCHBBits, swchbBits);
|
IO_REGS_UPDATE(mySWCHBWriteBits, swchbWriteBits);
|
||||||
|
|
||||||
|
// Update the SWBCNT register booleans
|
||||||
|
IO_REGS_UPDATE(mySWBCNTBits, swbcntBits);
|
||||||
|
|
||||||
|
// Update the SWCHB register booleans (peek mode)
|
||||||
|
IO_REGS_UPDATE(mySWCHBReadBits, swchbReadBits);
|
||||||
|
|
||||||
// Update timer write registers
|
// Update timer write registers
|
||||||
alist.clear(); vlist.clear(); changed.clear();
|
alist.clear(); vlist.clear(); changed.clear();
|
||||||
|
|
|
@ -48,7 +48,9 @@ class RiotWidget : public Widget, public CommandSender
|
||||||
ToggleBitWidget* mySWCHAReadBits;
|
ToggleBitWidget* mySWCHAReadBits;
|
||||||
ToggleBitWidget* mySWCHAWriteBits;
|
ToggleBitWidget* mySWCHAWriteBits;
|
||||||
ToggleBitWidget* mySWACNTBits;
|
ToggleBitWidget* mySWACNTBits;
|
||||||
ToggleBitWidget* mySWCHBBits;
|
ToggleBitWidget* mySWCHBReadBits;
|
||||||
|
ToggleBitWidget* mySWCHBWriteBits;
|
||||||
|
ToggleBitWidget* mySWBCNTBits;
|
||||||
|
|
||||||
DataGridWidget* myTimWrite;
|
DataGridWidget* myTimWrite;
|
||||||
DataGridWidget* myTimRead;
|
DataGridWidget* myTimRead;
|
||||||
|
@ -63,8 +65,8 @@ class RiotWidget : public Widget, public CommandSender
|
||||||
// ID's for the various widgets
|
// ID's for the various widgets
|
||||||
// We need ID's, since there are more than one of several types of widgets
|
// We need ID's, since there are more than one of several types of widgets
|
||||||
enum {
|
enum {
|
||||||
kTim1TID, kTim8TID, kTim64TID, kTim1024TID,
|
kTim1TID, kTim8TID, kTim64TID, kTim1024TID, kTimWriteID,
|
||||||
kSWCHABitsID, kSWACNTBitsID, kSWCHBBitsID, kTimWriteID,
|
kSWCHABitsID, kSWACNTBitsID, kSWCHBBitsID, kSWBCNTBitsID,
|
||||||
kP0PinsID, kP1PinsID,
|
kP0PinsID, kP1PinsID,
|
||||||
kP0DiffChanged, kP1DiffChanged, kTVTypeChanged, kSelectID, kResetID
|
kP0DiffChanged, kP1DiffChanged, kTVTypeChanged, kSelectID, kResetID
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue