added that peeks to ROM hotspots return random values

This commit is contained in:
thrust26 2023-10-02 10:04:05 +02:00
parent 83c5920810
commit 8aca3ce406
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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))
{

View File

@ -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