diff --git a/src/cheat/CheatCodeDialog.cxx b/src/cheat/CheatCodeDialog.cxx index b94fbe5ce..03fe7282a 100644 --- a/src/cheat/CheatCodeDialog.cxx +++ b/src/cheat/CheatCodeDialog.cxx @@ -103,6 +103,11 @@ CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent, addBGroupToFocusList(wid); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +CheatCodeDialog::~CheatCodeDialog() +{ +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CheatCodeDialog::loadConfig() { diff --git a/src/cheat/CheatCodeDialog.hxx b/src/cheat/CheatCodeDialog.hxx index 27490ee84..fb1d28711 100644 --- a/src/cheat/CheatCodeDialog.hxx +++ b/src/cheat/CheatCodeDialog.hxx @@ -26,17 +26,17 @@ class StaticTextWidget; class CheckListWidget; class EditTextWidget; class OptionsDialog; +class InputTextDialog; class OSystem; #include "Dialog.hxx" -#include "InputTextDialog.hxx" class CheatCodeDialog : public Dialog { public: CheatCodeDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font); - virtual ~CheatCodeDialog() = default; + virtual ~CheatCodeDialog(); protected: void handleCommand(CommandSender* sender, int cmd, int data, int id) override; diff --git a/src/cheat/CheatManager.cxx b/src/cheat/CheatManager.cxx index 1c94aaca4..f245b372d 100644 --- a/src/cheat/CheatManager.cxx +++ b/src/cheat/CheatManager.cxx @@ -15,9 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include - #include "OSystem.hxx" #include "Console.hxx" #include "Cheat.hxx" diff --git a/src/common/FrameBufferSDL2.cxx b/src/common/FrameBufferSDL2.cxx index 304f628ca..bfd6dbaae 100644 --- a/src/common/FrameBufferSDL2.cxx +++ b/src/common/FrameBufferSDL2.cxx @@ -15,9 +15,7 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include -#include +#include #include "SDL_lib.hxx" #include "bspf.hxx" diff --git a/src/common/MouseControl.hxx b/src/common/MouseControl.hxx index 994d3f92a..6e0860bc7 100644 --- a/src/common/MouseControl.hxx +++ b/src/common/MouseControl.hxx @@ -19,10 +19,10 @@ #define MOUSE_CONTROL_HXX class Console; +class Controller; class Properties; #include "bspf.hxx" -#include "Control.hxx" /** The mouse can control various virtual 'controllers' in many different diff --git a/src/common/PNGLibrary.cxx b/src/common/PNGLibrary.cxx index 48db0d95e..ab7298712 100644 --- a/src/common/PNGLibrary.cxx +++ b/src/common/PNGLibrary.cxx @@ -15,7 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include #include #include "bspf.hxx" diff --git a/src/common/PNGLibrary.hxx b/src/common/PNGLibrary.hxx index 1ee6c6ffd..b75ef4e1b 100644 --- a/src/common/PNGLibrary.hxx +++ b/src/common/PNGLibrary.hxx @@ -24,7 +24,6 @@ class FrameBuffer; class FBSurface; class Properties; -#include #include "bspf.hxx" /** diff --git a/src/common/SoundNull.hxx b/src/common/SoundNull.hxx index ba4f5f909..0189153f6 100644 --- a/src/common/SoundNull.hxx +++ b/src/common/SoundNull.hxx @@ -18,8 +18,6 @@ #ifndef SOUND_NULL_HXX #define SOUND_NULL_HXX -class OSystem; - #include "bspf.hxx" #include "Sound.hxx" #include "OSystem.hxx" diff --git a/src/common/Stack.hxx b/src/common/Stack.hxx index dfa58b4ee..2f25fd222 100644 --- a/src/common/Stack.hxx +++ b/src/common/Stack.hxx @@ -21,6 +21,8 @@ #include #include +#include "bspf.hxx" + /** * Simple fixed size stack class. */ diff --git a/src/common/StateManager.cxx b/src/common/StateManager.cxx index dbfdd8425..f41d940d7 100644 --- a/src/common/StateManager.cxx +++ b/src/common/StateManager.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include - #include "OSystem.hxx" #include "Settings.hxx" #include "Console.hxx" @@ -25,6 +23,7 @@ #include "Switches.hxx" #include "System.hxx" #include "Serializable.hxx" +#include "RewindManager.hxx" #include "StateManager.hxx" @@ -41,6 +40,11 @@ StateManager::StateManager(OSystem& osystem) reset(); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +StateManager::~StateManager() +{ +} + #if 0 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void StateManager::toggleRecordMode() diff --git a/src/common/StateManager.hxx b/src/common/StateManager.hxx index a88a16d60..21de3f564 100644 --- a/src/common/StateManager.hxx +++ b/src/common/StateManager.hxx @@ -19,8 +19,8 @@ #define STATE_MANAGER_HXX class OSystem; +class RewindManager; -#include "RewindManager.hxx" #include "Serializer.hxx" /** @@ -44,6 +44,7 @@ class StateManager Create a new statemananger class. */ StateManager(OSystem& osystem); + ~StateManager(); public: /** diff --git a/src/common/ZipHandler.hxx b/src/common/ZipHandler.hxx index c8a95f096..3570781fe 100644 --- a/src/common/ZipHandler.hxx +++ b/src/common/ZipHandler.hxx @@ -18,7 +18,6 @@ #ifndef ZIP_HANDLER_HXX #define ZIP_HANDLER_HXX -#include #include "bspf.hxx" /*************************************************************************** diff --git a/src/common/bspf.hxx b/src/common/bspf.hxx index ecee0afb4..6b5a55be8 100644 --- a/src/common/bspf.hxx +++ b/src/common/bspf.hxx @@ -40,6 +40,7 @@ using uInt64 = uint64_t; // types: cout, cerr, string, ostream, istream, etc. #include #include +#include #include #include #include diff --git a/src/debugger/Debugger.cxx b/src/debugger/Debugger.cxx index f365939c5..c8e39d48a 100644 --- a/src/debugger/Debugger.cxx +++ b/src/debugger/Debugger.cxx @@ -15,13 +15,10 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include "bspf.hxx" - -#include -#include -#include #include +#include "bspf.hxx" + #include "Version.hxx" #include "OSystem.hxx" #include "FrameBuffer.hxx" @@ -30,6 +27,7 @@ #include "DebuggerDialog.hxx" #include "DebuggerParser.hxx" #include "StateManager.hxx" +#include "RewindManager.hxx" #include "Console.hxx" #include "System.hxx" @@ -388,6 +386,55 @@ bool Debugger::writeTrap(uInt16 t) return writeTraps().isInitialized() && writeTraps().isSet(t); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +uInt8 Debugger::peek(uInt16 addr, uInt8 flags) +{ + return mySystem.peek(addr, flags); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +uInt16 Debugger::dpeek(uInt16 addr, uInt8 flags) +{ + return uInt16(mySystem.peek(addr, flags) | (mySystem.peek(addr+1, flags) << 8)); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Debugger::poke(uInt16 addr, uInt8 value, uInt8 flags) +{ + mySystem.poke(addr, value, flags); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +M6502& Debugger::m6502() const +{ + return mySystem.m6502(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +int Debugger::peekAsInt(int addr, uInt8 flags) +{ + return mySystem.peek(uInt16(addr), flags); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +int Debugger::dpeekAsInt(int addr, uInt8 flags) +{ + return mySystem.peek(uInt16(addr), flags) | + (mySystem.peek(uInt16(addr+1), flags) << 8); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +int Debugger::getAccessFlags(uInt16 addr) const +{ + return mySystem.getAccessFlags(addr); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +void Debugger::setAccessFlags(uInt16 addr, uInt8 flags) +{ + mySystem.setAccessFlags(addr, flags); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt32 Debugger::getBaseAddress(uInt32 addr, bool read) { diff --git a/src/debugger/Debugger.hxx b/src/debugger/Debugger.hxx index 727427a82..31a17330d 100644 --- a/src/debugger/Debugger.hxx +++ b/src/debugger/Debugger.hxx @@ -32,6 +32,7 @@ class PromptWidget; class ButtonWidget; class M6502; +class System; class CartDebug; class CpuDebug; class RiotDebug; @@ -45,7 +46,6 @@ class RewindManager; #include "DialogContainer.hxx" #include "DebuggerDialog.hxx" #include "FrameBufferConstants.hxx" -#include "System.hxx" #include "bspf.hxx" using FunctionMap = std::map>; @@ -209,31 +209,18 @@ class Debugger : public DialogContainer static Debugger& debugger() { return *myStaticDebugger; } /** Convenience methods to access peek/poke from System */ - uInt8 peek(uInt16 addr, uInt8 flags = 0) { - return mySystem.peek(addr, flags); - } - uInt16 dpeek(uInt16 addr, uInt8 flags = 0) { - return uInt16(mySystem.peek(addr, flags) | (mySystem.peek(addr+1, flags) << 8)); - } - void poke(uInt16 addr, uInt8 value, uInt8 flags = 0) { - mySystem.poke(addr, value, flags); - } + uInt8 peek(uInt16 addr, uInt8 flags = 0); + uInt16 dpeek(uInt16 addr, uInt8 flags = 0); + void poke(uInt16 addr, uInt8 value, uInt8 flags = 0); /** Convenience method to access the 6502 from System */ - M6502& m6502() const { return mySystem.m6502(); } + M6502& m6502() const; /** These are now exposed so Expressions can use them. */ - int peekAsInt(int addr, uInt8 flags = 0) { - return mySystem.peek(uInt16(addr), flags); - } - int dpeekAsInt(int addr, uInt8 flags = 0) { - return mySystem.peek(uInt16(addr), flags) | - (mySystem.peek(uInt16(addr+1), flags) << 8); - } - int getAccessFlags(uInt16 addr) const - { return mySystem.getAccessFlags(addr); } - void setAccessFlags(uInt16 addr, uInt8 flags) - { mySystem.setAccessFlags(addr, flags); } + int peekAsInt(int addr, uInt8 flags = 0); + int dpeekAsInt(int addr, uInt8 flags = 0); + int getAccessFlags(uInt16 addr) const; + void setAccessFlags(uInt16 addr, uInt8 flags); void setBreakPoint(uInt16 bp, bool set); uInt32 getBaseAddress(uInt32 addr, bool read); diff --git a/src/debugger/DebuggerParser.cxx b/src/debugger/DebuggerParser.cxx index 8646171e6..2c65f5ede 100644 --- a/src/debugger/DebuggerParser.cxx +++ b/src/debugger/DebuggerParser.cxx @@ -15,7 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include #include "bspf.hxx" #include "Dialog.hxx" diff --git a/src/debugger/DebuggerParser.hxx b/src/debugger/DebuggerParser.hxx index 9638100c3..c451d71bb 100644 --- a/src/debugger/DebuggerParser.hxx +++ b/src/debugger/DebuggerParser.hxx @@ -19,7 +19,6 @@ #define DEBUGGER_PARSER_HXX #include -#include #include class Debugger; diff --git a/src/debugger/DiStella.hxx b/src/debugger/DiStella.hxx index c5adce185..47d168f41 100644 --- a/src/debugger/DiStella.hxx +++ b/src/debugger/DiStella.hxx @@ -19,7 +19,6 @@ #define DISTELLA_HXX #include -#include #include "Base.hxx" #include "CartDebug.hxx" diff --git a/src/debugger/RiotDebug.cxx b/src/debugger/RiotDebug.cxx index 2603ba60b..ee30734a2 100644 --- a/src/debugger/RiotDebug.cxx +++ b/src/debugger/RiotDebug.cxx @@ -15,10 +15,9 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include - #include "System.hxx" #include "TIA.hxx" +#include "M6532.hxx" #include "Debugger.hxx" #include "Switches.hxx" @@ -194,6 +193,30 @@ uInt8 RiotDebug::tim1024T(int newVal) return mySystem.m6532().myOutTimer[3]; } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +uInt8 RiotDebug::intim() const +{ + return mySystem.m6532().intim(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +uInt8 RiotDebug::timint() const +{ + return mySystem.m6532().timint(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Int32 RiotDebug::timClocks() const +{ + return mySystem.m6532().timerClocks(); +} + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Int32 RiotDebug::intimClocks() const +{ + return mySystem.m6532().intimClocks(); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Controller& RiotDebug::controller(Controller::Jack jack) const { diff --git a/src/debugger/RiotDebug.hxx b/src/debugger/RiotDebug.hxx index b570d3316..b0027a6a2 100644 --- a/src/debugger/RiotDebug.hxx +++ b/src/debugger/RiotDebug.hxx @@ -18,10 +18,10 @@ #ifndef RIOT_DEBUG_HXX #define RIOT_DEBUG_HXX +class M6532; class Debugger; class RiotDebug; -#include "M6532.hxx" #include "DebuggerSystem.hxx" class RiotState : public DebuggerState @@ -69,10 +69,10 @@ class RiotDebug : public DebuggerSystem uInt8 tim8T(int newVal = -1); uInt8 tim64T(int newVal = -1); uInt8 tim1024T(int newVal = -1); - uInt8 intim() const { return mySystem.m6532().intim(); } - uInt8 timint() const { return mySystem.m6532().timint(); } - Int32 timClocks() const { return mySystem.m6532().timerClocks(); } - Int32 intimClocks() const { return mySystem.m6532().intimClocks(); } + uInt8 intim() const; + uInt8 timint() const; + Int32 timClocks() const; + Int32 intimClocks() const; /* Controller ports */ Controller& controller(Controller::Jack jack) const; diff --git a/src/debugger/gui/PromptWidget.cxx b/src/debugger/gui/PromptWidget.cxx index 94fd69d4c..c63220db7 100644 --- a/src/debugger/gui/PromptWidget.cxx +++ b/src/debugger/gui/PromptWidget.cxx @@ -15,10 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include -#include - #include "ScrollBarWidget.hxx" #include "FrameBuffer.hxx" #include "EventHandler.hxx" diff --git a/src/emucore/Cart.hxx b/src/emucore/Cart.hxx index cd6e175d3..cc18301ad 100644 --- a/src/emucore/Cart.hxx +++ b/src/emucore/Cart.hxx @@ -18,9 +18,6 @@ #ifndef CARTRIDGE_HXX #define CARTRIDGE_HXX -#include -#include - class Cartridge; class Properties; class CartDebugWidget; diff --git a/src/emucore/CartUA.hxx b/src/emucore/CartUA.hxx index 0ff1bfd26..64c5321d3 100644 --- a/src/emucore/CartUA.hxx +++ b/src/emucore/CartUA.hxx @@ -18,10 +18,9 @@ #ifndef CARTRIDGEUA_HXX #define CARTRIDGEUA_HXX -class System; - #include "bspf.hxx" #include "Cart.hxx" +#include "System.hxx" #ifdef DEBUGGER_SUPPORT #include "CartUAWidget.hxx" #endif diff --git a/src/emucore/Console.cxx b/src/emucore/Console.cxx index 033f0b459..6b79dfd55 100644 --- a/src/emucore/Console.cxx +++ b/src/emucore/Console.cxx @@ -16,10 +16,7 @@ //============================================================================ #include -#include -#include #include -#include #include "AtariVox.hxx" #include "Booster.hxx" diff --git a/src/emucore/MT24LC256.cxx b/src/emucore/MT24LC256.cxx index 8c31ebfcf..b25122aab 100644 --- a/src/emucore/MT24LC256.cxx +++ b/src/emucore/MT24LC256.cxx @@ -16,7 +16,6 @@ //============================================================================ #include -#include #include "System.hxx" #include "MT24LC256.hxx" diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx index 69ac30530..159663f7f 100644 --- a/src/emucore/OSystem.cxx +++ b/src/emucore/OSystem.cxx @@ -16,8 +16,6 @@ //============================================================================ #include -#include -#include #include #ifdef HAVE_GETTIMEOFDAY diff --git a/src/emucore/PropsSet.cxx b/src/emucore/PropsSet.cxx index d9393645e..4a80e7956 100644 --- a/src/emucore/PropsSet.cxx +++ b/src/emucore/PropsSet.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include #include #include "bspf.hxx" diff --git a/src/emucore/Serializer.cxx b/src/emucore/Serializer.cxx index 193560649..84b10c212 100644 --- a/src/emucore/Serializer.cxx +++ b/src/emucore/Serializer.cxx @@ -15,9 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include -#include - #include "FSNode.hxx" #include "Serializer.hxx" diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 8a7d0101c..a7df0ff2c 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -16,9 +16,6 @@ //============================================================================ #include -#include -#include -#include #include "bspf.hxx" diff --git a/src/gui/LoggerDialog.cxx b/src/gui/LoggerDialog.cxx index d34b6a860..1e35db96a 100644 --- a/src/gui/LoggerDialog.cxx +++ b/src/gui/LoggerDialog.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include - #include "bspf.hxx" #include "Dialog.hxx" diff --git a/src/windows/OSystemWINDOWS.cxx b/src/windows/OSystemWINDOWS.cxx index 4ae497cff..c1a8674f7 100644 --- a/src/windows/OSystemWINDOWS.cxx +++ b/src/windows/OSystemWINDOWS.cxx @@ -15,8 +15,6 @@ // this file, and for a DISCLAIMER OF ALL WARRANTIES. //============================================================================ -#include - #include "bspf.hxx" #include "FSNode.hxx" #include "HomeFinder.hxx"