Added 0840/CV/EF/EFSC/F0/UA schemes to debugger ROM tab.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2685 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2013-04-06 21:04:11 +00:00
parent 4c227932f1
commit 1ff7568c68
29 changed files with 899 additions and 23 deletions

View File

@ -0,0 +1,80 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "Cart0840.hxx"
#include "PopUpWidget.hxx"
#include "Cart0840Widget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cartridge0840Widget::Cartridge0840Widget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, Cartridge0840& cart)
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt16 size = 2 * 4096;
ostringstream info;
info << "0840 Econobanking, two 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n";
// Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0x800; i < 2;
++i, offset += 0x1000, spot += 0x40)
{
uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset];
start -= start % 0x1000;
info << "Bank " << i << " @ $" << HEX4 << start << " - "
<< "$" << (start + 0xFFF) << " (hotspot = $" << spot << ")\n";
}
int xpos = 10,
ypos = addBaseInformation(size, "Fred X. Quimby", info.str()) + myLineHeight;
StringMap items;
items.push_back("0 ($800)", "0");
items.push_back("1 ($840)", "1");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($800) "),
myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this);
addFocusWidget(myBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge0840Widget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Cartridge0840Widget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
if(cmd == kBankChanged)
{
myCart.unlockBank();
myCart.bank(myBank->getSelected());
myCart.lockBank();
invalidate();
}
}

View File

@ -0,0 +1,46 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGE0840_WIDGET_HXX
#define CARTRIDGE0840_WIDGET_HXX
class Cartridge0840;
class PopUpWidget;
#include "CartDebugWidget.hxx"
class Cartridge0840Widget : public CartDebugWidget
{
public:
Cartridge0840Widget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
Cartridge0840& cart);
virtual ~Cartridge0840Widget() { }
void loadConfig();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
Cartridge0840& myCart;
PopUpWidget* myBank;
enum { kBankChanged = 'bkCH' };
};
#endif

View File

@ -28,7 +28,7 @@ Cartridge2KWidget::Cartridge2KWidget(
{
// Eventually, we should query this from the debugger/disassembler
uInt16 size = cart.mySize;
uInt16 start = (cart.myImage[size-3] << 8) | cart.myImage[size-2];
uInt16 start = (cart.myImage[size-3] << 8) | cart.myImage[size-4];
start -= start % size;
ostringstream info;

View File

@ -0,0 +1,41 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "CartCV.hxx"
#include "CartCVWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeCVWidget::CartridgeCVWidget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, CartridgeCV& cart)
: CartDebugWidget(boss, font, x, y, w, h)
{
// Eventually, we should query this from the debugger/disassembler
uInt16 size = 2048;
uInt16 start = (cart.myImage[size-3] << 8) | cart.myImage[size-4];
start -= start % size;
ostringstream info;
info << "CV 2K ROM + 1K RAM , non-bankswitched\n"
<< "1024 bytes RAM @ $F000 - $F7FF\n"
<< " $F000 - $F3FF (R), $F400 - $F7FF (W)\n"
<< "ROM accessible @ $" << HEX4 << start << " - " << "$" << (start + size - 1);
addBaseInformation(cart.mySize, "CommaVid", info.str());
}

View File

@ -0,0 +1,39 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGECV_WIDGET_HXX
#define CARTRIDGECV_WIDGET_HXX
class CartridgeCV;
#include "CartDebugWidget.hxx"
class CartridgeCVWidget : public CartDebugWidget
{
public:
CartridgeCVWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
CartridgeCV& cart);
virtual ~CartridgeCVWidget() { }
// No implementation for non-bankswitched ROMs
void loadConfig() { }
void handleCommand(CommandSender* sender, int cmd, int data, int id) { }
};
#endif

View File

@ -55,7 +55,6 @@ class CartDebugWidget : public Widget, public CommandSender
const int lwidth = _font.getStringWidth("Manufacturer: "),
fwidth = _w - lwidth - 30;
EditTextWidget* w = 0;
StringListWidget* sw = 0;
ostringstream buf;
int x = 10, y = 10;
@ -83,15 +82,16 @@ class CartDebugWidget : public Widget, public CommandSender
const StringList& sl = bs.stringList();
uInt32 lines = sl.size();
if(lines < 3) lines = 3;
// if(lines > 6) lines = 6;
if(lines > 10) lines = 10;
new StaticTextWidget(_boss, _font, x, y, lwidth,
myFontHeight, "Description: ", kTextAlignLeft);
sw = new StringListWidget(_boss, _font, x+lwidth, y,
myDesc = new StringListWidget(_boss, _font, x+lwidth, y,
fwidth, lines * myLineHeight, false);
sw->setEditable(false);
sw->setList(sl);
y += sw->getHeight() + 4;
myDesc->setEditable(false);
myDesc->setList(sl);
addFocusWidget(myDesc);
y += myDesc->getHeight() + 4;
return y;
}
@ -102,13 +102,15 @@ class CartDebugWidget : public Widget, public CommandSender
Debugger::debugger().rom().invalidate();
}
virtual void loadConfig() { };
virtual void loadConfig() { myDesc->setSelected(0); }
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id) { };
protected:
// These will be needed by most of the child classes;
// we may as well make them protected variables
int myFontWidth, myFontHeight, myLineHeight;
StringListWidget* myDesc;
};
#endif

View File

@ -0,0 +1,96 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "CartEFSC.hxx"
#include "PopUpWidget.hxx"
#include "CartEFSCWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeEFSCWidget::CartridgeEFSCWidget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, CartridgeEFSC& cart)
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt32 size = 16 * 4096;
ostringstream info;
info << "64K H. Runner EFSC + RAM, 16 4K banks\n"
<< "128 bytes RAM @ $F000 - $F0FF\n"
<< " $F080 - $F0FF (R), $F000 - $F07F (W)\n"
<< "Startup bank = " << cart.myStartBank << "\n";
// Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFE0; i < 16; ++i, offset += 0x1000)
{
uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset];
start -= start % 0x1000;
info << "Bank " << dec << i << " @ $" << HEX4 << start << " - "
<< "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n";
}
int xpos = 10,
ypos = addBaseInformation(size, "Paul Slocum / Homestar Runner",
info.str()) + myLineHeight;
StringMap items;
items.push_back(" 0 ($FE0)", "0");
items.push_back(" 1 ($FE1)", "1");
items.push_back(" 2 ($FE2)", "2");
items.push_back(" 3 ($FE3)", "3");
items.push_back(" 4 ($FE4)", "4");
items.push_back(" 5 ($FE5)", "5");
items.push_back(" 6 ($FE6)", "6");
items.push_back(" 7 ($FE7)", "7");
items.push_back(" 8 ($FE8)", "8");
items.push_back(" 9 ($FE9)", "9");
items.push_back("10 ($FEA)", "10");
items.push_back("11 ($FEB)", "11");
items.push_back("12 ($FEC)", "12");
items.push_back("13 ($FED)", "13");
items.push_back("14 ($FEE)", "14");
items.push_back("15 ($FEF)", "15");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("15 ($FE0) "),
myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this);
addFocusWidget(myBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeEFSCWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeEFSCWidget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
if(cmd == kBankChanged)
{
myCart.unlockBank();
myCart.bank(myBank->getSelected());
myCart.lockBank();
invalidate();
}
}

View File

@ -0,0 +1,46 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGEEFSC_WIDGET_HXX
#define CARTRIDGEEFSC_WIDGET_HXX
class CartridgeEFSC;
class PopUpWidget;
#include "CartDebugWidget.hxx"
class CartridgeEFSCWidget : public CartDebugWidget
{
public:
CartridgeEFSCWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
CartridgeEFSC& cart);
virtual ~CartridgeEFSCWidget() { }
void loadConfig();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
CartridgeEFSC& myCart;
PopUpWidget* myBank;
enum { kBankChanged = 'bkCH' };
};
#endif

