diff --git a/src/emucore/Cart2K.hxx b/src/emucore/Cart2K.hxx index 1ef2ee250..0ed6fedef 100644 --- a/src/emucore/Cart2K.hxx +++ b/src/emucore/Cart2K.hxx @@ -73,7 +73,7 @@ class Cartridge2K : public CartridgeEnhanced #endif private: - bool checkSwitchBank(uInt16 address, uInt8 value = 0) override { return false; }; + bool checkSwitchBank(uInt16 address, uInt8 value = 0) override { return false; } private: // Following constructors and assignment operators not supported diff --git a/src/emucore/Cart4K.hxx b/src/emucore/Cart4K.hxx index 70819c5b2..1a7c428f4 100644 --- a/src/emucore/Cart4K.hxx +++ b/src/emucore/Cart4K.hxx @@ -70,7 +70,7 @@ class Cartridge4K : public CartridgeEnhanced #endif private: - bool checkSwitchBank(uInt16 address, uInt8 value = 0) override { return false; }; + bool checkSwitchBank(uInt16 address, uInt8 value = 0) override { return false; } private: // Following constructors and assignment operators not supported diff --git a/src/emucore/CartCV.cxx b/src/emucore/CartCV.cxx index 136e817c3..8d7ac9d89 100644 --- a/src/emucore/CartCV.cxx +++ b/src/emucore/CartCV.cxx @@ -27,7 +27,6 @@ CartridgeCV::CartridgeCV(const ByteBuffer& image, size_t size, myRamSize = RAM_SIZE; myRamWpHigh = RAM_HIGH_WP; - if(mySize == 4_KB) { // The game has something saved in the RAM @@ -40,7 +39,6 @@ CartridgeCV::CartridgeCV(const ByteBuffer& image, size_t size, // Copy the ROM image into my buffer std::copy_n(image.get() + mySize, mySize, myImage.get()); - myInitialRAM = make_unique(1_KB); // Copy the RAM image into a buffer for use in reset() std::copy_n(image.get(), 1_KB, myInitialRAM.get()); diff --git a/src/emucore/CartCV.hxx b/src/emucore/CartCV.hxx index 4e18040a6..1b4773e5e 100644 --- a/src/emucore/CartCV.hxx +++ b/src/emucore/CartCV.hxx @@ -78,7 +78,7 @@ class CartridgeCV : public CartridgeEnhanced #endif private: - bool checkSwitchBank(uInt16, uInt8 = 0) override { return false; }; + bool checkSwitchBank(uInt16, uInt8 = 0) override { return false; } protected: // Initial RAM data from the cart (doesn't always exist) diff --git a/src/emucore/CartDetector.cxx b/src/emucore/CartDetector.cxx index b6e6f150a..9fe79314f 100644 --- a/src/emucore/CartDetector.cxx +++ b/src/emucore/CartDetector.cxx @@ -951,14 +951,13 @@ bool CartDetector::isProbablyFC(const ByteBuffer& image, size_t size) { 0x8d, 0xf8, 0xff, 0x8d, 0xfc, 0xff }, // STA $FFF8, STA $FFFC Surf's Up (4K) { 0x8c, 0xf9, 0xff, 0xad, 0xfc, 0xff } // STY $FFF9, LDA $FFFC 3-D Havoc }; - for (uInt32 i = 0; i < 3; ++i) - if (searchForBytes(image.get(), size, signature[i], 6, 1)) + for(uInt32 i = 0; i < 3; ++i) + if(searchForBytes(image.get(), size, signature[i], 6, 1)) return true; return false; } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartDetector::isProbablyFE(const ByteBuffer& image, size_t size) { @@ -1032,7 +1031,6 @@ bool CartDetector::isProbablyWD(const ByteBuffer& image, size_t size) return searchForBytes(image.get(), size, signature[0], 3, 1); } - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartDetector::isProbablyX07(const ByteBuffer& image, size_t size) { diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx index c479ddd92..db2768ed0 100644 --- a/src/emucore/CartEnhanced.cxx +++ b/src/emucore/CartEnhanced.cxx @@ -110,7 +110,7 @@ uInt8 CartridgeEnhanced::peek(uInt16 address) // Write port is e.g. at 0xF000 - 0xF07F (128 bytes) if(address < myReadOffset + myRamSize && address >= myReadOffset) - // This is a read accees to a write port! + // This is a read access to a write port! return peekRAM(myRAM[address], peekAddress); else return myImage[myCurrentSegOffset[(peekAddress & 0xFFF) >> myBankShift] + address]; @@ -233,7 +233,6 @@ bool CartridgeEnhanced::save(Serializer& out) const out.putIntArray(myCurrentSegOffset.get(), myBankSegs); if(myRamSize) out.putByteArray(myRAM.get(), myRamSize); - } catch(...) { diff --git a/src/emucore/CartEnhanced.hxx b/src/emucore/CartEnhanced.hxx index 6c67b6eaf..dd8bd4322 100644 --- a/src/emucore/CartEnhanced.hxx +++ b/src/emucore/CartEnhanced.hxx @@ -57,7 +57,6 @@ class CartridgeEnhanced : public Cartridge */ void reset() override; - /** Install pages for the specified bank in the system. diff --git a/src/emucore/CartFA2.cxx b/src/emucore/CartFA2.cxx index 0d892c9b3..1e4251988 100644 --- a/src/emucore/CartFA2.cxx +++ b/src/emucore/CartFA2.cxx @@ -49,11 +49,10 @@ bool CartridgeFA2::checkSwitchBank(uInt16 address, uInt8) } return false; } - + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt8 CartridgeFA2::peek(uInt16 address) { - if((address & 0x0FFF) == 0x0FF4) { // Load/save RAM to/from Harmony cart flash diff --git a/src/emucore/CartUA.hxx b/src/emucore/CartUA.hxx index 94dcb4a98..97569dd76 100644 --- a/src/emucore/CartUA.hxx +++ b/src/emucore/CartUA.hxx @@ -59,13 +59,14 @@ class CartridgeUA : public CartridgeEnhanced */ void install(System& system) override; - /** Get a descriptor for the device name (used in error checking). @return The name of the object */ - string name() const override { return mySwappedHotspots ? "CartridgeUASW" : "CartridgeUA"; } + string name() const override { + return mySwappedHotspots ? "CartridgeUASW" : "CartridgeUA"; + } #ifdef DEBUGGER_SUPPORT /** @@ -96,7 +97,6 @@ class CartridgeUA : public CartridgeEnhanced */ bool poke(uInt16 address, uInt8 value) override; - private: bool checkSwitchBank(uInt16 address, uInt8 value = 0) override;