mirror of https://github.com/stella-emu/stella.git
Improved cart description for 2K and 4K formats in the debugger.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2682 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
05a39cb1e0
commit
fbebe17d6b
|
@ -26,6 +26,13 @@ Cartridge2KWidget::Cartridge2KWidget(
|
|||
int x, int y, int w, int h, Cartridge2K& cart)
|
||||
: CartDebugWidget(boss, font, x, y, w, h)
|
||||
{
|
||||
addBaseInformation(2048, "Atari", "Standard 2K cartridge, non-bankswitched\n"
|
||||
"Accessible @ $1000 - $1FFF");
|
||||
// Eventually, we should query this from the debugger/disassembler
|
||||
uInt16 size = cart.mySize;
|
||||
uInt16 start = (cart.myImage[size-3] << 8) | cart.myImage[size-2];
|
||||
start -= start % size;
|
||||
|
||||
ostringstream info;
|
||||
info << "Standard 2K cartridge, non-bankswitched\n"
|
||||
<< "Accessible @ $" << HEX4 << start << " - " << "$" << (start + size - 1);
|
||||
addBaseInformation(size, "Atari", info.str());
|
||||
}
|
||||
|
|
|
@ -26,7 +26,12 @@ Cartridge4KWidget::Cartridge4KWidget(
|
|||
int x, int y, int w, int h, Cartridge4K& cart)
|
||||
: CartDebugWidget(boss, font, x, y, w, h)
|
||||
{
|
||||
uInt16 offset = (cart.myImage[0xFFD] << 8) | cart.myImage[0xFFC];
|
||||
addBaseInformation(4096, "Atari", "Standard 4K cartridge, non-bankswitched\n"
|
||||
"Accessible @ $1000 - $1FFF");
|
||||
// Eventually, we should query this from the debugger/disassembler
|
||||
uInt16 start = (cart.myImage[0xFFD] << 8) | cart.myImage[0xFFC];
|
||||
start -= start % 0x1000;
|
||||
|
||||
ostringstream info;
|
||||
info << "Standard 4K cartridge, non-bankswitched\n"
|
||||
<< "Accessible @ $" << HEX4 << start << " - " << "$" << (start + 0xFFF);
|
||||
addBaseInformation(4096, "Atari", info.str());
|
||||
}
|
||||
|
|
|
@ -54,15 +54,19 @@ class CartDebugWidget : public Widget, public CommandSender
|
|||
fwidth = _w - lwidth - 30;
|
||||
EditTextWidget* w = 0;
|
||||
StringListWidget* sw = 0;
|
||||
ostringstream buf;
|
||||
|
||||
int x = 10, y = 10;
|
||||
|
||||
// Add ROM size, manufacturer and bankswitch info
|
||||
new StaticTextWidget(_boss, _font, x, y, lwidth,
|
||||
myFontHeight, "ROM Size: ", kTextAlignLeft);
|
||||
buf << bytes << " bytes";
|
||||
if(bytes >= 1024)
|
||||
buf << " / " << (bytes/1024) << "KB";
|
||||
|
||||
w = new EditTextWidget(_boss, _font, x+lwidth, y,
|
||||
fwidth, myFontHeight, BSPF_toString(bytes) + " bytes / " +
|
||||
BSPF_toString((bytes/1024)) + "KB");
|
||||
fwidth, myFontHeight, buf.str());
|
||||
w->setEditable(false);
|
||||
y += myLineHeight + 4;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class System;
|
|||
*/
|
||||
class Cartridge2K : public Cartridge
|
||||
{
|
||||
friend class Cart2KWidget;
|
||||
friend class Cartridge2KWidget;
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue