diff --git a/src/emucore/CartAR.cxx b/src/emucore/CartAR.cxx index 9199a8bed..fe6e0eb5f 100644 --- a/src/emucore/CartAR.cxx +++ b/src/emucore/CartAR.cxx @@ -259,7 +259,7 @@ bool CartridgeAR::bankConfiguration(uInt8 configuration) void CartridgeAR::initializeROM() { // Note that the following offsets depend on the 'scrom.asm' file - // in src/emucore/misc. If that file is ever recompiled (and its + // in src/tools. If that file is ever recompiled (and its // contents placed in the ourDummyROMCode array), the offsets will // almost definitely change diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx index fa983f0fb..f99594dda 100644 --- a/src/emucore/CartEnhanced.cxx +++ b/src/emucore/CartEnhanced.cxx @@ -160,8 +160,9 @@ uInt8 CartridgeEnhanced::peek(uInt16 address) } // hotspots in TIA range are reacting to pokes only - if (hotspot() >= 0x80) - checkSwitchBank(address & ADDR_MASK, 0); + if(hotspot() >= 0x80) + if(checkSwitchBank(address & ADDR_MASK, 0)) + return myRWPRandomValues[address & 0xFF]; if(isRamBank(address)) { @@ -300,7 +301,7 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment) // Set the page accessing method for the RAM reading pages fromAddr = (ROM_OFFSET + segmentOffset + myReadOffset) & ~System::PAGE_MASK; - toAddr = (ROM_OFFSET + segmentOffset + myReadOffset + toAddr = (ROM_OFFSET + segmentOffset + myReadOffset + (myBankSize >> (myBankShift - myRamBankShift))) & ~System::PAGE_MASK; access.type = System::PageAccessType::READ; diff --git a/src/emucore/CartMVC.hxx b/src/emucore/CartMVC.hxx index fa28726fb..e83e7aae5 100755 --- a/src/emucore/CartMVC.hxx +++ b/src/emucore/CartMVC.hxx @@ -37,14 +37,14 @@ class CartridgeMVC : public Cartridge { public: static constexpr size_t - MVC_FIELD_SIZE = 4096; + MVC_FIELD_SIZE = 4_KB; public: /** Create a new cartridge using the specified image @param path Path to the ROM image file - @param size The size of the ROM image (<= 2048 bytes) + @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) @param bsSize The size specified by the bankswitching scheme