openMSX
FraelSwitchableROM.hh
Go to the documentation of this file.
1 #ifndef FRAELSWITCHABLEROM_HH
2 #define FRAELSWITCHABLEROM_HH
3 
4 #include "MSXDevice.hh"
5 #include "Rom.hh"
6 
7 namespace openmsx {
8 
9 class FraelSwitchableROM final : public MSXDevice
10 {
11 public:
13 
14  void reset(EmuTime::param time) override;
15 
16  byte readMem(word address, EmuTime::param time) override;
17  const byte* getReadCacheLine(word start) const override;
18 
19  void writeIO(word port, byte value, EmuTime::param time) override;
20 
21  template<typename Archive>
22  void serialize(Archive& ar, unsigned version);
23 
24 private:
25  Rom basicbiosRom;
26  Rom firmwareRom;
27  bool firmwareSelected;
28 };
29 
30 } // namespace openmsx
31 
32 #endif
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:32
openmsx::FraelSwitchableROM::readMem
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
Definition: FraelSwitchableROM.cc:44
Rom.hh
openmsx::FraelSwitchableROM::FraelSwitchableROM
FraelSwitchableROM(const DeviceConfig &DeviceConfig)
Definition: FraelSwitchableROM.cc:21
openmsx::DeviceConfig
Definition: DeviceConfig.hh:20
openmsx::FraelSwitchableROM::getReadCacheLine
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
Definition: FraelSwitchableROM.cc:49
MSXDevice.hh
openmsx::Rom
Definition: Rom.hh:21
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::FraelSwitchableROM::serialize
void serialize(Archive &ar, unsigned version)
Definition: FraelSwitchableROM.cc:56
openmsx::FraelSwitchableROM::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: FraelSwitchableROM.cc:38
openmsx::FraelSwitchableROM
Definition: FraelSwitchableROM.hh:10
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::FraelSwitchableROM::writeIO
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
Definition: FraelSwitchableROM.cc:29