View File

@ -0,0 +1,94 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "CartEF.hxx"
#include "PopUpWidget.hxx"
#include "CartEFWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeEFWidget::CartridgeEFWidget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, CartridgeEF& cart)
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt32 size = 16 * 4096;
ostringstream info;
info << "64K H. Runner EF cartridge, 16 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n";
// Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0xFE0; i < 16; ++i, offset += 0x1000)
{
uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset];
start -= start % 0x1000;
info << "Bank " << dec << i << " @ $" << HEX4 << start << " - "
<< "$" << (start + 0xFFF) << " (hotspot = $" << (spot+i) << ")\n";
}
int xpos = 10,
ypos = addBaseInformation(size, "Paul Slocum / Homestar Runner",
info.str()) + myLineHeight;
StringMap items;
items.push_back(" 0 ($FE0)", "0");
items.push_back(" 1 ($FE1)", "1");
items.push_back(" 2 ($FE2)", "2");
items.push_back(" 3 ($FE3)", "3");
items.push_back(" 4 ($FE4)", "4");
items.push_back(" 5 ($FE5)", "5");
items.push_back(" 6 ($FE6)", "6");
items.push_back(" 7 ($FE7)", "7");
items.push_back(" 8 ($FE8)", "8");
items.push_back(" 9 ($FE9)", "9");
items.push_back("10 ($FEA)", "10");
items.push_back("11 ($FEB)", "11");
items.push_back("12 ($FEC)", "12");
items.push_back("13 ($FED)", "13");
items.push_back("14 ($FEE)", "14");
items.push_back("15 ($FEF)", "15");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("15 ($FE0) "),
myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this);
addFocusWidget(myBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeEFWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeEFWidget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
if(cmd == kBankChanged)
{
myCart.unlockBank();
myCart.bank(myBank->getSelected());
myCart.lockBank();
invalidate();
}
}

View File

@ -0,0 +1,46 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGEEF_WIDGET_HXX
#define CARTRIDGEEF_WIDGET_HXX
class CartridgeEF;
class PopUpWidget;
#include "CartDebugWidget.hxx"
class CartridgeEFWidget : public CartDebugWidget
{
public:
CartridgeEFWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
CartridgeEF& cart);
virtual ~CartridgeEFWidget() { }
void loadConfig();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
CartridgeEF& myCart;
PopUpWidget* myBank;
enum { kBankChanged = 'bkCH' };
};
#endif

View File

@ -0,0 +1,95 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "CartF0.hxx"
#include "PopUpWidget.hxx"
#include "CartF0Widget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeF0Widget::CartridgeF0Widget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, CartridgeF0& cart)
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt32 size = 16 * 4096;
ostringstream info;
info << "64K Megaboy F0 cartridge, 16 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n"
<< "Bankswitch triggered by accessing $1FF0\n";
// Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC; i < 16; ++i, offset += 0x1000)
{
uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset];
start -= start % 0x1000;
info << "Bank " << dec << i << " @ $" << HEX4 << start << " - "
<< "$" << (start + 0xFFF) << "\n";
}
int xpos = 10,
ypos = addBaseInformation(size, "Dynacom Megaboy",
info.str()) + myLineHeight;
StringMap items;
items.push_back(" 0", "0");
items.push_back(" 1", "1");
items.push_back(" 2", "2");
items.push_back(" 3", "3");
items.push_back(" 4", "4");
items.push_back(" 5", "5");
items.push_back(" 6", "6");
items.push_back(" 7", "7");
items.push_back(" 8", "8");
items.push_back(" 9", "9");
items.push_back("10", "10");
items.push_back("11", "11");
items.push_back("12", "12");
items.push_back("13", "13");
items.push_back("14", "14");
items.push_back("15", "15");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth(" 15 "),
myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this);
addFocusWidget(myBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF0Widget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF0Widget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
if(cmd == kBankChanged)
{
myCart.unlockBank();
myCart.bank(myBank->getSelected());
myCart.lockBank();
invalidate();
}
}

