Header file fixes for remaining files in 'emucore'.

This commit is contained in:
Stephen Anthony 2017-11-20 15:27:05 -03:30
parent 34dce48414
commit 5b6fabcf3c
18 changed files with 76 additions and 40 deletions

View File

@ -24,7 +24,6 @@ class OSystem;
#include "bspf.hxx" #include "bspf.hxx"
#include "BSType.hxx" #include "BSType.hxx"
#include "Settings.hxx"
/** /**
Auto-detect cart type based on various attributes (file size, signatures, Auto-detect cart type based on various attributes (file size, signatures,

View File

@ -17,6 +17,7 @@
#include <cstdlib> #include <cstdlib>
#include "Event.hxx"
#include "KidVid.hxx" #include "KidVid.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -20,9 +20,10 @@
#include <cstdio> #include <cstdio>
class Event;
#include "bspf.hxx" #include "bspf.hxx"
#include "Control.hxx" #include "Control.hxx"
#include "Event.hxx"
/** /**
The KidVid Voice Module, created by Coleco. This class emulates the The KidVid Voice Module, created by Coleco. This class emulates the

View File

@ -42,6 +42,7 @@
#include "Settings.hxx" #include "Settings.hxx"
#include "Vec.hxx" #include "Vec.hxx"
#include "System.hxx"
#include "M6502.hxx" #include "M6502.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,6 +18,11 @@
#ifndef M6502_HXX #ifndef M6502_HXX
#define M6502_HXX #define M6502_HXX
#include <functional>
class Settings;
class System;
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
class Debugger; class Debugger;
class CpuDebug; class CpuDebug;
@ -27,12 +32,7 @@
#include "TrapArray.hxx" #include "TrapArray.hxx"
#endif #endif
class Settings;
#include <functional>
#include "bspf.hxx" #include "bspf.hxx"
#include "System.hxx"
#include "Serializable.hxx" #include "Serializable.hxx"
/** /**

View File

@ -16,15 +16,12 @@
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
#include <iostream>
#include <bitset>
#include "Console.hxx" #include "Console.hxx"
#include "Settings.hxx" #include "Settings.hxx"
#include "Switches.hxx" #include "Switches.hxx"
#include "System.hxx" #include "System.hxx"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT
//#include "Debugger.hxx"
#include "CartDebug.hxx" #include "CartDebug.hxx"
#endif #endif

View File

@ -20,11 +20,11 @@
class Console; class Console;
class RiotDebug; class RiotDebug;
class System;
class Settings; class Settings;
#include "bspf.hxx" #include "bspf.hxx"
#include "Device.hxx" #include "Device.hxx"
#include "System.hxx"
/** /**
This class models the M6532 RAM-I/O-Timer (aka RIOT) chip in the 2600 This class models the M6532 RAM-I/O-Timer (aka RIOT) chip in the 2600

View File

@ -18,6 +18,7 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include "FSNode.hxx"
#include "MD5.hxx" #include "MD5.hxx"
/* /*

View File

@ -18,7 +18,8 @@
#ifndef MD5_HXX #ifndef MD5_HXX
#define MD5_HXX #define MD5_HXX
#include "FSNode.hxx" class FilesystemNode;
#include "bspf.hxx" #include "bspf.hxx"
namespace MD5 { namespace MD5 {

View File

@ -18,10 +18,9 @@
#include <map> #include <map>
#include "bspf.hxx" #include "bspf.hxx"
#include "FSNode.hxx"
#include "DefProps.hxx" #include "DefProps.hxx"
#include "Props.hxx" #include "Props.hxx"
#include "PropsSet.hxx" #include "PropsSet.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -20,12 +20,12 @@
#include <map> #include <map>
#include "bspf.hxx" class FilesystemNode;
#include "FSNode.hxx"
#include "Props.hxx"
class OSystem; class OSystem;
#include "bspf.hxx"
#include "Props.hxx"
/** /**
This class maintains an ordered collection of properties, maintained This class maintains an ordered collection of properties, maintained
in a C++ map and accessible by ROM md5. The md5 is used since this is in a C++ map and accessible by ROM md5. The md5 is used since this is

View File

@ -66,18 +66,18 @@ class Random : public Serializable
*/ */
bool save(Serializer& out) const override bool save(Serializer& out) const override
{ {
try try
{ {
out.putString(name()); out.putString(name());
out.putInt(myValue); out.putInt(myValue);
} }
catch(...) catch(...)
{ {
cerr << "ERROR: Random::save" << endl; cerr << "ERROR: Random::save" << endl;
return false; return false;
} }
return true; return true;
} }
/** /**

View File

@ -15,6 +15,7 @@
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
//============================================================================ //============================================================================
#include "MT24LC256.hxx"
#include "System.hxx" #include "System.hxx"
#include "SaveKey.hxx" #include "SaveKey.hxx"
@ -35,6 +36,11 @@ SaveKey::SaveKey(Jack jack, const Event& event, const System& system,
{ {
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SaveKey::~SaveKey()
{
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SaveKey::read(DigitalPin pin) bool SaveKey::read(DigitalPin pin)
{ {
@ -77,3 +83,33 @@ void SaveKey::write(DigitalPin pin, bool value)
break; break;
} }
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void SaveKey::reset()
{
myEEPROM->systemReset();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void SaveKey::close()
{
myEEPROM.reset();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void SaveKey::eraseAll()
{
myEEPROM->eraseAll();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void SaveKey::eraseCurrent()
{
myEEPROM->eraseCurrent();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool SaveKey::isPageUsed(const uInt32 page) const
{
return myEEPROM->isPageUsed(page);
}

View File

@ -18,8 +18,9 @@
#ifndef SAVEKEY_HXX #ifndef SAVEKEY_HXX
#define SAVEKEY_HXX #define SAVEKEY_HXX
class MT24LC256;
#include "Control.hxx" #include "Control.hxx"
#include "MT24LC256.hxx"
/** /**
Richard Hutchinson's SaveKey "controller", consisting of a 32KB EEPROM Richard Hutchinson's SaveKey "controller", consisting of a 32KB EEPROM
@ -43,8 +44,7 @@ class SaveKey : public Controller
*/ */
SaveKey(Jack jack, const Event& event, const System& system, SaveKey(Jack jack, const Event& event, const System& system,
const string& eepromfile); const string& eepromfile);
virtual ~SaveKey();
virtual ~SaveKey() = default;
protected: protected:
/** /**
@ -86,21 +86,21 @@ class SaveKey : public Controller
been called. It may be necessary to override this method for been called. It may be necessary to override this method for
controllers that need to know a reset has occurred. controllers that need to know a reset has occurred.
*/ */
void reset() override { myEEPROM->systemReset(); } void reset() override;
/** /**
Force the EEPROM object to cleanup Force the EEPROM object to cleanup
*/ */
void close() override { myEEPROM.reset(); } void close() override;
/** Erase entire EEPROM to known state ($FF) */ /** Erase entire EEPROM to known state ($FF) */
void eraseAll() { myEEPROM->eraseAll(); } void eraseAll();
/** Erase the pages used by the current ROM to known state ($FF) */ /** Erase the pages used by the current ROM to known state ($FF) */
void eraseCurrent() { myEEPROM->eraseCurrent(); } void eraseCurrent();
/** Returns true if the page is used by the current ROM */ /** Returns true if the page is used by the current ROM */
bool isPageUsed(const uInt32 page) const { return myEEPROM->isPageUsed(page); } bool isPageUsed(const uInt32 page) const;
private: private:
// The EEPROM used in the SaveKey // The EEPROM used in the SaveKey

