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