mirror of
https://github.com/libretro/stella2023.git
synced 2025-02-01 22:52:00 +00:00
Added 'Cart RAM' debugger tab for DPC/Pitfall2 scheme. It is quite similar
to the DPC+ scheme, so I suspect its omission was an oversight. Other than the more esoteric types, the only scheme left needing a cartram tab is DASH, but that one is still in development ... git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2940 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
9b99e414aa
commit
16be8f8a8e
@ -85,7 +85,7 @@ class CartridgeDPCPlusWidget : public CartDebugWidget
|
||||
CheckboxWidget* myIMLDA;
|
||||
DataGridWidget* myRandom;
|
||||
|
||||
CartState myState, myOldState;
|
||||
CartState myOldState;
|
||||
|
||||
enum { kBankChanged = 'bkCH' };
|
||||
};
|
||||
|
@ -147,11 +147,12 @@ void CartridgeDPCWidget::saveOldState()
|
||||
myOldState.flags.push_back(myCart.myFlags[i]);
|
||||
}
|
||||
for(int i = 0; i < 3; ++i)
|
||||
{
|
||||
myOldState.music.push_back(myCart.myMusicMode[i]);
|
||||
}
|
||||
|
||||
myOldState.random = myCart.myRandomNumber;
|
||||
|
||||
for(int i = 0; i < internalRamSize(); ++i)
|
||||
myOldState.internalram.push_back(myCart.myDisplayImage[i]);
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@ -234,3 +235,56 @@ string CartridgeDPCWidget::bankState()
|
||||
|
||||
return buf.str();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 CartridgeDPCWidget::internalRamSize()
|
||||
{
|
||||
return 2*1024;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt32 CartridgeDPCWidget::internalRamRPort(int start)
|
||||
{
|
||||
return 0x0000 + start;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string CartridgeDPCWidget::internalRamDescription()
|
||||
{
|
||||
ostringstream desc;
|
||||
desc << "$0000 - $07FF - 2K display data\n"
|
||||
<< " indirectly accessible to 6507\n"
|
||||
<< " via DPC+'s Data Fetcher registers\n";
|
||||
|
||||
return desc.str();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const ByteArray& CartridgeDPCWidget::internalRamOld(int start, int count)
|
||||
{
|
||||
myRamOld.clear();
|
||||
for(int i = 0; i < count; i++)
|
||||
myRamOld.push_back(myOldState.internalram[start + i]);
|
||||
return myRamOld;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
const ByteArray& CartridgeDPCWidget::internalRamCurrent(int start, int count)
|
||||
{
|
||||
myRamCurrent.clear();
|
||||
for(int i = 0; i < count; i++)
|
||||
myRamCurrent.push_back(myCart.myDisplayImage[start + i]);
|
||||
return myRamCurrent;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void CartridgeDPCWidget::internalRamSetValue(int addr, uInt8 value)
|
||||
{
|
||||
myCart.myDisplayImage[addr] = value;
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
uInt8 CartridgeDPCWidget::internalRamGetValue(int addr)
|
||||
{
|
||||
return myCart.myDisplayImage[addr];
|
||||
}
|
||||
|
@ -42,6 +42,16 @@ class CartridgeDPCWidget : public CartDebugWidget
|
||||
|
||||
string bankState();
|
||||
|
||||
// start of functions for Cartridge RAM tab
|
||||
uInt32 internalRamSize();
|
||||
uInt32 internalRamRPort(int start);
|
||||
string internalRamDescription();
|
||||
const ByteArray& internalRamOld(int start, int count);
|
||||
const ByteArray& internalRamCurrent(int start, int count);
|
||||
void internalRamSetValue(int addr, uInt8 value);
|
||||
uInt8 internalRamGetValue(int addr);
|
||||
// end of functions for Cartridge RAM tab
|
||||
|
||||
private:
|
||||
struct CartState {
|
||||
ByteArray tops;
|
||||
@ -50,6 +60,7 @@ class CartridgeDPCWidget : public CartDebugWidget
|
||||
ByteArray flags;
|
||||
BoolArray music;
|
||||
uInt8 random;
|
||||
ByteArray internalram;
|
||||
};
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user