Stub implementation of new core.

This commit is contained in:
Christian Speckner 2016-11-08 01:26:57 +01:00
parent ffccc351f6
commit a99a4e1efd
11 changed files with 374 additions and 15 deletions

3
configure vendored
View File

@ -697,7 +697,7 @@ CHEAT="$SRC/cheat"
LIBPNG="$SRC/libpng"
ZLIB="$SRC/zlib"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI -I$TIA_CORE_DEFAULT"
INCLUDES="-I$CORE -I$COMMON -I$TV -I$GUI"
INCLUDES="$INCLUDES `$_sdlconfig --cflags`"
if test "$_build_static" = yes ; then
@ -758,7 +758,6 @@ fi
if test "$_build_6502ts_tia" = yes ; then
DEFINES="$DEFINES -DSUPPORT_6502TS_TIA"
MODULES="$MODULES $TIA_6502TS"
INCLUDES="$INCLUDES -I$TIA_6502TS"
fi
if test "$_build_joystick" = yes ; then

View File

@ -28,7 +28,6 @@
#include "Font.hxx"
#include "OSystem.hxx"
#include "Settings.hxx"
#include "TIA.hxx"
#include "FBSurfaceSDL2.hxx"
#include "FrameBufferSDL2.hxx"

View File

@ -25,7 +25,7 @@
#include <SDL.h>
#include "TIASnd.hxx"
#include "TIATables.hxx"
#include "TIATypes.hxx"
#include "FrameBuffer.hxx"
#include "Settings.hxx"
#include "System.hxx"

View File

@ -47,7 +47,6 @@
#include "Sound.hxx"
#include "Switches.hxx"
#include "System.hxx"
#include "TIA.hxx"
#include "TrackBall.hxx"
#include "FrameBuffer.hxx"
#include "OSystem.hxx"
@ -56,6 +55,12 @@
#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
@ -554,7 +559,7 @@ AbstractTIA* Console::createTIA()
if (coreType == "6502ts") {
myOSystem.logMessage("using 6502.ts TIA core", 1);
return 0;
return new TIA6502tsCore::TIA(*this, myOSystem.sound(), myOSystem.settings());
}
ostringstream buffer;

View File

@ -0,0 +1,220 @@
//============================================================================
//
// 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$
//============================================================================
#include "TIA.hxx"
#include "TIATypes.hxx"
namespace TIA6502tsCore {
// TODO: stub
TIA::TIA(Console& console, Sound& sound, Settings& settings)
: myConsole(console),
mySound(sound),
mySettings(settings)
{}
// TODO: stub
void TIA::reset()
{}
// TODO: stub
void TIA::systemCyclesReset()
{}
// TODO: stub
void TIA::install(System& system)
{}
// TODO: stub
bool TIA::save(Serializer& out) const
{
return true;
}
// TODO: stub
bool TIA::load(Serializer& in)
{
return true;
}
// TODO: stub
uInt8 TIA::peek(uInt16 address)
{
return 0;
}
// TODO: stub
bool TIA::poke(uInt16 address, uInt8 value)
{
return false;
}
// TODO: stub
void TIA::installDelegate(System& system, Device& device)
{}
// TODO: stub
void TIA::frameReset()
{}
// TODO: stub
bool TIA::saveDisplay(Serializer& out) const
{
return true;
}
// TODO: stub
bool TIA::loadDisplay(Serializer& in)
{
return true;
}
// TODO: stub
void TIA::update()
{}
// TODO: stub
uInt8* TIA::currentFrameBuffer() const
{
return 0;
}
// TODO: stub
uInt8* TIA::previousFrameBuffer() const
{
return 0;
}
// TODO: stub
uInt32 TIA::height() const
{
return 0;
}
// TODO: stub
uInt32 TIA::ystart() const
{
return 0;
}
// TODO: stub
void TIA::setHeight(uInt32 height)
{}
// TODO: stub
void TIA::setYStart(uInt32 ystart)
{}
// TODO: stub
void TIA::enableAutoFrame(bool enabled)
{}
// TODO: stub
void TIA::enableColorLoss(bool enabled)
{}
// TODO: stub
bool TIA::isPAL() const
{
return false;
}
// TODO: stub
uInt32 TIA::clocksThisLine() const
{
return 0;
}
// TODO: stub
uInt32 TIA::scanlines() const
{
return 0;
}
// TODO: stub
bool TIA::partialFrame() const
{
return false;
}
// TODO: stub
uInt32 TIA::startScanline() const
{
return 0;
}
// TODO: stub
bool TIA::scanlinePos(uInt16& x, uInt16& y) const
{
return 0;
}
// TODO: stub
bool TIA::toggleBit(TIABit b, uInt8 mode)
{
return false;
}
// TODO: stub
bool TIA::toggleBits()
{
return false;
}
// TODO: stub
bool TIA::toggleCollision(TIABit b, uInt8 mode)
{
return false;
}
// TODO: stub
bool TIA::toggleCollisions()
{
return false;
}
// TODO: stub
bool TIA::toggleHMOVEBlank()
{
return false;
}
// TODO: stub
bool TIA::toggleFixedColors(uInt8 mode)
{
return false;
}
// TODO: stub
bool TIA::driveUnusedPinsRandom(uInt8 mode)
{
return false;
}
// TODO: stub
bool TIA::toggleJitter(uInt8 mode)
{
return false;
}
// TODO: stub
void TIA::setJitterRecoveryFactor(Int32 f)
{}
} // namespace TIA6502tsCore

View File

@ -0,0 +1,137 @@
//============================================================================
//
// 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 TIA_6502TS_CORE
#define TIA_6502TS_CORE
#include "bspf.hxx"
#include "AbstractTIA.hxx"
#include "Sound.hxx"
#include "Settings.hxx"
#include "TIATypes.hxx"
class Console;
namespace TIA6502tsCore {
class TIA : public AbstractTIA {
public:
TIA(Console& console, Sound& sound, Settings& settings);
virtual ~TIA() = default;
public:
void reset() override;
void systemCyclesReset() override;
void install(System& system) override;
bool save(Serializer& out) const override;
bool load(Serializer& in) override;
string name() const override
{
return "TIA";
}
uInt8 peek(uInt16 address) override;
bool poke(uInt16 address, uInt8 value) override;
void installDelegate(System& system, Device& device) override;
void frameReset() override;
bool saveDisplay(Serializer& out) const override;
bool loadDisplay(Serializer& in) override;
void update() override;
uInt8* currentFrameBuffer() const override;
uInt8* previousFrameBuffer() const override;
uInt32 height() const override;
uInt32 ystart() const override;
void setHeight(uInt32 height) override;
void setYStart(uInt32 ystart) override;
void enableAutoFrame(bool enabled) override;
void enableColorLoss(bool enabled) override;
bool isPAL() const override;
uInt32 clocksThisLine() const override;
uInt32 scanlines() const override;
bool partialFrame() const override;
uInt32 startScanline() const override;
bool scanlinePos(uInt16& x, uInt16& y) const override;
bool toggleBit(TIABit b, uInt8 mode = 2) override;
bool toggleBits() override;
bool toggleCollision(TIABit b, uInt8 mode = 2) override;
bool toggleCollisions() override;
bool toggleHMOVEBlank() override;
bool toggleFixedColors(uInt8 mode = 2) override;
bool driveUnusedPinsRandom(uInt8 mode = 2) override;
bool toggleJitter(uInt8 mode = 2) override;
void setJitterRecoveryFactor(Int32 f) override;
private:
Console& myConsole;
Sound& mySound;
Settings& mySettings;
private:
TIA() = delete;
TIA(const TIA&) = delete;
TIA(TIA&&) = delete;
TIA& operator=(const TIA&) = delete;
TIA& operator=(TIA&&) = delete;
};
} // namespace TIA6502tsCore
#endif // TIA_6502TS_CORE

View File

@ -1,6 +1,7 @@
MODULE := src/emucore/tia/core_6502ts
MODULE_OBJS :=
MODULE_OBJS := \
src/emucore/tia/core_6502ts/TIA.o
MODULE_DIRS += \
src/emucore/tia/core_6502ts

View File

@ -17,8 +17,8 @@
// $Id$
//============================================================================
#ifndef TIA_HXX
#define TIA_HXX
#ifndef TIA_DEFAULT_CORE_HXX
#define TIA_DEFAULT_CORE_HXX
class Console;
class Settings;
@ -48,8 +48,6 @@ namespace TIADefaultCore {
class TIA : public AbstractTIA
{
public:
friend class TIADebug;
friend class RiotDebug;
/**
Create a new TIA for the specified console

View File

@ -17,8 +17,8 @@
// $Id$
//============================================================================
#ifndef TIA_TABLES_HXX
#define TIA_TABLES_HXX
#ifndef TIA_DEFAULT_CORE_TABLES_HXX
#define TIA_DEFAULT_CORE_TABLES_HXX
#include "bspf.hxx"
#include "TIATypes.hxx"

View File

@ -18,7 +18,7 @@
//============================================================================
#include "Console.hxx"
#include "TIA.hxx"
#include "AbstractTIA.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 "TIA.hxx"
#include "AbstractTIA.hxx"
#include "Settings.hxx"
#include "Widget.hxx"
#include "TabWidget.hxx"