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
uint8_t byte
8 bit unsigned integer
Definition: openmsx.hh:26
void registerDevice(byte id, MSXSwitchedDevice *device)
void unregisterDevice(byte id)
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
MSXSwitchedDevice(MSXMotherBoard &motherBoard, byte id)
MSXDeviceSwitch & getDeviceSwitch()