Made new TIA core the default (code now compiles).

This commit is contained in:
Stephen Anthony 2016-12-10 13:38:28 -03:30
parent 4b5a02903e
commit 4d0147f3d1
55 changed files with 91 additions and 359 deletions

View File

@ -94,7 +94,7 @@ MODULES := $(MODULES)
# After the game specific modules follow the shared modules
MODULES += \
src/emucore \
src/emucore/tia/core_default \
src/emucore/tia \
src/gui \
src/common \
src/common/tv_filters

25
configure vendored
View File

@ -26,7 +26,6 @@ _build_cheats=yes
_build_thumb=yes
_build_static=no
_build_profile=no
_build_6502ts_tia=yes
# more defaults
_ranlib=ranlib
@ -196,8 +195,6 @@ Optional Features:
--disable-sound
--enable-debugger enable/disable all debugger options [disabled]
--disable-debugger
--enable-6502ts-tia enable/disable support for 6502.ts TIA core [enabled]
--disable-6502ts-tia
--enable-joystick enable/disable joystick support [enabled]
--disable-joystick
--enable-cheats enable/disable cheatcode support [enabled]
@ -238,8 +235,6 @@ for ac_option in $@; do
--disable-sound) _build_sound=no ;;
--enable-debugger) _build_debugger=yes ;;
--disable-debugger) _build_debugger=no ;;
--enable-6502ts-tia) _build_6502ts_tia=yes;;
--disable-6502ts-tia) _build_6502ts_tia=no ;;
--enable-joystick) _build_joystick=yes ;;
--disable-joystick) _build_joystick=no ;;
--enable-cheats) _build_cheats=yes ;;
@ -620,15 +615,7 @@ else
echo
fi
if test "$_build_6502ts_tia" = "yes" ; then
echo_n " Support for 6502.ts TIA core enabled"
echo
else
echo_n " Support for 6502.ts TIA core disabled"
echo
fi
if test "$_build_6502ts_tia" = yes ; then
if test "$_build_joystick" = yes ; then
echo_n " Joystick support enabled"
echo
else
@ -685,19 +672,18 @@ find_sdlconfig
SRC="src"
CORE="$SRC/emucore"
TIA_CORE_DEFAULT="$SRC/emucore/tia/core_default"
COMMON="$SRC/common"
TIA="$SRC/emucore/tia"
TV="$SRC/common/tv_filters"
GUI="$SRC/gui"
DBG="$SRC/debugger"
TIA_6502TS="$SRC/emucore/tia/core_6502ts"
DBGGUI="$SRC/debugger/gui"
YACC="$SRC/yacc"
CHEAT="$SRC/cheat"
LIBPNG="$SRC/libpng"
ZLIB="$SRC/zlib"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA"
INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
if test "$_build_static" = yes ; then
@ -755,11 +741,6 @@ if test "$_build_debugger" = yes ; then
INCLUDES="$INCLUDES -I$DBG -I$DBGGUI -I$YACC"
fi
if test "$_build_6502ts_tia" = yes ; then
DEFINES="$DEFINES -DSUPPORT_6502TS_TIA"
MODULES="$MODULES $TIA_6502TS"
fi
if test "$_build_joystick" = yes ; then
DEFINES="$DEFINES -DJOYSTICK_SUPPORT"
fi

View File

@ -37,7 +37,6 @@
#include "System.hxx"
#include "M6502.hxx"
#include "Cart.hxx"
#include "AbstractTIA.hxx"
#include "CartDebug.hxx"
#include "CartDebugWidget.hxx"
@ -56,6 +55,7 @@
#include "PackedBitArray.hxx"
#include "YaccParser.hxx"
#include "TIA.hxx"
#include "Debugger.hxx"
Debugger* Debugger::myStaticDebugger = nullptr;

View File

@ -20,7 +20,7 @@
#include <sstream>
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Debugger.hxx"
#include "Switches.hxx"

View File

@ -20,7 +20,7 @@
#include "Base.hxx"
#include "System.hxx"
#include "Debugger.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "TIADebug.hxx"

View File

@ -22,7 +22,7 @@
class Debugger;
class TiaDebug;
class AbstractTIA;
class TIA;
#include "DebuggerSystem.hxx"
@ -52,7 +52,7 @@ class TIADebug : public DebuggerSystem
{
public:
TIADebug(Debugger& dbg, Console& console);
AbstractTIA& tia() const { return myTIA; }
TIA& tia() const { return myTIA; }
const DebuggerState& getState() override;
const DebuggerState& getOldState() override { return myOldState; }
@ -172,7 +172,7 @@ class TIADebug : public DebuggerSystem
TiaState myState;
TiaState myOldState;
AbstractTIA& myTIA;
TIA& myTIA;
string nusizStrings[8];

View File

@ -29,7 +29,7 @@
#include "DebuggerParser.hxx"
#include "TIADebug.hxx"
#include "TIASurface.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "TiaOutputWidget.hxx"

View File

@ -24,7 +24,7 @@
#include "GuiObject.hxx"
#include "OSystem.hxx"
#include "CartDebug.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "TIADebug.hxx"
#include "ToggleBitWidget.hxx"
#include "TogglePixelWidget.hxx"

View File

@ -19,7 +19,7 @@
#include "OSystem.hxx"
#include "Console.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "FrameBuffer.hxx"
#include "Widget.hxx"
#include "GuiObject.hxx"

View File

@ -1,105 +0,0 @@
//============================================================================
//
// 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-2016 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 ABSTRACT_TIA_HXX
#define ABSTRACT_TIA_HXX
#include "bspf.hxx"
#include "Device.hxx"
#include "Serializer.hxx"
#include "System.hxx"
#include "TIATypes.hxx"
class AbstractTIA: public Device
{
public:
virtual ~AbstractTIA() = default;
virtual void installDelegate(System& system, Device& device) = 0;
virtual void frameReset() = 0;
virtual bool saveDisplay(Serializer& out) const = 0;
virtual bool loadDisplay(Serializer& in) = 0;
virtual void update() = 0;
virtual uInt8* currentFrameBuffer() const = 0;
virtual uInt8* previousFrameBuffer() const = 0;
virtual uInt32 width() const { return 160; }
virtual uInt32 height() const = 0;
virtual uInt32 ystart() const = 0;
virtual void setHeight(uInt32 height) = 0;
virtual void setYStart(uInt32 ystart) = 0;
virtual void enableAutoFrame(bool enabled) = 0;
virtual void enableColorLoss(bool enabled) = 0;
virtual bool isPAL() const = 0;
virtual uInt32 clocksThisLine() const = 0;
virtual uInt32 scanlines() const = 0;
virtual bool partialFrame() const = 0;
virtual uInt32 startScanline() const = 0;
virtual bool scanlinePos(uInt16& x, uInt16& y) const = 0;
virtual bool toggleBit(TIABit b, uInt8 mode = 2) = 0;
virtual bool toggleBits() = 0;
virtual bool toggleCollision(TIABit b, uInt8 mode = 2) = 0;
virtual bool toggleCollisions() = 0;
virtual bool toggleFixedColors(uInt8 mode = 2) = 0;
virtual bool driveUnusedPinsRandom(uInt8 mode = 2) = 0;
virtual bool toggleJitter(uInt8 mode = 2) = 0;
virtual void setJitterRecoveryFactor(Int32 f) = 0;
#ifdef DEBUGGER_SUPPORT
virtual void updateScanline() = 0;
virtual void updateScanlineByStep() = 0;
virtual void updateScanlineByTrace(int targetAddress) = 0;
#endif
protected:
AbstractTIA() {}
};
#endif

View File

@ -18,7 +18,7 @@
//============================================================================
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Cart3E.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,7 +18,7 @@
//============================================================================
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Cart3EPlus.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,7 +18,7 @@
//============================================================================
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Cart3F.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -19,7 +19,7 @@
#include "System.hxx"
#include "M6532.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Cart4A50.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,7 +18,7 @@
//============================================================================
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "CartCVPlus.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -18,7 +18,7 @@
//============================================================================
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "CartDASH.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -17,7 +17,7 @@
// $Id$
//============================================================================
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "M6502.hxx"
#include "System.hxx"
#include "CartWD.hxx"

View File

@ -19,7 +19,7 @@
#include "System.hxx"
#include "M6532.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "CartX07.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -39,6 +39,7 @@
#include "CompuMate.hxx"
#include "M6502.hxx"
#include "M6532.hxx"
#include "TIA.hxx"
#include "Paddles.hxx"
#include "Props.hxx"
#include "PropsSet.hxx"
@ -55,12 +56,6 @@
#include "Serializable.hxx"
#include "Version.hxx"
#include "tia/core_default/TIA.hxx"
#ifdef SUPPORT_6502TS_TIA
#include "tia/core_6502ts/TIA.hxx"
#endif
#ifdef DEBUGGER_SUPPORT
#include "Debugger.hxx"
#endif
@ -89,7 +84,7 @@ Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
// Create subsystems for the console
my6502 = make_ptr<M6502>(myOSystem.settings());
myRiot = make_ptr<M6532>(*this, myOSystem.settings());
myTIA = unique_ptr<AbstractTIA>(createTIA());
myTIA = make_ptr<TIA>(*this, myOSystem.sound(), myOSystem.settings());
mySwitches = make_ptr<Switches>(myEvent, myProperties);
// Construct the system and components
@ -545,31 +540,6 @@ void Console::changeHeight(int direction)
myProperties.set(Display_Height, val.str());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AbstractTIA* Console::createTIA()
{
#ifdef SUPPORT_6502TS_TIA
string coreType = myOSystem.settings().getString("tia.core");
#else
string coreType = "default";
#endif
if (coreType == "default") {
myOSystem.logMessage("using default TIA core", 1);
return new TIADefaultCore::TIA(*this, myOSystem.sound(), myOSystem.settings());
}
if (coreType == "6502ts") {
myOSystem.logMessage("using 6502.ts TIA core", 1);
return new TIA6502tsCore::TIA(*this, myOSystem.sound(), myOSystem.settings());
}
ostringstream buffer;
buffer << "invalid TIA core type " << coreType;
throw new runtime_error(buffer.str());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::setTIAProperties()
{

View File

@ -23,7 +23,7 @@
class Event;
class Switches;
class System;
class AbstractTIA;
class TIA;
class M6502;
class M6532;
class Cartridge;
@ -91,7 +91,7 @@ class Console : public Serializable
@return The TIA
*/
AbstractTIA& tia() const { return *myTIA; }
TIA& tia() const { return *myTIA; }
/**
Get the properties being used by the game
@ -285,12 +285,6 @@ class Console : public Serializable
void toggleJitter() const;
private:
/**
Create the TIA
*/
AbstractTIA* createTIA();
/**
Sets various properties of the TIA (YStart, Height, etc) based on
the current display format.
@ -345,7 +339,7 @@ class Console : public Serializable
unique_ptr<M6532> myRiot;
// Pointer to the TIA object
unique_ptr<AbstractTIA> myTIA;
unique_ptr<TIA> myTIA;
// Pointer to the Cartridge (the debugger needs it)
unique_ptr<Cartridge> myCart;

View File

@ -35,7 +35,7 @@
#include "Menu.hxx"
#include "OSystem.hxx"
#include "Settings.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "FBSurface.hxx"
#include "TIASurface.hxx"

View File

@ -48,9 +48,6 @@ Settings::Settings(OSystem& osystem)
setInternal("uimessages", "true");
// TIA specific options
#ifdef SUPPORT_6502TS_TIA
setInternal("tia.core", "6502ts");
#endif
setInternal("tia.zoom", "2");
setInternal("tia.inter", "false");
setInternal("tia.aspectn", "90");
@ -327,12 +324,6 @@ void Settings::validate()
i = getInt("loglevel");
if(i < 0 || i > 2)
setInternal("loglevel", "1");
#ifdef SUPPORT_6502TS_TIA
s = getString("tia.core");
if (s != "6502ts" && s != "default") setInternal("tia.core", "6502ts");
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -373,10 +364,6 @@ void Settings::usage() const
<< " -freq <number> Set sound sample output frequency (11025|22050|31400|44100|48000)\n"
<< " -volume <number> Set the volume (0 - 100)\n"
<< endl
#endif
#ifdef SUPPORT_6502TS_TIA
<< " -tia.core <default|\n"
<< " 6502ts> Select the TIA core\n"
#endif
<< " -tia.zoom <zoom> Use the specified zoom level (windowed mode) for TIA image\n"
<< " -tia.inter <1|0> Enable interpolated (smooth) scaling for TIA image\n"

View File

@ -23,13 +23,13 @@
#include "Device.hxx"
#include "M6502.hxx"
#include "M6532.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Cart.hxx"
#include "System.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
System::System(const OSystem& osystem, M6502& m6502, M6532& m6532,
AbstractTIA& mTIA, Cartridge& mCart)
TIA& mTIA, Cartridge& mCart)
: myOSystem(osystem),
myM6502(m6502),
myM6532(m6532),

View File

@ -23,7 +23,7 @@
class Device;
class M6502;
class M6532;
class AbstractTIA;
class TIA;
class NullDevice;
#include "bspf.hxx"
@ -53,7 +53,7 @@ class System : public Serializable
pages of 2^6 bytes.
*/
System(const OSystem& osystem, M6502& m6502, M6532& m6532,
AbstractTIA& mTIA, Cartridge& mCart);
TIA& mTIA, Cartridge& mCart);
virtual ~System() = default;
// Mask to apply to an address before accessing memory
@ -109,7 +109,7 @@ class System : public Serializable
@return The attached TIA device
*/
AbstractTIA& tia() const { return myTIA; }
TIA& tia() const { return myTIA; }
/**
Answer the random generator attached to the system.
@ -389,7 +389,7 @@ class System : public Serializable
M6532& myM6532;
// TIA device attached to the system
AbstractTIA& myTIA;
TIA& myTIA;
// Cartridge device attached to the system
Cartridge& myCart;

View File

@ -23,7 +23,7 @@
#include "Settings.hxx"
#include "OSystem.hxx"
#include "Console.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "TIASurface.hxx"

View File

@ -20,7 +20,7 @@
#ifndef TIASURFACE_HXX
#define TIASURFACE_HXX
class AbstractTIA;
class TIA;
class Console;
class OSystem;
class FrameBuffer;
@ -137,7 +137,7 @@ class TIASurface
private:
OSystem& myOSystem;
FrameBuffer& myFB;
AbstractTIA* myTIA;
TIA* myTIA;
shared_ptr<FBSurface> myTiaSurface, mySLineSurface, myBaseTiaSurface;

View File

@ -21,7 +21,7 @@
#include "Event.hxx"
#include "System.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "TrackBall.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -19,8 +19,6 @@
#include "Background.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Background::Background()
{
@ -99,5 +97,3 @@ bool Background::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "Serializable.hxx"
#include "bspf.hxx"
namespace TIA6502tsCore {
class Background : public Serializable
{
public:
@ -61,6 +59,4 @@ class Background : public Serializable
Background& operator=(Background&&);
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_BACKGROUND

View File

@ -23,8 +23,6 @@ enum Count: Int8 {
renderCounterOffset = -4
};
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ball::Ball(uInt32 collisionMask)
: myCollisionMaskDisabled(collisionMask),
@ -247,5 +245,3 @@ bool Ball::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "Serializable.hxx"
#include "bspf.hxx"
namespace TIA6502tsCore {
class Ball : public Serializable
{
public:
@ -117,6 +115,4 @@ class Ball : public Serializable
Ball& operator=(Ball&&);
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_BALL

View File

@ -19,8 +19,6 @@
#include "DelayQueue.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DelayQueue::DelayQueue(uInt8 length, uInt8 size)
: myIndex(0)
@ -60,5 +58,3 @@ void DelayQueue::reset()
memset(myIndices, 0xFF, 0xFF);
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "bspf.hxx"
#include "DelayQueueMember.hxx"
namespace TIA6502tsCore {
class DelayQueue
{
public:
@ -72,6 +70,4 @@ template<class T> void DelayQueue::execute(T executor)
myIndex = (myIndex + 1) % myMembers.size();
}
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_DELAY_QUEUE

View File

@ -19,8 +19,6 @@
#include "DelayQueueMember.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DelayQueueMember::DelayQueueMember(uInt8 size)
: myEntries(size),
@ -51,5 +49,3 @@ void DelayQueueMember::remove(uInt8 address)
mySize--;
}
}
} // namespace TIA6502tsCore

View File

@ -22,8 +22,6 @@
#include "bspf.hxx"
namespace TIA6502tsCore {
class DelayQueueMember
{
public:
@ -72,6 +70,4 @@ class DelayQueueMember
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_DELAY_QUEUE_MEMBER

View File

@ -21,8 +21,6 @@
#include "DrawCounterDecodes.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const uInt8* const* DrawCounterDecodes::playerDecodes() const
{
@ -81,5 +79,3 @@ DrawCounterDecodes::DrawCounterDecodes()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DrawCounterDecodes DrawCounterDecodes::myInstance;
} // namespace TIA6502tsCore

View File

@ -22,8 +22,6 @@
#include "bspf.hxx"
namespace TIA6502tsCore {
class DrawCounterDecodes
{
public:
@ -56,6 +54,4 @@ class DrawCounterDecodes
DrawCounterDecodes& operator=(DrawCounterDecodes&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_DRAW_COUNTER_DECODES

View File

@ -37,8 +37,6 @@ static constexpr uInt32
frameLinesNTSC = Metrics::vsync + Metrics::vblankNTSC + Metrics::kernelNTSC + Metrics::overscanNTSC,
frameLinesPAL = Metrics::vsync + Metrics::vblankPAL + Metrics::kernelPAL + Metrics::overscanPAL;
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameManager::FrameManager()
: myMode(TvMode::pal)
@ -286,5 +284,3 @@ bool FrameManager::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -26,8 +26,6 @@
#include "Types.hxx"
#include "bspf.hxx"
namespace TIA6502tsCore {
class FrameManager : public Serializable
{
public:
@ -115,6 +113,4 @@ class FrameManager : public Serializable
FrameManager& operator=(FrameManager&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_FRAME_MANAGER

View File

@ -19,8 +19,6 @@
#include "LatchedInput.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LatchedInput::LatchedInput()
{
@ -57,5 +55,3 @@ uInt8 LatchedInput::inpt(bool pinState)
return value;
}
} // namespace TIA6502tsCore

View File

@ -22,8 +22,6 @@
#include "bspf.hxx"
namespace TIA6502tsCore {
class LatchedInput
{
public:
@ -50,6 +48,4 @@ class LatchedInput
LatchedInput& operator=(LatchedInput&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_LATCHED_INPUT

View File

@ -24,8 +24,6 @@ enum Count: Int8 {
renderCounterOffset = -4
};
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Missile::Missile(uInt32 collisionMask)
: myCollisionMaskDisabled(collisionMask),
@ -251,5 +249,3 @@ bool Missile::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -24,8 +24,6 @@
#include "bspf.hxx"
#include "Player.hxx"
namespace TIA6502tsCore {
class Missile : public Serializable
{
public:
@ -115,6 +113,4 @@ class Missile : public Serializable
Missile& operator=(Missile&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_MISSILE

View File

@ -29,8 +29,6 @@ static constexpr double
static constexpr double TRIPPOINT_LINES = 380;
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PaddleReader::PaddleReader()
{
@ -106,5 +104,3 @@ void PaddleReader::updateCharge(double timestamp)
myTimestamp = timestamp;
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "bspf.hxx"
#include "Types.hxx"
namespace TIA6502tsCore {
class PaddleReader
{
public:
@ -68,6 +66,4 @@ class PaddleReader
PaddleReader& operator=(PaddleReader&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_PADDLE_READER

View File

@ -24,8 +24,6 @@ enum Count: Int8 {
renderCounterOffset = -5
};
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Player::Player(uInt32 collisionMask)
: myCollisionMaskDisabled(collisionMask),
@ -350,5 +348,3 @@ bool Player::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "Serializable.hxx"
#include "bspf.hxx"
namespace TIA6502tsCore {
class Player : public Serializable
{
public:
@ -121,6 +119,4 @@ class Player : public Serializable
Player& operator=(Player&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_PLAYER

View File

@ -19,8 +19,6 @@
#include "Playfield.hxx"
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Playfield::Playfield(uInt32 collisionMask)
: myCollisionMaskDisabled(collisionMask),
@ -231,5 +229,3 @@ bool Playfield::load(Serializer& in)
return false;
}
} // namespace TIA6502tsCore

View File

@ -23,8 +23,6 @@
#include "Serializable.hxx"
#include "bspf.hxx"
namespace TIA6502tsCore {
class Playfield : public Serializable
{
public:
@ -117,6 +115,4 @@ class Playfield : public Serializable
Playfield& operator=(Playfield&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_PLAYFIELD

View File

@ -53,8 +53,6 @@ enum DummyRegisters: uInt8 {
shuffleP1 = 0xF1
};
namespace TIA6502tsCore {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TIA::TIA(Console& console, Sound& sound, Settings& settings)
: myConsole(console),
@ -1237,5 +1235,3 @@ void TIA::updatePaddle(uInt8 idx)
myPaddleReaders[idx].update(double(resistance) / MAX_RESISTANCE, myTimestamp, myFrameManager.tvMode());
}
} // namespace TIA6502tsCore

View File

@ -21,9 +21,10 @@
#define TIA_6502TS_CORE_TIA
#include "bspf.hxx"
#include "AbstractTIA.hxx"
#include "Sound.hxx"
#include "Settings.hxx"
#include "Device.hxx"
#include "Serializer.hxx"
#include "TIATypes.hxx"
#include "DelayQueue.hxx"
#include "FrameManager.hxx"
@ -37,8 +38,6 @@
class Console;
namespace TIA6502tsCore {
/**
This class is a device that emulates the Television Interface Adaptor
found in the Atari 2600 and 7800 consoles. The Television Interface
@ -53,9 +52,12 @@ namespace TIA6502tsCore {
@author Christian Speckner (DirtyHairy) and Stephen Anthony
@version $Id$
*/
class TIA : public AbstractTIA
class TIA : public Device
{
public:
friend class TIADebug;
friend class RiotDebug;
/**
Create a new TIA for the specified console
@ -73,7 +75,7 @@ class TIA : public AbstractTIA
/**
Reset frame to current YStart/Height properties
*/
void frameReset() override;
void frameReset();
void systemCyclesReset() override;
@ -83,69 +85,70 @@ class TIA : public AbstractTIA
bool poke(uInt16 address, uInt8 value) override;
void installDelegate(System& system, Device& device) override;
void installDelegate(System& system, Device& device);
bool saveDisplay(Serializer& out) const override;
bool saveDisplay(Serializer& out) const;
bool loadDisplay(Serializer& in) override;
bool loadDisplay(Serializer& in);
void update() override;
void update();
/**
Answers the current and previous frame buffer pointers
*/
uInt8* currentFrameBuffer() const override {
uInt8* currentFrameBuffer() const {
return myCurrentFrameBuffer.get();
}
uInt8* previousFrameBuffer() const override {
uInt8* previousFrameBuffer() const {
return myPreviousFrameBuffer.get();
}
/**
Answers vertical info about the framebuffer (height and starting line)
Answers dimensional info about the framebuffer
*/
uInt32 height() const override;
uInt32 ystart() const override;
uInt32 width() const { return 160; }
uInt32 height() const;
uInt32 ystart() const;
/**
Changes the current Height/YStart properties.
Note that calls to these method(s) must be eventually followed by
::frameReset() for the changes to take effect.
*/
void setHeight(uInt32 height) override;
void setYStart(uInt32 ystart) override;
void setHeight(uInt32 height);
void setYStart(uInt32 ystart);
void enableAutoFrame(bool enabled) override;
void enableAutoFrame(bool enabled);
void enableColorLoss(bool enabled) override;
void enableColorLoss(bool enabled);
bool isPAL() const override;
bool isPAL() const;
uInt32 clocksThisLine() const override;
uInt32 clocksThisLine() const;
uInt32 scanlines() const override;
uInt32 scanlines() const;
bool partialFrame() const override;
bool partialFrame() const;
uInt32 startScanline() const override;
uInt32 startScanline() const;
bool scanlinePos(uInt16& x, uInt16& y) const override;
bool scanlinePos(uInt16& x, uInt16& y) const;
bool toggleBit(TIABit b, uInt8 mode = 2) override;
bool toggleBit(TIABit b, uInt8 mode = 2);
bool toggleBits() override;
bool toggleBits();
bool toggleCollision(TIABit b, uInt8 mode = 2) override;
bool toggleCollision(TIABit b, uInt8 mode = 2);
bool toggleCollisions() override;
bool toggleCollisions();
bool toggleFixedColors(uInt8 mode = 2) override;
bool toggleFixedColors(uInt8 mode = 2);
bool driveUnusedPinsRandom(uInt8 mode = 2) override;
bool driveUnusedPinsRandom(uInt8 mode = 2);
bool toggleJitter(uInt8 mode = 2) override;
bool toggleJitter(uInt8 mode = 2);
void setJitterRecoveryFactor(Int32 f) override;
void setJitterRecoveryFactor(Int32 f);
// Clear both internal TIA buffers to black (palette color 0)
void clearBuffers();
@ -154,19 +157,19 @@ class TIA : public AbstractTIA
/**
This method should be called to update the TIA with a new scanline.
*/
void updateScanline() override;
void updateScanline();
/**
This method should be called to update the TIA with a new partial
scanline by stepping one CPU instruction.
*/
void updateScanlineByStep() override;
void updateScanlineByStep();
/**
This method should be called to update the TIA with a new partial
scanline by tracing to target address.
*/
void updateScanlineByTrace(int target) override;
void updateScanlineByTrace(int target);
#endif
/**
@ -308,6 +311,4 @@ class TIA : public AbstractTIA
TIA& operator=(TIA&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_TIA

View File

@ -20,12 +20,8 @@
#ifndef TIA_6502TS_CORE_TYPES
#define TIA_6502TS_CORE_TYPES
namespace TIA6502tsCore {
enum TvMode {
pal, ntsc
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE_TYPES

View File

@ -1,22 +1,22 @@
MODULE := src/emucore/tia/core_6502ts
MODULE := src/emucore/tia
MODULE_OBJS := \
src/emucore/tia/core_6502ts/TIA.o \
src/emucore/tia/core_6502ts/DelayQueueMember.o \
src/emucore/tia/core_6502ts/DelayQueue.o \
src/emucore/tia/core_6502ts/FrameManager.o \
src/emucore/tia/core_6502ts/Playfield.o \
src/emucore/tia/core_6502ts/DrawCounterDecodes.o \
src/emucore/tia/core_6502ts/Missile.o \
src/emucore/tia/core_6502ts/Player.o \
src/emucore/tia/core_6502ts/Ball.o \
src/emucore/tia/core_6502ts/Background.o \
src/emucore/tia/core_6502ts/LatchedInput.o \
src/emucore/tia/core_6502ts/PaddleReader.o
src/emucore/tia/TIA.o \
src/emucore/tia/DelayQueueMember.o \
src/emucore/tia/DelayQueue.o \
src/emucore/tia/FrameManager.o \
src/emucore/tia/Playfield.o \
src/emucore/tia/DrawCounterDecodes.o \
src/emucore/tia/Missile.o \
src/emucore/tia/Player.o \
src/emucore/tia/Ball.o \
src/emucore/tia/Background.o \
src/emucore/tia/LatchedInput.o \
src/emucore/tia/PaddleReader.o
MODULE_DIRS += \
src/emucore/tia/core_6502ts
src/emucore/tia
# Include common rules
include $(srcdir)/common.rules

View File

@ -18,7 +18,7 @@
//============================================================================
#include "Console.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Switches.hxx"
#include "DialogContainer.hxx"
#include "Dialog.hxx"

View File

@ -28,7 +28,7 @@
#include "EditTextWidget.hxx"
#include "PopUpWidget.hxx"
#include "Console.hxx"
#include "AbstractTIA.hxx"
#include "TIA.hxx"
#include "Settings.hxx"
#include "Widget.hxx"
#include "TabWidget.hxx"