diff --git a/src/debugger/gui/CartFEWidget.cxx b/src/debugger/gui/CartFEWidget.cxx new file mode 100644 index 000000000..87631d547 --- /dev/null +++ b/src/debugger/gui/CartFEWidget.cxx @@ -0,0 +1,42 @@ +//============================================================================ +// +// 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 "CartFE.hxx" +#include "CartFEWidget.hxx" + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +CartridgeFEWidget::CartridgeFEWidget( + GuiObject* boss, const GUI::Font& font, + int x, int y, int w, int h, CartridgeFE& cart) + : CartDebugWidget(boss, font, x, y, w, h) +{ + uInt16 size = 2 * 4096; + + ostringstream info; + info << "FE cartridge, two 4K banks\n" + << "Doesn't support bankswitching with hotspots,\n" + << "but instead watches A13 of called addresses:\n" + << "Bank 0 @ $F000 - $FFFF (A13 = 1)\n" + << "Bank 1 @ $D000 - $DFFF (A13 = 0)\n" + << "\n" + << "Changing banks is not supported, since it\n" + << "would immediately switch on the next address\n"; + + addBaseInformation(size, "Activision", info.str()); +} diff --git a/src/debugger/gui/CartFEWidget.hxx b/src/debugger/gui/CartFEWidget.hxx new file mode 100644 index 000000000..24d6d3648 --- /dev/null +++ b/src/debugger/gui/CartFEWidget.hxx @@ -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 CARTRIDGEFE_WIDGET_HXX +#define CARTRIDGEFE_WIDGET_HXX + +class CartridgeFE; +#include "CartDebugWidget.hxx" + +class CartridgeFEWidget : public CartDebugWidget +{ + public: + CartridgeFEWidget(GuiObject* boss, const GUI::Font& font, + int x, int y, int w, int h, + CartridgeFE& cart); + virtual ~CartridgeFEWidget() { } + + // No implementation for non-bankswitched ROMs + void loadConfig() { } + void handleCommand(CommandSender* sender, int cmd, int data, int id) { } +}; + +#endif diff --git a/src/debugger/gui/module.mk b/src/debugger/gui/module.mk index ee5805907..9d53dfc70 100644 --- a/src/debugger/gui/module.mk +++ b/src/debugger/gui/module.mk @@ -30,13 +30,14 @@ MODULE_OBJS := \ src/debugger/gui/CartEFWidget.o \ src/debugger/gui/CartEFSCWidget.o \ src/debugger/gui/CartF0Widget.o \ - src/debugger/gui/CartFAWidget.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/CartFAWidget.o \ + src/debugger/gui/CartFEWidget.o \ src/debugger/gui/CartSBWidget.o \ src/debugger/gui/CartUAWidget.o \ src/debugger/gui/CartX07Widget.o \ diff --git a/src/emucore/CartFE.hxx b/src/emucore/CartFE.hxx index ffbd78aab..3f7e43a20 100644 --- a/src/emucore/CartFE.hxx +++ b/src/emucore/CartFE.hxx @@ -24,6 +24,9 @@ class System; #include "bspf.hxx" #include "Cart.hxx" +#ifdef DEBUGGER_SUPPORT + #include "CartFEWidget.hxx" +#endif /** Bankswitching method used by Activision's Robot Tank and Decathlon. @@ -49,6 +52,8 @@ class System; */ class CartridgeFE : public Cartridge { + friend class CartridgeFEWidget; + public: /** Create a new cartridge using the specified image @@ -143,6 +148,18 @@ class CartridgeFE : public Cartridge */ string name() const { return "CartridgeFE"; } + #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 CartridgeFEWidget(boss, font, x, y, w, h, *this); + } + #endif + public: /** Get the byte at the specified address.