fixed read access to write port if write port uses upper address range (fixes #878)

This commit is contained in:
Thomas Jentzsch 2022-02-23 21:53:32 +01:00
parent 81556892fa
commit d658d72871
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ uInt8 CartridgeEnhanced::peek(uInt16 address)
{
// This is a read access to a write port!
// Reading from the write port triggers an unwanted write
return peekRAM(myRAM[address], peekAddress);
return peekRAM(myRAM[address - myWriteOffset], peekAddress);
}
return myImage[romAddressSegmentOffset(peekAddress) + (peekAddress & myBankMask)];