View File

@ -0,0 +1,46 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGEF0_WIDGET_HXX
#define CARTRIDGEF0_WIDGET_HXX
class CartridgeF0;
class PopUpWidget;
#include "CartDebugWidget.hxx"
class CartridgeF0Widget : public CartDebugWidget
{
public:
CartridgeF0Widget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
CartridgeF0& cart);
virtual ~CartridgeF0Widget() { }
void loadConfig();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
CartridgeF0& myCart;
PopUpWidget* myBank;
enum { kBankChanged = 'bkCH' };
};
#endif

View File

@ -53,10 +53,10 @@ CartridgeF4SCWidget::CartridgeF4SCWidget(
items.push_back("1 ($FF5)", "1");
items.push_back("2 ($FF6)", "2");
items.push_back("3 ($FF7)", "3");
items.push_back("4 ($FF8)", "0");
items.push_back("5 ($FF9)", "1");
items.push_back("6 ($FFA)", "2");
items.push_back("7 ($FFB)", "3");
items.push_back("4 ($FF8)", "4");
items.push_back("5 ($FF9)", "5");
items.push_back("6 ($FFA)", "6");
items.push_back("7 ($FFB)", "7");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ",
@ -69,6 +69,8 @@ CartridgeF4SCWidget::CartridgeF4SCWidget(
void CartridgeF4SCWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -51,10 +51,10 @@ CartridgeF4Widget::CartridgeF4Widget(
items.push_back("1 ($FF5)", "1");
items.push_back("2 ($FF6)", "2");
items.push_back("3 ($FF7)", "3");
items.push_back("4 ($FF8)", "0");
items.push_back("5 ($FF9)", "1");
items.push_back("6 ($FFA)", "2");
items.push_back("7 ($FFB)", "3");
items.push_back("4 ($FF8)", "4");
items.push_back("5 ($FF9)", "5");
items.push_back("6 ($FFA)", "6");
items.push_back("7 ($FFB)", "7");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ",
@ -67,6 +67,8 @@ CartridgeF4Widget::CartridgeF4Widget(
void CartridgeF4Widget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -65,6 +65,8 @@ CartridgeF6SCWidget::CartridgeF6SCWidget(
void CartridgeF6SCWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -63,6 +63,8 @@ CartridgeF6Widget::CartridgeF6Widget(
void CartridgeF6Widget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -63,6 +63,8 @@ CartridgeF8SCWidget::CartridgeF8SCWidget(
void CartridgeF8SCWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -28,7 +28,7 @@ CartridgeF8Widget::CartridgeF8Widget(
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt16 size = 8192;
uInt16 size = 2 * 4096;
ostringstream info;
info << "Standard F8 cartridge, two 4K banks\n"
@ -61,6 +61,8 @@ CartridgeF8Widget::CartridgeF8Widget(
void CartridgeF8Widget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -0,0 +1,80 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include "CartUA.hxx"
#include "PopUpWidget.hxx"
#include "CartUAWidget.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CartridgeUAWidget::CartridgeUAWidget(
GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h, CartridgeUA& cart)
: CartDebugWidget(boss, font, x, y, w, h),
myCart(cart)
{
uInt16 size = 2 * 4096;
ostringstream info;
info << "8K UA cartridge, two 4K banks\n"
<< "Startup bank = " << cart.myStartBank << "\n";
// Eventually, we should query this from the debugger/disassembler
for(uInt32 i = 0, offset = 0xFFC, spot = 0x220; i < 2;
++i, offset += 0x1000, spot += 0x20)
{
uInt16 start = (cart.myImage[offset+1] << 8) | cart.myImage[offset];
start -= start % 0x1000;
info << "Bank " << i << " @ $" << HEX4 << start << " - "
<< "$" << (start + 0xFFF) << " (hotspot = $" << spot << ")\n";
}
int xpos = 10,
ypos = addBaseInformation(size, "UA Limited", info.str()) + myLineHeight;
StringMap items;
items.push_back("0 ($220)", "0");
items.push_back("1 ($240)", "1");
myBank =
new PopUpWidget(boss, font, xpos, ypos-2, font.getStringWidth("0 ($FFx) "),
myLineHeight, items, "Set bank: ",
font.getStringWidth("Set bank: "), kBankChanged);
myBank->setTarget(this);
addFocusWidget(myBank);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeUAWidget::loadConfig()
{
myBank->setSelected(myCart.myCurrentBank);
CartDebugWidget::loadConfig();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeUAWidget::handleCommand(CommandSender* sender,
int cmd, int data, int id)
{
if(cmd == kBankChanged)
{
myCart.unlockBank();
myCart.bank(myBank->getSelected());
myCart.lockBank();
invalidate();
}
}

View File

@ -0,0 +1,46 @@
//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2013 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#ifndef CARTRIDGEUA_WIDGET_HXX
#define CARTRIDGEUA_WIDGET_HXX
class CartridgeUA;
class PopUpWidget;
#include "CartDebugWidget.hxx"
class CartridgeUAWidget : public CartDebugWidget
{
public:
CartridgeUAWidget(GuiObject* boss, const GUI::Font& font,
int x, int y, int w, int h,
CartridgeUA& cart);
virtual ~CartridgeUAWidget() { }
void loadConfig();
void handleCommand(CommandSender* sender, int cmd, int data, int id);
private:
CartridgeUA& myCart;
PopUpWidget* myBank;
enum { kBankChanged = 'bkCH' };
};
#endif

View File

@ -19,14 +19,20 @@ MODULE_OBJS := \
src/debugger/gui/ToggleBitWidget.o \
src/debugger/gui/TogglePixelWidget.o \
src/debugger/gui/ToggleWidget.o \
src/debugger/gui/Cart0840Widget.o \
src/debugger/gui/Cart2KWidget.o \
src/debugger/gui/Cart4KWidget.o \
src/debugger/gui/CartCVWidget.o \
src/debugger/gui/CartEFWidget.o \
src/debugger/gui/CartEFSCWidget.o \
src/debugger/gui/CartF0Widget.o \
src/debugger/gui/CartF4Widget.o \
src/debugger/gui/CartF6Widget.o \
src/debugger/gui/CartF8Widget.o \
src/debugger/gui/CartF4SCWidget.o \
src/debugger/gui/CartF6SCWidget.o \
src/debugger/gui/CartF8SCWidget.o \
src/debugger/gui/CartUAWidget.o \
src/debugger/gui/JoystickWidget.o \
src/debugger/gui/PaddleWidget.o \
src/debugger/gui/BoosterWidget.o \

View File

@ -23,6 +23,9 @@
#include "bspf.hxx"
#include "Cart.hxx"
#include "System.hxx"
#ifdef DEBUGGER_SUPPORT
#include "Cart0840Widget.hxx"
#endif
/**
Cartridge class used for 0840 "Econobanking" 8K bankswitched games. There
@ -32,6 +35,8 @@
*/
class Cartridge0840 : public Cartridge
{
friend class Cartridge0840Widget;
public:
/**
Create a new cartridge using the specified image
@ -118,6 +123,18 @@ class Cartridge0840 : public Cartridge
*/
string name() const { return "Cartridge0840"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new Cartridge0840Widget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address.

View File

@ -24,6 +24,9 @@ class System;
#include "bspf.hxx"
#include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartCVWidget.hxx"
#endif
/**
Cartridge class used for Commavid's extra-RAM games.
@ -37,6 +40,8 @@ class System;
*/
class CartridgeCV : public Cartridge
{
friend class CartridgeCVWidget;
public:
/**
Create a new cartridge using the specified image
@ -123,6 +128,18 @@ class CartridgeCV : public Cartridge
*/
string name() const { return "CartridgeCV"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new CartridgeCVWidget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address

View File

@ -24,6 +24,9 @@ class System;
#include "bspf.hxx"
#include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartEFWidget.hxx"
#endif
/**
Cartridge class used for Homestar Runner by Paul Slocum.
@ -38,6 +41,8 @@ class System;
*/
class CartridgeEF : public Cartridge
{
friend class CartridgeEFWidget;
public:
/**
Create a new cartridge using the specified image
@ -124,6 +129,18 @@ class CartridgeEF : public Cartridge
*/
string name() const { return "CartridgeEF"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new CartridgeEFWidget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address.

View File

@ -35,7 +35,7 @@ CartridgeEFSC::CartridgeEFSC(const uInt8* image, uInt32 size, const Settings& se
registerRamArea(0x1000, 128, 0x80, 0x00);
// Remember startup bank
myStartBank = 1;
myStartBank = 15;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -24,6 +24,9 @@ class System;
#include "bspf.hxx"
#include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartEFSCWidget.hxx"
#endif
/**
Cartridge class used for Homestar Runner by Paul Slocum.
@ -38,6 +41,8 @@ class System;
*/
class CartridgeEFSC : public Cartridge
{
friend class CartridgeEFSCWidget;
public:
/**
Create a new cartridge using the specified image
@ -124,6 +129,18 @@ class CartridgeEFSC : public Cartridge
*/
string name() const { return "CartridgeEFSC"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new CartridgeEFSCWidget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address.

View File

@ -32,7 +32,7 @@ CartridgeF0::CartridgeF0(const uInt8* image, uInt32 size, const Settings& settin
createCodeAccessBase(65536);
// Remember startup bank
myStartBank = 1;
myStartBank = 15;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -43,8 +43,8 @@ CartridgeF0::~CartridgeF0()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeF0::reset()
{
// Upon reset we switch to bank 1
myCurrentBank = 0;
// Upon reset we switch to bank 15
myCurrentBank = 14;
incbank();
}

View File

@ -24,6 +24,9 @@ class System;
#include "bspf.hxx"
#include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartF0Widget.hxx"
#endif
/**
Cartridge class used for Dynacom Megaboy
@ -35,6 +38,8 @@ class System;
*/
class CartridgeF0 : public Cartridge
{
friend class CartridgeF0Widget;
public:
/**
Create a new cartridge using the specified image
@ -121,6 +126,18 @@ class CartridgeF0 : public Cartridge
*/
string name() const { return "CartridgeF0"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new CartridgeF0Widget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address.

View File

@ -23,8 +23,10 @@
class System;
#include "bspf.hxx"
#include "System.hxx"
#include "Cart.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartUAWidget.hxx"
#endif
/**
Cartridge class used for UA Limited's 8K bankswitched games. There
@ -35,6 +37,8 @@ class System;
*/
class CartridgeUA : public Cartridge
{
friend class CartridgeUAWidget;
public:
/**
Create a new cartridge using the specified image
@ -121,6 +125,18 @@ class CartridgeUA : public Cartridge
*/
string name() const { return "CartridgeUA"; }
#ifdef DEBUGGER_SUPPORT
/**
Get debugger widget responsible for accessing the inner workings
of the cart.
*/
CartDebugWidget* debugWidget(GuiObject* boss,
const GUI::Font& font, int x, int y, int w, int h)
{
return new CartridgeUAWidget(boss, font, x, y, w, h, *this);
}
#endif
public:
/**
Get the byte at the specified address.