Compile thumbulator unconditionally.

This commit is contained in:
Christian Speckner 2017-12-10 00:22:18 +01:00
parent c6f13ed743
commit 6500ab0613
11 changed files with 11 additions and 70 deletions

17
configure vendored
View File

@ -22,7 +22,6 @@ _build_sound=yes
_build_debugger=yes
_build_joystick=yes
_build_cheats=yes
_build_thumb=yes
_build_static=no
_build_profile=no
@ -198,8 +197,6 @@ Optional Features:
--disable-joystick
--enable-cheats enable/disable cheatcode support [enabled]
--disable-cheats
--enable-thumb enable/disable Thumb ARM support [enabled]
--disable-thumb
--enable-windowed enable/disable windowed rendering modes [enabled]
--disable-windowed
--enable-shared build shared binary [enabled]
@ -239,8 +236,6 @@ for ac_option in $@; do
--disable-cheats) _build_cheats=no ;;
--enable-windowed) _build_windowed=yes ;;
--disable-windowed) _build_windowed=no ;;
--enable-thumb) _build_thumb=yes ;;
--disable-thumb) _build_thumb=no ;;
--enable-shared) _build_static=no ;;
--enable-static) _build_static=yes ;;
--disable-static) _build_static=no ;;
@ -660,14 +655,6 @@ else
echo
fi
if test "$_build_thumb" = yes ; then
echo_n " Thumb ARM emulation support enabled"
echo
else
echo_n " Thumb ARM emulation support disabled"
echo
fi
if test "$_build_static" = yes ; then
echo_n " Static binary enabled"
echo
@ -779,10 +766,6 @@ if test "$_build_cheats" = yes ; then
INCLUDES="$INCLUDES -I$CHEAT"
fi
if test "$_build_thumb" = yes ; then
DEFINES="$DEFINES -DTHUMB_SUPPORT"
fi
if test "$_build_profile" = no ; then
_build_profile=
fi

View File

@ -63,12 +63,12 @@ CartridgeBUS::CartridgeBUS(const BytePtr& image, uInt32 size,
// Pointer to the display RAM
myDisplayImage = myBUSRAM + DSRAM;
#ifdef THUMB_SUPPORT
// Create Thumbulator ARM emulator
myThumbEmulator = make_unique<Thumbulator>(
reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myBUSRAM),
settings.getBool("thumb.trapfatal"), Thumbulator::ConfigureFor::BUS, this);
#endif
settings.getBool("thumb.trapfatal"), Thumbulator::ConfigureFor::BUS, this
);
setInitialState();
}
@ -107,9 +107,7 @@ void CartridgeBUS::setInitialState()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeBUS::consoleChanged(ConsoleTiming timing)
{
#ifdef THUMB_SUPPORT
myThumbEmulator->setConsoleTiming(timing);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -154,8 +152,7 @@ inline void CartridgeBUS::callFunction(uInt8 value)
{
switch (value)
{
#ifdef THUMB_SUPPORT
// Call user written ARM code (will most likely be C compiled for ARM)
// Call user written ARM code (will most likely be C compiled for ARM)
case 254: // call with IRQ driven audio, no special handling needed at this
// time for Stella as ARM code "runs in zero 6507 cycles".
case 255: // call without IRQ driven audio
@ -176,7 +173,6 @@ inline void CartridgeBUS::callFunction(uInt8 value)
}
}
break;
#endif
}
}

View File

@ -19,9 +19,7 @@
#define CARTRIDGE_BUS_HXX
class System;
#ifdef THUMB_SUPPORT
class Thumbulator;
#endif
class Thumbulator;
#ifdef DEBUGGER_SUPPORT
#include "CartBUSWidget.hxx"
#endif
@ -226,10 +224,8 @@ class CartridgeBUS : public Cartridge
// $1800 - 2K C Variable & Stack
uInt8 myBUSRAM[8192];
#ifdef THUMB_SUPPORT
// Pointer to the Thumb ARM emulator object
unique_ptr<Thumbulator> myThumbEmulator;
#endif
// Indicates the offset into the ROM image (aligns to current bank)
uInt16 myBankOffset;

View File

@ -66,13 +66,12 @@ CartridgeCDF::CartridgeCDF(const BytePtr& image, uInt32 size,
setVersion();
#ifdef THUMB_SUPPORT
// Create Thumbulator ARM emulator
myThumbEmulator = make_unique<Thumbulator>(
reinterpret_cast<uInt16*>(myImage), reinterpret_cast<uInt16*>(myCDFRAM),
settings.getBool("thumb.trapfatal"), myVersion ?
Thumbulator::ConfigureFor::CDF1 : Thumbulator::ConfigureFor::CDF, this);
#endif
setInitialState();
}
@ -112,9 +111,7 @@ void CartridgeCDF::setInitialState()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeCDF::consoleChanged(ConsoleTiming timing)
{
#ifdef THUMB_SUPPORT
myThumbEmulator->setConsoleTiming(timing);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -154,7 +151,6 @@ inline void CartridgeCDF::callFunction(uInt8 value)
{
switch (value)
{
#ifdef THUMB_SUPPORT
// Call user written ARM code (will most likely be C compiled for ARM)
case 254: // call with IRQ driven audio, no special handling needed at this
// time for Stella as ARM code "runs in zero 6507 cycles".
@ -176,7 +172,6 @@ inline void CartridgeCDF::callFunction(uInt8 value)
}
}
break;
#endif
}
}

View File

