Header fixes take 3: cheat, common, debugger directories done.

This commit is contained in:
Stephen Anthony 2017-11-16 14:29:34 -03:30
parent 4610cae973
commit 39f839021e
31 changed files with 112 additions and 81 deletions

View File

@ -103,6 +103,11 @@ CheatCodeDialog::CheatCodeDialog(OSystem& osystem, DialogContainer& parent,
addBGroupToFocusList(wid); addBGroupToFocusList(wid);
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheatCodeDialog::~CheatCodeDialog()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CheatCodeDialog::loadConfig() void CheatCodeDialog::loadConfig()
{ {

View File

@ -26,17 +26,17 @@ class StaticTextWidget;
class CheckListWidget; class CheckListWidget;
class EditTextWidget; class EditTextWidget;
class OptionsDialog; class OptionsDialog;
class InputTextDialog;
class OSystem; class OSystem;
#include "Dialog.hxx" #include "Dialog.hxx"
#include "InputTextDialog.hxx"
class CheatCodeDialog : public Dialog class CheatCodeDialog : public Dialog
{ {
public: public:
CheatCodeDialog(OSystem& osystem, DialogContainer& parent, CheatCodeDialog(OSystem& osystem, DialogContainer& parent,
const GUI::Font& font); const GUI::Font& font);
virtual ~CheatCodeDialog() = default; virtual ~CheatCodeDialog();
protected: protected:
void handleCommand(CommandSender* sender, int cmd, int data, int id) override; void handleCommand(CommandSender* sender, int cmd, int data, int id) override;

View File

@ -15,9 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include <sstream>
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "Cheat.hxx" #include "Cheat.hxx"

View File

@ -15,9 +15,7 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <sstream> #include <ctime>
#include <time.h>
#include <fstream>
#include "SDL_lib.hxx" #include "SDL_lib.hxx"
#include "bspf.hxx" #include "bspf.hxx"

View File

@ -19,10 +19,10 @@
#define MOUSE_CONTROL_HXX #define MOUSE_CONTROL_HXX
class Console; class Console;
class Controller;
class Properties; class Properties;
#include "bspf.hxx" #include "bspf.hxx"
#include "Control.hxx"
/** /**
The mouse can control various virtual 'controllers' in many different The mouse can control various virtual 'controllers' in many different

View File

@ -15,7 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include <cmath> #include <cmath>
#include "bspf.hxx" #include "bspf.hxx"

View File

@ -24,7 +24,6 @@ class FrameBuffer;
class FBSurface; class FBSurface;
class Properties; class Properties;
#include <fstream>
#include "bspf.hxx" #include "bspf.hxx"
/** /**

View File

@ -18,8 +18,6 @@
#ifndef SOUND_NULL_HXX #ifndef SOUND_NULL_HXX
#define SOUND_NULL_HXX #define SOUND_NULL_HXX
class OSystem;
#include "bspf.hxx" #include "bspf.hxx"
#include "Sound.hxx" #include "Sound.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"

View File

@ -21,6 +21,8 @@
#include <array> #include <array>
#include <functional> #include <functional>
#include "bspf.hxx"
/** /**
* Simple fixed size stack class. * Simple fixed size stack class.
*/ */

View File

@ -15,8 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <sstream>
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "Console.hxx" #include "Console.hxx"
@ -25,6 +23,7 @@
#include "Switches.hxx" #include "Switches.hxx"
#include "System.hxx" #include "System.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"
#include "RewindManager.hxx"
#include "StateManager.hxx" #include "StateManager.hxx"
@ -41,6 +40,11 @@ StateManager::StateManager(OSystem& osystem)
reset(); reset();
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
StateManager::~StateManager()
{
}
#if 0 #if 0
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StateManager::toggleRecordMode() void StateManager::toggleRecordMode()

View File

@ -19,8 +19,8 @@
#define STATE_MANAGER_HXX #define STATE_MANAGER_HXX
class OSystem; class OSystem;
class RewindManager;
#include "RewindManager.hxx"
#include "Serializer.hxx" #include "Serializer.hxx"
/** /**
@ -44,6 +44,7 @@ class StateManager
Create a new statemananger class. Create a new statemananger class.
*/ */
StateManager(OSystem& osystem); StateManager(OSystem& osystem);
~StateManager();
public: public:
/** /**

View File

@ -18,7 +18,6 @@
#ifndef ZIP_HANDLER_HXX #ifndef ZIP_HANDLER_HXX
#define ZIP_HANDLER_HXX #define ZIP_HANDLER_HXX
#include <fstream>
#include "bspf.hxx" #include "bspf.hxx"
/*************************************************************************** /***************************************************************************

View File

@ -40,6 +40,7 @@ using uInt64 = uint64_t;
// types: cout, cerr, string, ostream, istream, etc. // types: cout, cerr, string, ostream, istream, etc.
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
#include <fstream>
#include <iomanip> #include <iomanip>
#include <memory> #include <memory>
#include <string> #include <string>

View File

@ -15,13 +15,10 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include "bspf.hxx"
#include <iostream>
#include <fstream>
#include <sstream>
#include <map> #include <map>
#include "bspf.hxx"
#include "Version.hxx" #include "Version.hxx"
#include "OSystem.hxx" #include "OSystem.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
@ -30,6 +27,7 @@
#include "DebuggerDialog.hxx" #include "DebuggerDialog.hxx"
#include "DebuggerParser.hxx" #include "DebuggerParser.hxx"
#include "StateManager.hxx" #include "StateManager.hxx"
#include "RewindManager.hxx"
#include "Console.hxx" #include "Console.hxx"
#include "System.hxx" #include "System.hxx"
@ -388,6 +386,55 @@ bool Debugger::writeTrap(uInt16 t)
return writeTraps().isInitialized() && writeTraps().isSet(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) uInt32 Debugger::getBaseAddress(uInt32 addr, bool read)
{ {

View File

@ -32,6 +32,7 @@ class PromptWidget;
class ButtonWidget; class ButtonWidget;
class M6502; class M6502;
class System;
class CartDebug; class CartDebug;
class CpuDebug; class CpuDebug;
class RiotDebug; class RiotDebug;
@ -45,7 +46,6 @@ class RewindManager;
#include "DialogContainer.hxx" #include "DialogContainer.hxx"
#include "DebuggerDialog.hxx" #include "DebuggerDialog.hxx"
#include "FrameBufferConstants.hxx" #include "FrameBufferConstants.hxx"
#include "System.hxx"
#include "bspf.hxx" #include "bspf.hxx"
using FunctionMap = std::map<string, unique_ptr<Expression>>; using FunctionMap = std::map<string, unique_ptr<Expression>>;
@ -209,31 +209,18 @@ class Debugger : public DialogContainer
static Debugger& debugger() { return *myStaticDebugger; } static Debugger& debugger() { return *myStaticDebugger; }
/** Convenience methods to access peek/poke from System */ /** Convenience methods to access peek/poke from System */
uInt8 peek(uInt16 addr, uInt8 flags = 0) { uInt8 peek(uInt16 addr, uInt8 flags = 0);
return mySystem.peek(addr, flags); uInt16 dpeek(uInt16 addr, uInt8 flags = 0);
} void poke(uInt16 addr, uInt8 value, uInt8 flags = 0);
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);
}
/** Convenience method to access the 6502 from System */ /** 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. */ /** These are now exposed so Expressions can use them. */
int peekAsInt(int addr, uInt8 flags = 0) { int peekAsInt(int addr, uInt8 flags = 0);
return mySystem.peek(uInt16(addr), flags); int dpeekAsInt(int addr, uInt8 flags = 0);
} int getAccessFlags(uInt16 addr) const;
int dpeekAsInt(int addr, uInt8 flags = 0) { void setAccessFlags(uInt16 addr, uInt8 flags);
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); }
void setBreakPoint(uInt16 bp, bool set); void setBreakPoint(uInt16 bp, bool set);
uInt32 getBaseAddress(uInt32 addr, bool read); uInt32 getBaseAddress(uInt32 addr, bool read);

View File

@ -15,7 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include "bspf.hxx" #include "bspf.hxx"
#include "Dialog.hxx" #include "Dialog.hxx"

View File

@ -19,7 +19,6 @@
#define DEBUGGER_PARSER_HXX #define DEBUGGER_PARSER_HXX
#include <functional> #include <functional>
#include <sstream>
#include <set> #include <set>
class Debugger; class Debugger;

View File

@ -19,7 +19,6 @@
#define DISTELLA_HXX #define DISTELLA_HXX
#include <queue> #include <queue>
#include <sstream>
#include "Base.hxx" #include "Base.hxx"
#include "CartDebug.hxx" #include "CartDebug.hxx"

View File

@ -15,10 +15,9 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <sstream>
#include "System.hxx" #include "System.hxx"
#include "TIA.hxx" #include "TIA.hxx"
#include "M6532.hxx"
#include "Debugger.hxx" #include "Debugger.hxx"
#include "Switches.hxx" #include "Switches.hxx"
@ -194,6 +193,30 @@ uInt8 RiotDebug::tim1024T(int newVal)
return mySystem.m6532().myOutTimer[3]; 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 Controller& RiotDebug::controller(Controller::Jack jack) const
{ {

View File

@ -18,10 +18,10 @@
#ifndef RIOT_DEBUG_HXX #ifndef RIOT_DEBUG_HXX
#define RIOT_DEBUG_HXX #define RIOT_DEBUG_HXX
class M6532;
class Debugger; class Debugger;
class RiotDebug; class RiotDebug;
#include "M6532.hxx"
#include "DebuggerSystem.hxx" #include "DebuggerSystem.hxx"
class RiotState : public DebuggerState class RiotState : public DebuggerState
@ -69,10 +69,10 @@ class RiotDebug : public DebuggerSystem
uInt8 tim8T(int newVal = -1); uInt8 tim8T(int newVal = -1);
uInt8 tim64T(int newVal = -1); uInt8 tim64T(int newVal = -1);
uInt8 tim1024T(int newVal = -1); uInt8 tim1024T(int newVal = -1);
uInt8 intim() const { return mySystem.m6532().intim(); } uInt8 intim() const;
uInt8 timint() const { return mySystem.m6532().timint(); } uInt8 timint() const;
Int32 timClocks() const { return mySystem.m6532().timerClocks(); } Int32 timClocks() const;
Int32 intimClocks() const { return mySystem.m6532().intimClocks(); } Int32 intimClocks() const;
/* Controller ports */ /* Controller ports */
Controller& controller(Controller::Jack jack) const; Controller& controller(Controller::Jack jack) const;

View File

@ -15,10 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <iostream>
#include <fstream>
#include <algorithm>
#include "ScrollBarWidget.hxx" #include "ScrollBarWidget.hxx"
#include "FrameBuffer.hxx" #include "FrameBuffer.hxx"
#include "EventHandler.hxx" #include "EventHandler.hxx"

View File

@ -18,9 +18,6 @@
#ifndef CARTRIDGE_HXX #ifndef CARTRIDGE_HXX
#define CARTRIDGE_HXX #define CARTRIDGE_HXX
#include <fstream>
#include <sstream>
class Cartridge; class Cartridge;
class Properties; class Properties;
class CartDebugWidget; class CartDebugWidget;

View File

@ -18,10 +18,9 @@
#ifndef CARTRIDGEUA_HXX #ifndef CARTRIDGEUA_HXX
#define CARTRIDGEUA_HXX #define CARTRIDGEUA_HXX
class System;
#include "bspf.hxx" #include "bspf.hxx"
#include "Cart.hxx" #include "Cart.hxx"
#include "System.hxx"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
#include "CartUAWidget.hxx" #include "CartUAWidget.hxx"
#endif #endif

View File

@ -16,10 +16,7 @@
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
#include <iostream>
#include <sstream>
#include <stdexcept> #include <stdexcept>
#include <fstream>
#include "AtariVox.hxx" #include "AtariVox.hxx"
#include "Booster.hxx" #include "Booster.hxx"

View File

@ -16,7 +16,6 @@
//============================================================================ //============================================================================
#include <cstdio> #include <cstdio>
#include <fstream>
#include "System.hxx" #include "System.hxx"
#include "MT24LC256.hxx" #include "MT24LC256.hxx"

View File

@ -16,8 +16,6 @@
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
#include <sstream>
#include <fstream>
#include <ctime> #include <ctime>
#ifdef HAVE_GETTIMEOFDAY #ifdef HAVE_GETTIMEOFDAY

View File

@ -15,8 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include <sstream>
#include <map> #include <map>
#include "bspf.hxx" #include "bspf.hxx"

View File

@ -15,9 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include <sstream>
#include "FSNode.hxx" #include "FSNode.hxx"
#include "Serializer.hxx" #include "Serializer.hxx"

View File

@ -16,9 +16,6 @@
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
#include <sstream>
#include <fstream>
#include <algorithm>
#include "bspf.hxx" #include "bspf.hxx"

View File

@ -15,8 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include "bspf.hxx" #include "bspf.hxx"
#include "Dialog.hxx" #include "Dialog.hxx"

View File

@ -15,8 +15,6 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include <fstream>
#include "bspf.hxx" #include "bspf.hxx"
#include "FSNode.hxx" #include "FSNode.hxx"
#include "HomeFinder.hxx" #include "HomeFinder.hxx"