From 6500ab0613c9d00d3cdf219399362890ea7e3199 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sun, 10 Dec 2017 00:22:18 +0100 Subject: [PATCH] Compile thumbulator unconditionally. --- configure | 17 ----------------- src/emucore/CartBUS.cxx | 12 ++++-------- src/emucore/CartBUS.hxx | 6 +----- src/emucore/CartCDF.cxx | 7 +------ src/emucore/CartCDF.hxx | 6 +----- src/emucore/CartDPCPlus.cxx | 7 +------ src/emucore/CartDPCPlus.hxx | 7 ++----- src/emucore/Settings.cxx | 9 +-------- src/emucore/Thumbulator.cxx | 4 ---- src/emucore/Thumbulator.hxx | 4 ---- src/gui/DeveloperDialog.cxx | 2 -- 11 files changed, 11 insertions(+), 70 deletions(-) diff --git a/configure b/configure index 169657f2b..a1ecfb1ae 100755 --- a/configure +++ b/configure @@ -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 diff --git a/src/emucore/CartBUS.cxx b/src/emucore/CartBUS.cxx index 1facde3de..355be4da4 100644 --- a/src/emucore/CartBUS.cxx +++ b/src/emucore/CartBUS.cxx @@ -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( reinterpret_cast(myImage), reinterpret_cast(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 } } diff --git a/src/emucore/CartBUS.hxx b/src/emucore/CartBUS.hxx index cfe9503c3..b20289534 100644 --- a/src/emucore/CartBUS.hxx +++ b/src/emucore/CartBUS.hxx @@ -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 myThumbEmulator; -#endif // Indicates the offset into the ROM image (aligns to current bank) uInt16 myBankOffset; diff --git a/src/emucore/CartCDF.cxx b/src/emucore/CartCDF.cxx index 308448c9a..611cba081 100644 --- a/src/emucore/CartCDF.cxx +++ b/src/emucore/CartCDF.cxx @@ -66,13 +66,12 @@ CartridgeCDF::CartridgeCDF(const BytePtr& image, uInt32 size, setVersion(); -#ifdef THUMB_SUPPORT // Create Thumbulator ARM emulator myThumbEmulator = make_unique( reinterpret_cast(myImage), reinterpret_cast(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 } } diff --git a/src/emucore/CartCDF.hxx b/src/emucore/CartCDF.hxx index 34d4e9bf9..29c25cb76 100644 --- a/src/emucore/CartCDF.hxx +++ b/src/emucore/CartCDF.hxx @@ -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 myThumbEmulator; - #endif // Indicates the offset into the ROM image (aligns to current bank) uInt16 myBankOffset; diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index 3e6099ac1..7825916de 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -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 (reinterpret_cast(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 } } diff --git a/src/emucore/CartDPCPlus.hxx b/src/emucore/CartDPCPlus.hxx index 37d7ad2fe..7b9a9b745 100644 --- a/src/emucore/CartDPCPlus.hxx +++ b/src/emucore/CartDPCPlus.hxx @@ -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 myThumbEmulator; -#endif // Pointer to the 1K frequency table uInt8* myFrequencyImage; diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx index 1bc5292ad..ccbd12463 100644 --- a/src/emucore/Settings.cxx +++ b/src/emucore/Settings.cxx @@ -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; } diff --git a/src/emucore/Thumbulator.cxx b/src/emucore/Thumbulator.cxx index 554f4368b..3a175f5c9 100644 --- a/src/emucore/Thumbulator.cxx +++ b/src/emucore/Thumbulator.cxx @@ -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 diff --git a/src/emucore/Thumbulator.hxx b/src/emucore/Thumbulator.hxx index 68ca803e8..6b9c4173d 100644 --- a/src/emucore/Thumbulator.hxx +++ b/src/emucore/Thumbulator.hxx @@ -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 diff --git a/src/gui/DeveloperDialog.cxx b/src/gui/DeveloperDialog.cxx index 5b9885f48..e9d1d595c 100644 --- a/src/gui/DeveloperDialog.cxx +++ b/src/gui/DeveloperDialog.cxx @@ -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);