From 93e1d0945cddc9e42a7345d5500848003cae7dec Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Tue, 1 Sep 2020 08:01:09 +0200 Subject: [PATCH] fixed 3E+ peeks and pokes (using 3E code now) --- src/emucore/Cart3EPlus.cxx | 25 ------------------------- src/emucore/Cart3EPlus.hxx | 17 ----------------- 2 files changed, 42 deletions(-) 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;