From 4a6e14d306017398d4fa8c52b29caca20d6ba487 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Wed, 22 Apr 2020 10:08:36 +0200 Subject: [PATCH] add 3EX bankswitching type (addresses #619) (TODO: debugger details) --- src/debugger/gui/Cart3EWidget.cxx | 2 +- src/debugger/gui/CartEnhancedWidget.cxx | 2 +- src/emucore/Bankswitch.cxx | 5 +- src/emucore/Bankswitch.hxx | 16 ++--- src/emucore/Cart3E.hxx | 6 +- src/emucore/Cart3EPlus.hxx | 2 +- src/emucore/Cart3EX.cxx | 27 ++++++++ src/emucore/Cart3EX.hxx | 87 +++++++++++++++++++++++++ src/emucore/Cart4KSC.hxx | 2 +- src/emucore/CartBFSC.hxx | 2 +- src/emucore/CartCV.hxx | 2 +- src/emucore/CartDFSC.hxx | 2 +- src/emucore/CartDetector.cxx | 33 ++++++++-- src/emucore/CartDetector.hxx | 5 ++ src/emucore/CartEFSC.hxx | 2 +- src/emucore/CartEnhanced.cxx | 4 +- src/emucore/CartEnhanced.hxx | 6 +- src/emucore/CartF4SC.hxx | 2 +- src/emucore/CartF6SC.hxx | 2 +- src/emucore/CartF8SC.hxx | 2 +- src/emucore/CartFA.hxx | 2 +- src/emucore/CartWD.hxx | 2 +- src/emucore/module.mk | 1 + src/windows/Stella.vcxproj | 2 + src/windows/Stella.vcxproj.filters | 6 ++ 25 files changed, 190 insertions(+), 34 deletions(-) create mode 100644 src/emucore/Cart3EX.cxx create mode 100644 src/emucore/Cart3EX.hxx diff --git a/src/debugger/gui/Cart3EWidget.cxx b/src/debugger/gui/Cart3EWidget.cxx index 287bdd112..b2ab3584c 100644 --- a/src/debugger/gui/Cart3EWidget.cxx +++ b/src/debugger/gui/Cart3EWidget.cxx @@ -169,7 +169,7 @@ string Cartridge3EWidget::bankState() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt32 Cartridge3EWidget::internalRamSize() { - return 32*1024; + return uInt32(myCart.myRamSize); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/debugger/gui/CartEnhancedWidget.cxx b/src/debugger/gui/CartEnhancedWidget.cxx index d4c6b4cf0..35c5f9e25 100644 --- a/src/debugger/gui/CartEnhancedWidget.cxx +++ b/src/debugger/gui/CartEnhancedWidget.cxx @@ -296,7 +296,7 @@ void CartridgeEnhancedWidget::handleCommand(CommandSender* sender, // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt32 CartridgeEnhancedWidget::internalRamSize() { - return myCart.myRamSize; + return uInt32(myCart.myRamSize); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/Bankswitch.cxx b/src/emucore/Bankswitch.cxx index 7ce52db58..1b907eea7 100644 --- a/src/emucore/Bankswitch.cxx +++ b/src/emucore/Bankswitch.cxx @@ -104,7 +104,8 @@ Bankswitch::BSList = {{ { "64IN1" , "64IN1 Multicart (128/256K)" }, { "128IN1" , "128IN1 Multicart (256/512K)" }, { "2K" , "2K (32-2048 bytes Atari)" }, - { "3E" , "3E (32K Tigervision)" }, + { "3E" , "3E (Tigervision, 32K RAM)" }, + { "3EX" , "3EX (Tigervision, 256K RAM)" }, { "3E+" , "3E+ (TJ modified 3E)" }, { "3F" , "3F (512K Tigervision)" }, { "4A50" , "4A50 (64K 4A50 + RAM)" }, @@ -178,6 +179,7 @@ Bankswitch::ExtensionMap Bankswitch::ourExtensions = { { "128N1" , Bankswitch::Type::_128IN1 }, { "2K" , Bankswitch::Type::_2K }, { "3E" , Bankswitch::Type::_3E }, + { "3EX" , Bankswitch::Type::_3EX }, { "3EP" , Bankswitch::Type::_3EP }, { "3E+" , Bankswitch::Type::_3EP }, { "3F" , Bankswitch::Type::_3F }, @@ -245,6 +247,7 @@ Bankswitch::NameToTypeMap Bankswitch::ourNameToTypes = { { "2K" , Bankswitch::Type::_2K }, { "3E" , Bankswitch::Type::_3E }, { "3E+" , Bankswitch::Type::_3EP }, + { "3EX" , Bankswitch::Type::_3EX }, { "3F" , Bankswitch::Type::_3F }, { "4A50" , Bankswitch::Type::_4A50 }, { "4K" , Bankswitch::Type::_4K }, diff --git a/src/emucore/Bankswitch.hxx b/src/emucore/Bankswitch.hxx index 9021a21ed..0dd3871c7 100644 --- a/src/emucore/Bankswitch.hxx +++ b/src/emucore/Bankswitch.hxx @@ -38,14 +38,14 @@ class Bankswitch public: // Currently supported bankswitch schemes enum class Type { - _AUTO, _0840, _2IN1, _4IN1, _8IN1, _16IN1, _32IN1, - _64IN1, _128IN1, _2K, _3E, _3EP, _3F, _4A50, - _4K, _4KSC, _AR, _BF, _BFSC, _BUS, _CDF, - _CM, _CTY, _CV, _DF, _DFSC, _DPC, _DPCP, - _E0, _E7, _E78K, _EF, _EFSC, _F0, _F4, - _F4SC, _F6, _F6SC, _F8, _F8SC, _FA, _FA2, - _FC, _FE, _MDM, _SB, _UA, _UASW, _WD, - _WDSW, _X07, + _AUTO, _0840, _2IN1, _4IN1, _8IN1, _16IN1, _32IN1, + _64IN1, _128IN1, _2K, _3E, _3EX, _3EP, _3F, + _4A50, _4K, _4KSC, _AR, _BF, _BFSC, _BUS, + _CDF, _CM, _CTY, _CV, _DF, _DFSC, _DPC, + _DPCP, _E0, _E7, _E78K, _EF, _EFSC, _F0, + _F4, _F4SC, _F6, _F6SC, _F8, _F8SC, _FA, + _FA2, _FC, _FE, _MDM, _SB, _UA, _UASW, + _WD, _WDSW, _X07, #ifdef CUSTOM_ARM _CUSTOM, #endif diff --git a/src/emucore/Cart3E.hxx b/src/emucore/Cart3E.hxx index 4871c67a6..613fa610c 100644 --- a/src/emucore/Cart3E.hxx +++ b/src/emucore/Cart3E.hxx @@ -116,15 +116,15 @@ class Cartridge3E : public CartridgeEnhanced private: bool checkSwitchBank(uInt16 address, uInt8 value) override; - private: + protected: // log(ROM bank segment size) / log(2) static constexpr uInt16 BANK_SHIFT = 11; // = 2K = 0x0800 - // The size of extra RAM in ROM address space + // The number of RAM banks static constexpr uInt16 RAM_BANKS = 32; // RAM size - static constexpr uInt16 RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 32K = 0x4000; + static constexpr size_t RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 32K = 0x8000; // Write port for extra RAM is at high address static constexpr bool RAM_HIGH_WP = true; diff --git a/src/emucore/Cart3EPlus.hxx b/src/emucore/Cart3EPlus.hxx index 1a2440e40..209ab89dc 100644 --- a/src/emucore/Cart3EPlus.hxx +++ b/src/emucore/Cart3EPlus.hxx @@ -165,7 +165,7 @@ class Cartridge3EPlus: public CartridgeEnhanced static constexpr uInt16 RAM_BANKS = 64; // RAM size - static constexpr uInt16 RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 32K = 0x4000; + static constexpr size_t RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 32K = 0x4000; // Write port for extra RAM is at high address static constexpr bool RAM_HIGH_WP = true; diff --git a/src/emucore/Cart3EX.cxx b/src/emucore/Cart3EX.cxx new file mode 100644 index 000000000..4f9c7ac45 --- /dev/null +++ b/src/emucore/Cart3EX.cxx @@ -0,0 +1,27 @@ +//============================================================================ +// +// 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-2020 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. +//============================================================================ + +#include "Cart3EX.hxx" + +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Cartridge3EX::Cartridge3EX(const ByteBuffer& image, size_t size, + const string& md5, const Settings& settings) + : Cartridge3E(image, size, md5, settings) +{ + myRamSize = RAM_SIZE; + myRamBankCount = RAM_BANKS; +} diff --git a/src/emucore/Cart3EX.hxx b/src/emucore/Cart3EX.hxx new file mode 100644 index 000000000..99181cffd --- /dev/null +++ b/src/emucore/Cart3EX.hxx @@ -0,0 +1,87 @@ +//============================================================================ +// +// 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-2020 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. +//============================================================================ + +#ifndef CARTRIDGE3EX_HXX +#define CARTRIDGE3EX_HXX + +class System; + +#include "Cart3E.hxx" +#ifdef DEBUGGER_SUPPORT +//#include "Cart3EXWidget.hxx" +#endif + +/** + This is an enhanced version of 3E which supports up to 256KB RAM. + + @author Thomas Jentzsch +*/ + +class Cartridge3EX : public Cartridge3E +{ + //friend class Cartridge3EXWidget; + +public: + /** + Create a new cartridge using the specified image and size + + @param image Pointer to the ROM image + @param size The size of the ROM image + @param md5 The md5sum of the ROM image + @param settings A reference to the various settings (read-only) + */ + Cartridge3EX(const ByteBuffer& image, size_t size, const string& md5, + const Settings& settings); + virtual ~Cartridge3EX() = default; + +public: + /** + Get a descriptor for the device name (used in error checking). + + @return The name of the object + */ + string name() const override { return "Cartridge3EX"; } + +#ifdef DEBUGGER_SUPPORT + ///** + // Get debugger widget responsible for accessing the inner workings + // of the cart. + //*/ + //CartDebugWidget* debugWidget(GuiObject* boss, const GUI::Font& lfont, + // const GUI::Font& nfont, int x, int y, int w, int h) override + //{ + // return new Cartridge3EXWidget(boss, lfont, nfont, x, y, w, h, *this); + //} +#endif + +private: + // The number of RAM banks + static constexpr uInt16 RAM_BANKS = 256; + + // RAM size + static constexpr size_t RAM_SIZE = RAM_BANKS << (BANK_SHIFT - 1); // = 256K = 0x40000; + +private: + // Following constructors and assignment operators not supported + Cartridge3EX() = delete; + Cartridge3EX(const Cartridge3EX&) = delete; + Cartridge3EX(Cartridge3EX&&) = delete; + Cartridge3EX& operator=(const Cartridge3EX&) = delete; + Cartridge3EX& operator=(Cartridge3EX&&) = delete; +}; + +#endif diff --git a/src/emucore/Cart4KSC.hxx b/src/emucore/Cart4KSC.hxx index 64dde3c39..3f28de9ce 100644 --- a/src/emucore/Cart4KSC.hxx +++ b/src/emucore/Cart4KSC.hxx @@ -72,7 +72,7 @@ class Cartridge4KSC : public Cartridge4K private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartBFSC.hxx b/src/emucore/CartBFSC.hxx index 35c4b84ca..9bb22aa0a 100644 --- a/src/emucore/CartBFSC.hxx +++ b/src/emucore/CartBFSC.hxx @@ -74,7 +74,7 @@ class CartridgeBFSC : public CartridgeBF private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr uInt32 RAM_SIZE = 0x80; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartCV.hxx b/src/emucore/CartCV.hxx index 1b4773e5e..a5403b19f 100644 --- a/src/emucore/CartCV.hxx +++ b/src/emucore/CartCV.hxx @@ -89,7 +89,7 @@ class CartridgeCV : public CartridgeEnhanced static constexpr uInt16 BANK_SHIFT = 11; // 2K // RAM size - static constexpr uInt16 RAM_SIZE = 0x400; // 1K + static constexpr uInt32 RAM_SIZE = 0x400; // 1K // Write port for extra RAM is at high address static constexpr bool RAM_HIGH_WP = true; diff --git a/src/emucore/CartDFSC.hxx b/src/emucore/CartDFSC.hxx index cf3661039..637dde3da 100644 --- a/src/emucore/CartDFSC.hxx +++ b/src/emucore/CartDFSC.hxx @@ -72,7 +72,7 @@ class CartridgeDFSC : public CartridgeDF private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartDetector.cxx b/src/emucore/CartDetector.cxx index b40e75c49..8544a72f0 100644 --- a/src/emucore/CartDetector.cxx +++ b/src/emucore/CartDetector.cxx @@ -20,6 +20,7 @@ #include "Cart0840.hxx" #include "Cart2K.hxx" #include "Cart3E.hxx" +#include "Cart3EX.hxx" #include "Cart3EPlus.hxx" #include "Cart3F.hxx" #include "Cart4A50.hxx" @@ -250,6 +251,8 @@ CartDetector::createFromImage(const ByteBuffer& image, size_t size, Bankswitch:: return make_unique(image, size, md5, settings); case Bankswitch::Type::_3E: return make_unique(image, size, md5, settings); + case Bankswitch::Type::_3EX: + return make_unique(image, size, md5, settings); case Bankswitch::Type::_3EP: return make_unique(image, size, md5, settings); case Bankswitch::Type::_3F: @@ -380,6 +383,8 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si type = Bankswitch::Type::_4K; else if(isProbablyE0(image, size)) type = Bankswitch::Type::_E0; + else if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbably3F(image, size)) @@ -419,6 +424,8 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si type = Bankswitch::Type::_E7; else if (isProbablyFC(image, size)) type = Bankswitch::Type::_FC; + else if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; /* no known 16K 3F ROMS @@ -445,6 +452,8 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si type = Bankswitch::Type::_CTY; else if(isProbablySC(image, size)) type = Bankswitch::Type::_F4SC; + else if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbably3F(image, size)) @@ -471,7 +480,9 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si } else if(size == 64_KB) { - if(isProbably3E(image, size)) + if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; + else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbably3F(image, size)) type = Bankswitch::Type::_3F; @@ -486,7 +497,9 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si } else if(size == 128_KB) { - if(isProbably3E(image, size)) + if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; + else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbablyDF(image, size, type)) ; // type has been set directly in the function @@ -499,7 +512,9 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si } else if(size == 256_KB) { - if(isProbably3E(image, size)) + if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; + else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbablyBF(image, size, type)) ; // type has been set directly in the function @@ -510,7 +525,9 @@ Bankswitch::Type CartDetector::autodetectType(const ByteBuffer& image, size_t si } else // what else can we do? { - if(isProbably3E(image, size)) + if(isProbably3EX(image, size)) + type = Bankswitch::Type::_3EX; + else if(isProbably3E(image, size)) type = Bankswitch::Type::_3E; else if(isProbably3F(image, size)) type = Bankswitch::Type::_3F; @@ -632,6 +649,14 @@ bool CartDetector::isProbably3E(const ByteBuffer& image, size_t size) && searchForBytes(image.get(), size, signature2, 2, 2); } +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +bool CartDetector::isProbably3EX(const ByteBuffer& image, size_t size) +{ + // 3EX cart have at least 2 occurrences of the string "3EX" + uInt8 _3EX[] = { '3', 'E', 'X'}; + return searchForBytes(image.get(), size, _3EX, 3, 2); +} + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartDetector::isProbably3EPlus(const ByteBuffer& image, size_t size) { diff --git a/src/emucore/CartDetector.hxx b/src/emucore/CartDetector.hxx index 63a98b053..8dc734b42 100644 --- a/src/emucore/CartDetector.hxx +++ b/src/emucore/CartDetector.hxx @@ -130,6 +130,11 @@ class CartDetector */ static bool isProbably3E(const ByteBuffer& image, size_t size); + /** + Returns true if the image is probably a 3EX bankswitching cartridge + */ + static bool isProbably3EX(const ByteBuffer& image, size_t size); + /** Returns true if the image is probably a 3E+ bankswitching cartridge */ diff --git a/src/emucore/CartEFSC.hxx b/src/emucore/CartEFSC.hxx index d204d1ef5..f6c7e40ea 100644 --- a/src/emucore/CartEFSC.hxx +++ b/src/emucore/CartEFSC.hxx @@ -76,7 +76,7 @@ class CartridgeEFSC : public CartridgeEF private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx index 3e69a06f8..0bb6f54fb 100644 --- a/src/emucore/CartEnhanced.cxx +++ b/src/emucore/CartEnhanced.cxx @@ -35,13 +35,13 @@ CartridgeEnhanced::CartridgeEnhanced(const ByteBuffer& image, size_t size, void CartridgeEnhanced::install(System& system) { // limit banked RAM size to the size of one RAM bank - uInt16 ramSize = myRamBankCount > 0 ? 1 << (myBankShift - 1) : myRamSize; + uInt32 ramSize = myRamBankCount > 0 ? 1 << (myBankShift - 1) : uInt32(myRamSize); // calculate bank switching and RAM sizes and masks myBankSize = 1 << myBankShift; // e.g. = 2 ^ 12 = 4K = 0x1000 myBankMask = myBankSize - 1; // e.g. = 0x0FFF myBankSegs = 1 << (MAX_BANK_SHIFT - myBankShift); // e.g. = 1 - myRomOffset = myRamBankCount > 0 ? 0 : myRamSize * 2; + myRomOffset = myRamBankCount > 0 ? 0 : uInt32(myRamSize) * 2; myRamMask = ramSize - 1; // e.g. = 0xFFFF (doesn't matter for RAM size 0) myWriteOffset = myRamWpHigh ? ramSize : 0; // e.g. = 0x0000 myReadOffset = myRamWpHigh ? 0 : ramSize; // e.g. = 0x0080 diff --git a/src/emucore/CartEnhanced.hxx b/src/emucore/CartEnhanced.hxx index ad97409a9..743a4b50e 100644 --- a/src/emucore/CartEnhanced.hxx +++ b/src/emucore/CartEnhanced.hxx @@ -183,7 +183,7 @@ class CartridgeEnhanced : public Cartridge protected: // The extra RAM size - uInt16 myRamSize{RAM_SIZE}; // default 0 + size_t myRamSize{RAM_SIZE}; // default 0 // The number of RAM banks uInt16 myRamBankCount{RAM_BANKS}; // default 0 @@ -246,9 +246,9 @@ class CartridgeEnhanced : public Cartridge static constexpr uInt16 BANK_SHIFT = 12; // default = 4K // The size of extra RAM in ROM address space - static constexpr uInt16 RAM_SIZE = 0; // default = none + static constexpr size_t RAM_SIZE = 0; // default = none - // The size of extra RAM in ROM address space + // The number of RAM banks static constexpr uInt16 RAM_BANKS = 0; // Write port for extra RAM is at low address by default diff --git a/src/emucore/CartF4SC.hxx b/src/emucore/CartF4SC.hxx index 5f49a33a6..58b255e42 100644 --- a/src/emucore/CartF4SC.hxx +++ b/src/emucore/CartF4SC.hxx @@ -69,7 +69,7 @@ class CartridgeF4SC : public CartridgeF4 private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; // RAM mask static constexpr uInt16 RAM_MASK = RAM_SIZE - 1; diff --git a/src/emucore/CartF6SC.hxx b/src/emucore/CartF6SC.hxx index a791a538d..c61c9715f 100644 --- a/src/emucore/CartF6SC.hxx +++ b/src/emucore/CartF6SC.hxx @@ -69,7 +69,7 @@ class CartridgeF6SC : public CartridgeF6 private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; // RAM mask static constexpr uInt16 RAM_MASK = RAM_SIZE - 1; diff --git a/src/emucore/CartF8SC.hxx b/src/emucore/CartF8SC.hxx index 25fe0dfe3..c5a005543 100644 --- a/src/emucore/CartF8SC.hxx +++ b/src/emucore/CartF8SC.hxx @@ -69,7 +69,7 @@ class CartridgeF8SC : public CartridgeF8 private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x80; + static constexpr size_t RAM_SIZE = 0x80; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartFA.hxx b/src/emucore/CartFA.hxx index 920f2bdec..a2f197b75 100644 --- a/src/emucore/CartFA.hxx +++ b/src/emucore/CartFA.hxx @@ -79,7 +79,7 @@ class CartridgeFA : public CartridgeEnhanced private: // RAM size - static constexpr uInt16 RAM_SIZE = 0x100; + static constexpr size_t RAM_SIZE = 0x100; private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartWD.hxx b/src/emucore/CartWD.hxx index 1fd42ac71..6feb6be63 100644 --- a/src/emucore/CartWD.hxx +++ b/src/emucore/CartWD.hxx @@ -176,7 +176,7 @@ class CartridgeWD : public CartridgeEnhanced static constexpr uInt16 BANK_SHIFT = 10; // = 1K = 0x0400 // RAM size - static constexpr uInt16 RAM_SIZE = 0x40; + static constexpr size_t RAM_SIZE = 0x40; // Write port for extra RAM is at low address by default static constexpr bool RAM_HIGH_WP = true; diff --git a/src/emucore/module.mk b/src/emucore/module.mk index dc953b86e..e0dd4f96f 100644 --- a/src/emucore/module.mk +++ b/src/emucore/module.mk @@ -11,6 +11,7 @@ MODULE_OBJS := \ src/emucore/Cart2K.o \ src/emucore/Cart3E.o \ src/emucore/Cart3EPlus.o \ + src/emucore/Cart3EX.o \ src/emucore/Cart3F.o \ src/emucore/Cart4A50.o \ src/emucore/Cart4K.o \ diff --git a/src/windows/Stella.vcxproj b/src/windows/Stella.vcxproj index 28b0efe29..1095f2c09 100644 --- a/src/windows/Stella.vcxproj +++ b/src/windows/Stella.vcxproj @@ -711,6 +711,7 @@ + @@ -1727,6 +1728,7 @@ + diff --git a/src/windows/Stella.vcxproj.filters b/src/windows/Stella.vcxproj.filters index 536cf54eb..fb763da4c 100644 --- a/src/windows/Stella.vcxproj.filters +++ b/src/windows/Stella.vcxproj.filters @@ -999,6 +999,9 @@ Source Files\debugger + + Source Files\emucore + @@ -2051,6 +2054,9 @@ Header Files\debugger + + Header Files\emucore +