|
openMSX
|
#include <MSXCPUInterface.hh>


Classes | |
| struct | GlobalWriteInfo |
Public Types | |
| typedef std::multimap< word, std::shared_ptr< BreakPoint > > | BreakPoints |
| typedef std::vector < std::shared_ptr< WatchPoint > > | WatchPoints |
| typedef std::vector < std::shared_ptr < DebugCondition > > | Conditions |
Public Member Functions | |
| MSXCPUInterface (MSXMotherBoard &motherBoard) | |
| ~MSXCPUInterface () | |
| void | register_IO_In (byte port, MSXDevice *device) |
| Devices can register their In ports. | |
| void | unregister_IO_In (byte port, MSXDevice *device) |
| void | register_IO_Out (byte port, MSXDevice *device) |
| Devices can register their Out ports. | |
| void | unregister_IO_Out (byte port, MSXDevice *device) |
| void | registerMemDevice (MSXDevice &device, int primSl, int secSL, int base, int size) |
| Devices can register themself in the MSX slotstructure. | |
| void | unregisterMemDevice (MSXDevice &device, int primSl, int secSL, int base, int size) |
| void | registerGlobalWrite (MSXDevice &device, word address) |
| (Un)register global writes. | |
| void | unregisterGlobalWrite (MSXDevice &device, word address) |
| void | reset () |
| Reset (the slot state) | |
| byte | readMem (word address, EmuTime::param time) |
| This reads a byte from the currently selected device. | |
| void | writeMem (word address, byte value, EmuTime::param time) |
| This writes a byte to the currently selected device. | |
| byte | readIO (word port, EmuTime::param time) |
| This read a byte from the given IO-port. | |
| void | writeIO (word port, byte value, EmuTime::param time) |
| This writes a byte to the given IO-port. | |
| const byte * | getReadCacheLine (word start) const |
| Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading. | |
| byte * | getWriteCacheLine (word start) const |
| Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing. | |
| byte | readIRQVector () |
| CPU uses this method to read 'extra' data from the databus used in interrupt routines. | |
| void | setPrimarySlots (byte value) |
| byte | peekMem (word address, EmuTime::param time) const |
| Peek memory location. | |
| byte | peekSlottedMem (unsigned address, EmuTime::param time) const |
| byte | readSlottedMem (unsigned address, EmuTime::param time) |
| void | writeSlottedMem (unsigned address, byte value, EmuTime::param time) |
| void | setExpanded (int ps) |
| void | unsetExpanded (int ps) |
| void | testUnsetExpanded (int ps, std::vector< MSXDevice * > allowed) const |
| bool | isExpanded (int ps) const |
| void | changeExpanded (bool isExpanded) |
| DummyDevice & | getDummyDevice () |
| void | setWatchPoint (const std::shared_ptr< WatchPoint > &watchPoint) |
| void | removeWatchPoint (std::shared_ptr< WatchPoint > watchPoint) |
| const WatchPoints & | getWatchPoints () const |
| void | doBreak () |
| void | doStep () |
| void | doContinue () |
| void | setFastForward (bool fastForward_) |
| bool | isFastForward () const |
| template<typename Archive > | |
| void | serialize (Archive &ar, unsigned version) |
Static Public Member Functions | |
| static void | insertBreakPoint (const std::shared_ptr< BreakPoint > &bp) |
| static void | removeBreakPoint (const BreakPoint &bp) |
| static const BreakPoints & | getBreakPoints () |
| static void | setCondition (const std::shared_ptr< DebugCondition > &cond) |
| static void | removeCondition (const DebugCondition &cond) |
| static const Conditions & | getConditions () |
| static bool | isBreaked () |
| static bool | isStep () |
| static void | setStep (bool x) |
| static bool | isContinue () |
| static void | setContinue (bool x) |
| static bool | anyBreakPoints () |
| static bool | checkBreakPoints (unsigned pc) |
| static void | cleanup () |
Friends | |
| class | SlotInfo |
| class | IODebug |
| class | IOInfo |
Additional Inherited Members |
Definition at line 32 of file MSXCPUInterface.hh.
| typedef std::multimap<word, std::shared_ptr<BreakPoint> > openmsx::MSXCPUInterface::BreakPoints |
Definition at line 184 of file MSXCPUInterface.hh.
| typedef std::vector<std::shared_ptr<DebugCondition> > openmsx::MSXCPUInterface::Conditions |
Definition at line 196 of file MSXCPUInterface.hh.
| typedef std::vector<std::shared_ptr<WatchPoint> > openmsx::MSXCPUInterface::WatchPoints |
Definition at line 190 of file MSXCPUInterface.hh.
|
explicit |
Definition at line 150 of file MSXCPUInterface.cc.
References openmsx::DeviceFactory::createVDPIODelay(), openmsx::Reactor::getCommandController(), openmsx::MSXMotherBoard::getMachineConfig(), openmsx::MSXMotherBoard::getReactor(), openmsx::MSXMotherBoard::isTurboR(), and openmsx::MSXCPU::setInterface().
| openmsx::MSXCPUInterface::~MSXCPUInterface | ( | ) |
Definition at line 222 of file MSXCPUInterface.cc.
References openmsx::MSXDevice::getName(), isExpanded(), openmsx::MSXCPU::setInterface(), and UNREACHABLE.
|
inlinestatic |
Definition at line 211 of file MSXCPUInterface.hh.
| void openmsx::MSXCPUInterface::changeExpanded | ( | bool | isExpanded | ) |
Definition at line 382 of file MSXCPUInterface.cc.
References openmsx::MSXCPU::invalidateMemCache().
Referenced by setExpanded(), setPrimarySlots(), and unsetExpanded().
|
inlinestatic |
Definition at line 215 of file MSXCPUInterface.hh.
References isBreaked().
|
static |
Definition at line 1041 of file MSXCPUInterface.cc.
Referenced by openmsx::Interpreter::~Interpreter().
| void openmsx::MSXCPUInterface::doBreak | ( | ) |
Definition at line 999 of file MSXCPUInterface.cc.
References openmsx::Reactor::block(), openmsx::EventDistributor::distributeEvent(), openmsx::MSXCPU::exitCPULoopSync(), openmsx::Reactor::getCliComm(), openmsx::Reactor::getEventDistributor(), openmsx::MSXMotherBoard::getReactor(), isFastForward(), openmsx::OPENMSX_BREAK_EVENT, openmsx::CliComm::STATUS, and openmsx::CliComm::update().
Referenced by openmsx::DebugCmd::execute().
| void openmsx::MSXCPUInterface::doContinue | ( | ) |
Definition at line 1023 of file MSXCPUInterface.cc.
References isFastForward().
Referenced by openmsx::DebugCmd::execute().
| void openmsx::MSXCPUInterface::doStep | ( | ) |
Definition at line 1014 of file MSXCPUInterface.cc.
References isFastForward().
Referenced by openmsx::DebugCmd::execute().
|
static |
Definition at line 804 of file MSXCPUInterface.cc.
|
static |
Definition at line 897 of file MSXCPUInterface.cc.
| DummyDevice & openmsx::MSXCPUInterface::getDummyDevice | ( | ) |
Definition at line 782 of file MSXCPUInterface.cc.
Referenced by openmsx::VDPIODelay::VDPIODelay().
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
If it is, a pointer to a buffer containing this interval must be returned. If not, a null pointer must be returned. Cacheable for reading means the data may be read directly from the buffer, thus bypassing the readMem() method, and thus also ignoring EmuTime. The default implementation always returns a null pointer. An interval will never cross a 16KB border. An interval will never contain the address 0xffff.
Definition at line 124 of file MSXCPUInterface.hh.
References openmsx::MSXDevice::getReadCacheLine(), and unlikely.
| const MSXCPUInterface::WatchPoints & openmsx::MSXCPUInterface::getWatchPoints | ( | ) | const |
Definition at line 876 of file MSXCPUInterface.cc.
Referenced by openmsx::Debugger::transfer().
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
If it is, a pointer to a buffer containing this interval must be returned. If not, a null pointer must be returned. Cacheable for writing means the data may be written directly to the buffer, thus bypassing the writeMem() method, and thus also ignoring EmuTime. The default implementation always returns a null pointer. An interval will never cross a 16KB border. An interval will never contain the address 0xffff.
Definition at line 143 of file MSXCPUInterface.hh.
References openmsx::MSXDevice::getWriteCacheLine(), and unlikely.
|
static |
Definition at line 788 of file MSXCPUInterface.cc.
|
inlinestatic |
Definition at line 199 of file MSXCPUInterface.hh.
Referenced by checkBreakPoints(), and openmsx::DebugCmd::execute().
|
inlinestatic |
Definition at line 207 of file MSXCPUInterface.hh.
|
inline |
Definition at line 175 of file MSXCPUInterface.hh.
Referenced by openmsx::SlotInfo::execute(), openmsx::SubSlottedInfo::execute(), openmsx::HardwareConfig::parseSlots(), peekMem(), peekSlottedMem(), readSlottedMem(), registerMemDevice(), setExpanded(), setPrimarySlots(), testUnsetExpanded(), unsetExpanded(), writeSlottedMem(), and ~MSXCPUInterface().
|
inline |
Definition at line 233 of file MSXCPUInterface.hh.
Referenced by doBreak(), doContinue(), and doStep().
|
inlinestatic |
Definition at line 205 of file MSXCPUInterface.hh.
| byte openmsx::MSXCPUInterface::peekMem | ( | word | address, |
| EmuTime::param | time | ||
| ) | const |
Peek memory location.
Definition at line 721 of file MSXCPUInterface.cc.
References isExpanded(), and openmsx::MSXDevice::peekMem().
Referenced by openmsx::dasm(), and openmsx::MemoryDebug::read().
| byte openmsx::MSXCPUInterface::peekSlottedMem | ( | unsigned | address, |
| EmuTime::param | time | ||
| ) | const |
Definition at line 730 of file MSXCPUInterface.cc.
References isExpanded(), and openmsx::MSXDevice::peekMem().
Referenced by openmsx::MSXMirrorDevice::peekMem(), and openmsx::SlottedMemoryDebug::read().
|
inline |
This read a byte from the given IO-port.
Definition at line 100 of file MSXCPUInterface.hh.
References openmsx::MSXDevice::readIO().
| byte openmsx::MSXCPUInterface::readIRQVector | ( | ) |
CPU uses this method to read 'extra' data from the databus used in interrupt routines.
In MSX this returns always 255.
Definition at line 655 of file MSXCPUInterface.cc.
References openmsx::MSXMotherBoard::readIRQVector().
|
inline |
This reads a byte from the currently selected device.
Definition at line 79 of file MSXCPUInterface.hh.
References openmsx::MSXDevice::readMem(), and unlikely.
| byte openmsx::MSXCPUInterface::readSlottedMem | ( | unsigned | address, |
| EmuTime::param | time | ||
| ) |
Definition at line 747 of file MSXCPUInterface.cc.
References isExpanded(), and openmsx::MSXDevice::peekMem().
Referenced by openmsx::MSXMirrorDevice::readMem().
Devices can register their In ports.
This is normally done in their constructor. Once device are registered, their readIO() method can get called.
Definition at line 407 of file MSXCPUInterface.cc.
Referenced by openmsx::MSXMotherBoard::Impl::createMapperIO(), openmsx::MegaFlashRomSCCPlus::MegaFlashRomSCCPlus(), openmsx::MSXDeviceSwitch::registerDevice(), openmsx::RomArc::RomArc(), openmsx::RomKonamiKeyboardMaster::RomKonamiKeyboardMaster(), and openmsx::RomManbow2::RomManbow2().
Devices can register their Out ports.
This is normally done in their constructor. Once device are registered, their writeIO() method can get called.
Definition at line 419 of file MSXCPUInterface.cc.
Referenced by openmsx::MSXMotherBoard::Impl::createMapperIO(), openmsx::MegaFlashRomSCCPlus::MegaFlashRomSCCPlus(), openmsx::MSXMidi::MSXMidi(), openmsx::MSXDeviceSwitch::registerDevice(), openmsx::RomArc::RomArc(), openmsx::RomKonamiKeyboardMaster::RomKonamiKeyboardMaster(), openmsx::RomManbow2::RomManbow2(), and openmsx::RomZemina90in1::RomZemina90in1().
(Un)register global writes.
Definition at line 607 of file MSXCPUInterface.cc.
References openmsx::MSXCPU::invalidateMemCache().
Referenced by openmsx::RomSuperLodeRunner::RomSuperLodeRunner().
| void openmsx::MSXCPUInterface::registerMemDevice | ( | MSXDevice & | device, |
| int | primSl, | ||
| int | secSL, | ||
| int | base, | ||
| int | size | ||
| ) |
Devices can register themself in the MSX slotstructure.
This is normally done in their constructor. Once devices are registered their readMem() / writeMem() methods can get called.
Definition at line 565 of file MSXCPUInterface.cc.
References isExpanded().
|
static |
Definition at line 793 of file MSXCPUInterface.cc.
References openmsx::BreakPoint::getAddress().
|
static |
Definition at line 887 of file MSXCPUInterface.cc.
| void openmsx::MSXCPUInterface::removeWatchPoint | ( | std::shared_ptr< WatchPoint > | watchPoint | ) |
Definition at line 847 of file MSXCPUInterface.cc.
References openmsx::WatchPoint::READ_IO, openmsx::WatchPoint::READ_MEM, UNREACHABLE, openmsx::WatchPoint::WRITE_IO, and openmsx::WatchPoint::WRITE_MEM.
| void openmsx::MSXCPUInterface::reset | ( | ) |
Reset (the slot state)
Definition at line 647 of file MSXCPUInterface.cc.
References setPrimarySlots().
Referenced by openmsx::MSXMotherBoard::Impl::doReset(), and openmsx::MSXMotherBoard::Impl::powerUp().
| void openmsx::MSXCPUInterface::serialize | ( | Archive & | ar, |
| unsigned | version | ||
| ) |
Definition at line 1245 of file MSXCPUInterface.cc.
References setPrimarySlots().
|
static |
Definition at line 882 of file MSXCPUInterface.cc.
|
inlinestatic |
Definition at line 208 of file MSXCPUInterface.hh.
| void openmsx::MSXCPUInterface::setExpanded | ( | int | ps | ) |
Definition at line 316 of file MSXCPUInterface.cc.
References changeExpanded(), and isExpanded().
|
inline |
Definition at line 232 of file MSXCPUInterface.hh.
| void openmsx::MSXCPUInterface::setPrimarySlots | ( | byte | value | ) |
Definition at line 660 of file MSXCPUInterface.cc.
References changeExpanded(), isExpanded(), and unlikely.
Referenced by reset(), and serialize().
|
inlinestatic |
Definition at line 206 of file MSXCPUInterface.hh.
| void openmsx::MSXCPUInterface::setWatchPoint | ( | const std::shared_ptr< WatchPoint > & | watchPoint | ) |
Definition at line 827 of file MSXCPUInterface.cc.
References openmsx::WatchPoint::READ_IO, openmsx::WatchPoint::READ_MEM, UNREACHABLE, openmsx::WatchPoint::WRITE_IO, and openmsx::WatchPoint::WRITE_MEM.
| void openmsx::MSXCPUInterface::testUnsetExpanded | ( | int | ps, |
| std::vector< MSXDevice * > | allowed | ||
| ) | const |
Definition at line 330 of file MSXCPUInterface.cc.
References isExpanded().
Referenced by openmsx::HardwareConfig::testRemove(), and unsetExpanded().
Definition at line 413 of file MSXCPUInterface.cc.
Referenced by openmsx::MSXMotherBoard::Impl::destroyMapperIO(), openmsx::MSXDeviceSwitch::unregisterDevice(), openmsx::MegaFlashRomSCCPlus::~MegaFlashRomSCCPlus(), openmsx::RomArc::~RomArc(), openmsx::RomKonamiKeyboardMaster::~RomKonamiKeyboardMaster(), and openmsx::RomManbow2::~RomManbow2().
Definition at line 425 of file MSXCPUInterface.cc.
Referenced by openmsx::MSXMotherBoard::Impl::destroyMapperIO(), openmsx::MSXDeviceSwitch::unregisterDevice(), openmsx::MegaFlashRomSCCPlus::~MegaFlashRomSCCPlus(), openmsx::MSXMidi::~MSXMidi(), openmsx::RomArc::~RomArc(), openmsx::RomKonamiKeyboardMaster::~RomKonamiKeyboardMaster(), openmsx::RomManbow2::~RomManbow2(), and openmsx::RomZemina90in1::~RomZemina90in1().
Definition at line 616 of file MSXCPUInterface.cc.
References openmsx::MSXCPU::invalidateMemCache().
Referenced by openmsx::RomSuperLodeRunner::~RomSuperLodeRunner().
| void openmsx::MSXCPUInterface::unregisterMemDevice | ( | MSXDevice & | device, |
| int | primSl, | ||
| int | secSL, | ||
| int | base, | ||
| int | size | ||
| ) |
Definition at line 595 of file MSXCPUInterface.cc.
| void openmsx::MSXCPUInterface::unsetExpanded | ( | int | ps | ) |
Definition at line 368 of file MSXCPUInterface.cc.
References changeExpanded(), isExpanded(), testUnsetExpanded(), and UNREACHABLE.
Referenced by openmsx::HardwareConfig::~HardwareConfig().
|
inline |
This writes a byte to the given IO-port.
Definition at line 108 of file MSXCPUInterface.hh.
References openmsx::MSXDevice::writeIO().
Referenced by openmsx::IODebug::write().
|
inline |
This writes a byte to the currently selected device.
Definition at line 89 of file MSXCPUInterface.hh.
References unlikely, and openmsx::MSXDevice::writeMem().
Referenced by openmsx::MemoryDebug::write().
| void openmsx::MSXCPUInterface::writeSlottedMem | ( | unsigned | address, |
| byte | value, | ||
| EmuTime::param | time | ||
| ) |
Definition at line 764 of file MSXCPUInterface.cc.
References isExpanded(), and openmsx::MSXDevice::writeMem().
Referenced by openmsx::SlottedMemoryDebug::write(), and openmsx::MSXMirrorDevice::writeMem().
|
friend |
Definition at line 268 of file MSXCPUInterface.hh.
|
friend |
Definition at line 269 of file MSXCPUInterface.hh.
|
friend |
Definition at line 267 of file MSXCPUInterface.hh.
1.8.1.2