openMSX
MSXSwitchedDevice.cc
Go to the documentation of this file.
1 #include "MSXSwitchedDevice.hh"
2 #include "MSXDeviceSwitch.hh"
3 #include "MSXMotherBoard.hh"
4 
5 namespace openmsx {
6 
8  : motherBoard(motherBoard_), id(id_)
9 {
10  motherBoard.getDeviceSwitch().registerDevice(id, this);
11 }
12 
14 {
15  motherBoard.getDeviceSwitch().unregisterDevice(id);
16 }
17 
18 } // namespace openmsx
openmsx::MSXSwitchedDevice::MSXSwitchedDevice
MSXSwitchedDevice(MSXMotherBoard &motherBoard, byte id)
Definition: MSXSwitchedDevice.cc:7
openmsx::MSXSwitchedDevice::~MSXSwitchedDevice
~MSXSwitchedDevice()
Definition: MSXSwitchedDevice.cc:13
openmsx::MSXDeviceSwitch::unregisterDevice
void unregisterDevice(byte id)
Definition: MSXDeviceSwitch.cc:43
openmsx::MSXMotherBoard::getDeviceSwitch
MSXDeviceSwitch & getDeviceSwitch()
Definition: MSXMotherBoard.cc:404
MSXDeviceSwitch.hh
MSXSwitchedDevice.hh
openmsx::MSXMotherBoard
Definition: MSXMotherBoard.hh:59
openmsx::MSXDeviceSwitch::registerDevice
void registerDevice(byte id, MSXSwitchedDevice *device)
Definition: MSXDeviceSwitch.cc:26
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
MSXMotherBoard.hh