openMSX
RomNational.hh
Go to the documentation of this file.
1#ifndef ROMNATIONAL_HH
2#define ROMNATIONAL_HH
3
4#include "RomBlocks.hh"
5#include <array>
6
7namespace openmsx {
8
9class RomNational final : public Rom16kBBlocks
10{
11public:
12 RomNational(const DeviceConfig& config, Rom&& rom);
13
14 void reset(EmuTime::param time) override;
15 [[nodiscard]] byte peekMem(word address, EmuTime::param time) const override;
16 [[nodiscard]] byte readMem(word address, EmuTime::param time) override;
17 [[nodiscard]] const byte* getReadCacheLine(word address) const override;
18 void writeMem(word address, byte value, EmuTime::param time) override;
19 [[nodiscard]] byte* getWriteCacheLine(word address) override;
20
21 template<typename Archive>
22 void serialize(Archive& ar, unsigned version);
23
24private:
25 int sramAddr;
26 byte control;
27 std::array<byte, 4> bankSelect;
28};
29
30} // namespace openmsx
31
32#endif
void reset(EmuTime::param time) override
This method is called on reset.
void writeMem(word address, byte value, EmuTime::param time) override
Write a given byte to a given location at a certain time to this device.
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
const byte * getReadCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void serialize(Archive &ar, unsigned version)
byte readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
byte * getWriteCacheLine(word address) override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
This file implemented 3 utility functions:
Definition Autofire.cc:11
uint16_t word
16 bit unsigned integer
Definition openmsx.hh:29