View File

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

View File

@ -27,7 +27,6 @@ class VideoMode;
#include <thread> #include <thread>
#include "FrameManager.hxx"
#include "Rect.hxx" #include "Rect.hxx"
#include "NTSCFilter.hxx" #include "NTSCFilter.hxx"
#include "bspf.hxx" #include "bspf.hxx"

View File

@ -26,6 +26,7 @@
#include "bspf.hxx" #include "bspf.hxx"
#include "Base.hxx" #include "Base.hxx"
#include "Cart.hxx"
#include "Thumbulator.hxx" #include "Thumbulator.hxx"
using Common::Base; using Common::Base;

View File

@ -27,6 +27,8 @@
#ifndef THUMBULATOR_HXX #ifndef THUMBULATOR_HXX
#define THUMBULATOR_HXX #define THUMBULATOR_HXX
class Cartridge;
// FIXME - This code has many instances of shifting into signed integers // FIXME - This code has many instances of shifting into signed integers
// Perhaps the int's should be changed to uInt32 // Perhaps the int's should be changed to uInt32
#ifdef __clang__ #ifdef __clang__
@ -35,7 +37,6 @@
#endif #endif
#include "bspf.hxx" #include "bspf.hxx"
#include "Cart.hxx"
#include "Console.hxx" #include "Console.hxx"
#define ROMADDMASK 0x7FFF #define ROMADDMASK 0x7FFF