Merge remote-tracking branch 'remotes/origin/master' into feature/quadtari

This commit is contained in:
Thomas Jentzsch 2020-09-02 11:16:56 +02:00
commit 2557d03d05
4 changed files with 3 additions and 49 deletions

View File

@ -3624,7 +3624,7 @@
<td><span style="white-space:nowrap">-dev.rwportbreak</span></td>
</tr>
<tr>
<td>Break on write to ...</td>
<td>Break on writes to ...</td>
<td>A write to a read port interrupts emulation and the debugger is entered.</td>
<td><span style="white-space:nowrap">-dev.wrportbreak</span></td>
</tr>

View File

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

View File

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

View File

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