diff --git a/docs/index.html b/docs/index.html
index 53f587dce..7e506120a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -3624,7 +3624,7 @@
-dev.rwportbreak |
- Break on write to ... |
+ Break on writes to ... |
A write to a read port interrupts emulation and the debugger is entered. |
-dev.wrportbreak |
diff --git a/src/emucore/Cart3EPlus.cxx b/src/emucore/Cart3EPlus.cxx
index 2233b0d71..41f3ef21b 100644
--- a/src/emucore/Cart3EPlus.cxx
+++ b/src/emucore/Cart3EPlus.cxx
@@ -59,28 +59,3 @@ bool Cartridge3EPlus::checkSwitchBank(uInt16 address, uInt8 value)
}
return false;
}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-uInt8 Cartridge3EPlus::peek(uInt16 address)
-{
- uInt16 peekAddress = address;
- address &= ROM_MASK;
-
- if(address < 0x0040) // TIA peek
- return mySystem->tia().peek(address);
-
- return CartridgeEnhanced::peek(peekAddress);
-}
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-bool Cartridge3EPlus::poke(uInt16 address, uInt8 value)
-{
- if(CartridgeEnhanced::poke(address, value))
- return true;
-
- if(address < 0x0040) // TIA poke
- // Handle TIA space that we claimed above
- return mySystem->tia().poke(address, value);
-
- return false;
-}
diff --git a/src/emucore/Cart3EPlus.hxx b/src/emucore/Cart3EPlus.hxx
index bdb8f85f5..d09a445ce 100644
--- a/src/emucore/Cart3EPlus.hxx
+++ b/src/emucore/Cart3EPlus.hxx
@@ -124,23 +124,6 @@ class Cartridge3EPlus: public Cartridge3E
}
#endif
- public:
- /**
- Get the byte at the specified address
-
- @return The byte at the specified address
- */
- uInt8 peek(uInt16 address) override;
-
- /**
- Change the byte at the specified address to the given value
-
- @param address The address where the value should be stored
- @param value The value to be stored at the address
- @return True if the poke changed the device address space, else false
- */
- bool poke(uInt16 address, uInt8 value) override;
-
private:
bool checkSwitchBank(uInt16 address, uInt8 value) override;
diff --git a/src/emucore/CartEnhanced.cxx b/src/emucore/CartEnhanced.cxx
index 633104cf3..b401da819 100644
--- a/src/emucore/CartEnhanced.cxx
+++ b/src/emucore/CartEnhanced.cxx
@@ -91,14 +91,12 @@ void CartridgeEnhanced::install(System& system)
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
- // Map access to this class, since we need to inspect all accesses to
- // check if RWP happens
+ // Note: Writes are mapped to poke() (NOT using direcPokeBase) to check for read from write port (RWP)
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = ROM_OFFSET + myWriteOffset; addr < ROM_OFFSET + myWriteOffset + myRamSize; addr += System::PAGE_SIZE)
{
const uInt16 offset = addr & myRamMask;
- access.directPokeBase = &myRAM[offset];
access.romAccessBase = &myRomAccessBase[myWriteOffset + offset];
access.romPeekCounter = &myRomAccessCounter[myWriteOffset + offset];
access.romPokeCounter = &myRomAccessCounter[myWriteOffset + offset + myAccessSize];
@@ -107,7 +105,6 @@ void CartridgeEnhanced::install(System& system)
// Set the page accessing method for the RAM reading pages
access.type = System::PageAccessType::READ;
- access.directPokeBase = nullptr;
for(uInt16 addr = ROM_OFFSET + myReadOffset; addr < ROM_OFFSET + myReadOffset + myRamSize; addr += System::PAGE_SIZE)
{
const uInt16 offset = addr & myRamMask;
@@ -263,6 +260,7 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
myCurrentSegOffset[segment] = uInt32(mySize) + (ramBank << myBankShift);
// Set the page accessing method for the RAM writing pages
+ // Note: Writes are mapped to poke() (NOT using direcPokeBase) to check for read from write port (RWP)
uInt16 fromAddr = (ROM_OFFSET + segmentOffset + myWriteOffset) & ~System::PAGE_MASK;
uInt16 toAddr = (ROM_OFFSET + segmentOffset + myWriteOffset + (myBankSize >> 1)) & ~System::PAGE_MASK;
System::PageAccess access(this, System::PageAccessType::WRITE);
@@ -271,7 +269,6 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
{
const uInt32 offset = bankOffset + (addr & myRamMask);
- access.directPokeBase = &myRAM[offset - mySize];
access.romAccessBase = &myRomAccessBase[offset];
access.romPeekCounter = &myRomAccessCounter[offset];
access.romPokeCounter = &myRomAccessCounter[offset + myAccessSize];
@@ -282,7 +279,6 @@ bool CartridgeEnhanced::bank(uInt16 bank, uInt16 segment)
fromAddr = (ROM_OFFSET + segmentOffset + myReadOffset) & ~System::PAGE_MASK;
toAddr = (ROM_OFFSET + segmentOffset + myReadOffset + (myBankSize >> 1)) & ~System::PAGE_MASK;
access.type = System::PageAccessType::READ;
- access.directPokeBase = nullptr;
for(uInt16 addr = fromAddr; addr < toAddr; addr += System::PAGE_SIZE)
{