mirror of https://github.com/stella-emu/stella.git
bank change tracking for more CartDebugWidgets added
This commit is contained in:
parent
ff1911a85d
commit
f0d5ffbd0a
|
@ -121,7 +121,12 @@ CartridgeBFWidget::CartridgeBFWidget(
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeBFWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
Debugger& dbg = instance().debugger();
|
||||
CartDebug& cart = dbg.cartDebug();
|
||||
const CartState& state = static_cast<const CartState&>(cart.getState());
|
||||
const CartState& oldstate = static_cast<const CartState&>(cart.getOldState());
|
||||
|
||||
myBank->setSelectedIndex(myCart.getBank(), state.bank != oldstate.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
|
|
@ -155,12 +155,14 @@ void CartridgeCMWidget::saveOldState()
|
|||
myOldState.internalram.clear();
|
||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeCMWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
myBank->setSelectedIndex(myCart.getBank(), myCart.getBank() != myOldState.bank);
|
||||
|
||||
RiotDebug& riot = Debugger::debugger().riotDebug();
|
||||
const RiotState& state = static_cast<const RiotState&>(riot.getState());
|
||||
|
|
|
@ -41,6 +41,7 @@ class CartridgeCMWidget : public CartDebugWidget
|
|||
uInt8 swcha;
|
||||
uInt8 column;
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
|
||||
CartridgeCM& myCart;
|
||||
|
|
|
@ -64,12 +64,13 @@ void CartridgeCTYWidget::saveOldState()
|
|||
{
|
||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||
}
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeCTYWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank()-1);
|
||||
myBank->setSelectedIndex(myCart.getBank()-1, myCart.getBank() != myOldState.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ class CartridgeCTYWidget : public CartDebugWidget
|
|||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ CartridgeCVPlusWidget::CartridgeCVPlusWidget(
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeCVPlusWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.myCurrentBank);
|
||||
myBank->setSelectedIndex(myCart.getBank(), myCart.getBank() != myOldState.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
@ -92,6 +92,8 @@ void CartridgeCVPlusWidget::saveOldState()
|
|||
myOldState.internalram.clear();
|
||||
for(uInt32 i = 0; i < this->internalRamSize();i++)
|
||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
|
|
@ -37,6 +37,7 @@ class CartridgeCVPlusWidget : public CartDebugWidget
|
|||
PopUpWidget* myBank;
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -99,12 +99,14 @@ void CartridgeDFSCWidget::saveOldState()
|
|||
{
|
||||
myOldState.internalram.push_back(myCart.myRAM[i]);
|
||||
}
|
||||
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeDFSCWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
myBank->setSelectedIndex(myCart.getBank(), myCart.getBank() != myOldState.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ class CartridgeDFSCWidget : public CartDebugWidget
|
|||
|
||||
struct CartState {
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
CartState myOldState;
|
||||
|
||||
|
|
|
@ -89,7 +89,12 @@ CartridgeDFWidget::CartridgeDFWidget(
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeDFWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
Debugger& dbg = instance().debugger();
|
||||
CartDebug& cart = dbg.cartDebug();
|
||||
const CartState& state = static_cast<const CartState&>(cart.getState());
|
||||
const CartState& oldstate = static_cast<const CartState&>(cart.getOldState());
|
||||
|
||||
myBank->setSelectedIndex(myCart.getBank(), state.bank != oldstate.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
|
|
@ -213,12 +213,14 @@ void CartridgeDPCPlusWidget::saveOldState()
|
|||
|
||||
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||
myOldState.internalram.push_back(myCart.myDisplayImage[i]);
|
||||
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeDPCPlusWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
myBank->setSelectedIndex(myCart.getBank(), myCart.getBank() != myOldState.bank);
|
||||
|
||||
// Get registers, using change tracking
|
||||
IntArray alist;
|
||||
|
|
|
@ -47,6 +47,7 @@ class CartridgeDPCPlusWidget : public CartDebugWidget
|
|||
IntArray mwaves;
|
||||
uInt32 random;
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
|
||||
CartridgeDPCPlus& myCart;
|
||||
|
|
|
@ -151,12 +151,14 @@ void CartridgeDPCWidget::saveOldState()
|
|||
|
||||
for(uInt32 i = 0; i < internalRamSize(); ++i)
|
||||
myOldState.internalram.push_back(myCart.myDisplayImage[i]);
|
||||
|
||||
myOldState.bank = myCart.getBank();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeDPCWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
myBank->setSelectedIndex(myCart.getBank(), myCart.getBank() != myOldState.bank);
|
||||
|
||||
// Get registers, using change tracking
|
||||
IntArray alist;
|
||||
|
|
|
@ -42,6 +42,7 @@ class CartridgeDPCWidget : public CartDebugWidget
|
|||
BoolArray music;
|
||||
uInt8 random;
|
||||
ByteArray internalram;
|
||||
uInt16 bank;
|
||||
};
|
||||
|
||||
CartridgeDPC& myCart;
|
||||
|
|
|
@ -73,7 +73,12 @@ CartridgeEFWidget::CartridgeEFWidget(
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeEFWidget::loadConfig()
|
||||
{
|
||||
myBank->setSelectedIndex(myCart.getBank());
|
||||
Debugger& dbg = instance().debugger();
|
||||
CartDebug& cart = dbg.cartDebug();
|
||||
const CartState& state = static_cast<const CartState&>(cart.getState());
|
||||
const CartState& oldstate = static_cast<const CartState&>(cart.getOldState());
|
||||
|
||||
myBank->setSelectedIndex(myCart.getBank(), state.bank != oldstate.bank);
|
||||
|
||||
CartDebugWidget::loadConfig();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue