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  [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
17  [[nodiscard]] 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
FraelSwitchableROM(const DeviceConfig &DeviceConfig)
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
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.
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
void serialize(Archive &ar, unsigned version)
void reset(EmuTime::param time) override
This method is called on reset.
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:33
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29