@ -19,9 +19,7 @@
#define CARTRIDGE_CDF_HXX
class System;
#ifdef THUMB_SUPPORT
class Thumbulator;
#endif
class Thumbulator;
#ifdef DEBUGGER_SUPPORT
#include "CartCDFWidget.hxx"
#endif
@ -221,10 +219,8 @@ class CartridgeCDF : public Cartridge
// $1800 - 2K C Variable & Stack
uInt8 myCDFRAM[8192];
#ifdef THUMB_SUPPORT
// Pointer to the Thumb ARM emulator object
unique_ptr<Thumbulator> myThumbEmulator;
#endif
// Indicates the offset into the ROM image (aligns to current bank)
uInt16 myBankOffset;

View File

@ -52,7 +52,6 @@ CartridgeDPCPlus::CartridgeDPCPlus(const BytePtr& image, uInt32 size,
// Pointer to the Frequency RAM
myFrequencyImage = myDisplayImage + 0x1000;
#ifdef THUMB_SUPPORT
// Create Thumbulator ARM emulator
myThumbEmulator = make_unique<Thumbulator>
(reinterpret_cast<uInt16*>(myImage),
@ -60,7 +59,7 @@ CartridgeDPCPlus::CartridgeDPCPlus(const BytePtr& image, uInt32 size,
settings.getBool("thumb.trapfatal"),
Thumbulator::ConfigureFor::DPCplus,
this);
#endif
setInitialState();
// DPC+ always starts in bank 5
@ -103,9 +102,7 @@ void CartridgeDPCPlus::setInitialState()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeDPCPlus::consoleChanged(ConsoleTiming timing)
{
#ifdef THUMB_SUPPORT
myThumbEmulator->setConsoleTiming(timing);
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -177,7 +174,6 @@ inline void CartridgeDPCPlus::callFunction(uInt8 value)
myDisplayImage[myCounters[myParameter[2]]+i] = myParameter[0];
myParameterPointer = 0;
break;
#ifdef THUMB_SUPPORT
// Call user written ARM code (most likely be C compiled for ARM)
case 254: // call with IRQ driven audio, no special handling needed at this
// time for Stella as ARM code "runs in zero 6507 cycles".
@ -199,7 +195,6 @@ inline void CartridgeDPCPlus::callFunction(uInt8 value)
}
}
break;
#endif
// reserved
}
}

View File

@ -19,9 +19,8 @@
#define CARTRIDGE_DPC_PLUS_HXX
class System;
#ifdef THUMB_SUPPORT
#include "Thumbulator.hxx"
#endif
#include "Thumbulator.hxx"
#ifdef DEBUGGER_SUPPORT
#include "CartDPCPlusWidget.hxx"
#endif
@ -212,10 +211,8 @@ class CartridgeDPCPlus : public Cartridge
// 1K Frequency Data
uInt8 myDPCRAM[8192];
#ifdef THUMB_SUPPORT
// Pointer to the Thumb ARM emulator object
unique_ptr<Thumbulator> myThumbEmulator;
#endif
// Pointer to the 1K frequency table
uInt8* myFrequencyImage;

View File

@ -160,10 +160,8 @@ Settings::Settings(OSystem& osystem)
setInternal("plr.rewind.uncompressed", 30);
setInternal("plr.rewind.interval", 4); // = 1 second
setInternal("plr.rewind.horizon", 5); // = ~10 minutes
#ifdef THUMB_SUPPORT
// Thumb ARM emulation options
setInternal("plr.thumb.trapfatal", "false");
#endif
// developer settings
setInternal("dev.settings", "false");
@ -182,10 +180,8 @@ Settings::Settings(OSystem& osystem)
setInternal("dev.rewind.uncompressed", 60);
setInternal("dev.rewind.interval", 2); // = 1 frame
setInternal("dev.rewind.horizon", 3); // = ~10 seconds
#ifdef THUMB_SUPPORT
// Thumb ARM emulation options
setInternal("dev.thumb.trapfatal", "true");
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -585,10 +581,7 @@ void Settings::usage() const
<< " -dev.tv.jitter <1|0> Enable TV jitter effect\n"
<< " -dev.tv.jitter_recovery <1-20> Set recovery time for TV jitter effect\n"
<< " -dev.tiadriven <1|0> Drive unused TIA pins randomly on a read/peek\n"
#ifdef THUMB_SUPPORT
<< " -dev.thumb.trapfatal <1|0> Determines whether errors in ARM emulation throw an exception\n"
#endif
<< " -dev.thumb.trapfatal <1|0> Determines whether errors in ARM emulation throw an exception\n"
<< endl << std::flush;
}

View File

@ -22,8 +22,6 @@
// Code is public domain and used with the author's consent
//============================================================================
#ifdef THUMB_SUPPORT
#include "bspf.hxx"
#include "Base.hxx"
#include "Cart.hxx"
@ -2361,5 +2359,3 @@ int Thumbulator::reset()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Thumbulator::trapOnFatal = true;
#endif

View File

@ -22,8 +22,6 @@
// Code is public domain and used with the author's consent
//============================================================================
#ifdef THUMB_SUPPORT
#ifndef THUMBULATOR_HXX
#define THUMBULATOR_HXX
@ -162,5 +160,3 @@ class Thumbulator
};
#endif // THUMBULATOR_HXX
#endif

View File

@ -147,12 +147,10 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font)
wid.push_back(myUndrivenPinsWidget);
ypos += lineHeight + VGAP;
#ifdef THUMB_SUPPORT
// Thumb ARM emulation exception
myThumbExceptionWidget = new CheckboxWidget(myTab, font, HBORDER + INDENT * 1, ypos + 1,
"Fatal ARM emulation error throws exception");
wid.push_back(myThumbExceptionWidget);
#endif
// Add items for tab 0
addToFocusList(wid, myTab, tabID);