openMSX
cpu
MSXWatchIODevice.hh
Go to the documentation of this file.
1
#ifndef MSXWATCHIODEVICE_HH
2
#define MSXWATCHIODEVICE_HH
3
4
#include "
MSXMultiDevice.hh
"
5
#include "
WatchPoint.hh
"
6
#include <memory>
7
8
namespace
openmsx
{
9
10
class
MSXWatchIODevice;
11
12
class
WatchIO
final :
public
WatchPoint
13
,
public
std::enable_shared_from_this<WatchIO>
14
{
15
public
:
16
WatchIO
(
MSXMotherBoard
& motherboard,
17
WatchPoint::Type
type,
18
unsigned
beginAddr,
unsigned
endAddr,
19
TclObject
command,
TclObject
condition,
20
bool
once,
unsigned
newId = -1);
21
22
MSXWatchIODevice
&
getDevice
(
byte
port);
23
24
private
:
25
void
doReadCallback(
unsigned
port);
26
void
doWriteCallback(
unsigned
port,
unsigned
value);
27
28
private
:
29
MSXMotherBoard
& motherboard;
30
std::vector<std::unique_ptr<MSXWatchIODevice>> ios;
31
32
friend
class
MSXWatchIODevice
;
33
};
34
35
class
MSXWatchIODevice
final :
public
MSXMultiDevice
36
{
37
public
:
38
MSXWatchIODevice
(
const
HardwareConfig
& hwConf,
WatchIO
& watchIO);
39
40
[[nodiscard]]
MSXDevice
*&
getDevicePtr
() {
return
device; }
41
42
private
:
43
// MSXDevice
44
[[nodiscard]]
const
std::string& getName()
const override
;
45
[[nodiscard]]
byte
readIO(
word
port, EmuTime::param time)
override
;
46
[[nodiscard]]
byte
peekIO(
word
port, EmuTime::param time)
const override
;
47
void
writeIO(
word
port,
byte
value, EmuTime::param time)
override
;
48
49
private
:
50
WatchIO
& watchIO;
51
MSXDevice
* device =
nullptr
;
52
};
53
54
}
// namespace openmsx
55
56
#endif
MSXMultiDevice.hh
WatchPoint.hh
openmsx::HardwareConfig
Definition
HardwareConfig.hh:24
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition
MSXDevice.hh:36
openmsx::MSXMotherBoard
Definition
MSXMotherBoard.hh:84
openmsx::MSXMultiDevice
Definition
MSXMultiDevice.hh:9
openmsx::MSXWatchIODevice
Definition
MSXWatchIODevice.hh:36
openmsx::MSXWatchIODevice::getDevicePtr
MSXDevice *& getDevicePtr()
Definition
MSXWatchIODevice.hh:40
openmsx::TclObject
Definition
TclObject.hh:27
openmsx::WatchIO
Definition
MSXWatchIODevice.hh:14
openmsx::WatchIO::getDevice
MSXWatchIODevice & getDevice(byte port)
Definition
MSXWatchIODevice.cc:33
openmsx::WatchPoint
Base class for CPU breakpoints.
Definition
WatchPoint.hh:14
openmsx::WatchPoint::Type
Type
Definition
WatchPoint.hh:16
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
openmsx::word
uint16_t word
16 bit unsigned integer
Definition
openmsx.hh:29
Generated on Fri Oct 11 2024 19:13:46 for openMSX by
1.9.8