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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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