25 , cpmRom(
getName() +
" CP/M ROM",
"rom", config,
"cpm")
27 if (cpmRom.
size() != 0x1000) {
28 throw MSXException(
"CP/M ROM must be exactly 4kB in size.");
40 switch (address & 0x3FFF) {
61 cpmRomEnabled =
false;
70 switch (address & 0x3FFF) {
90 if ((0x4000 <= address) && (address < 0x8000) && !cpmRomEnabled) {
93 }
else if ((0x4000 <= address) && (address < 0x5000) && cpmRomEnabled) {
95 return cpmRom[address & 0x0FFF];
107 }
else if ((0x4000 <= start) && (start < 0x8000) && !cpmRomEnabled) {
110 }
else if ((0x4000 <= start) && (start < 0x5000) && cpmRomEnabled) {
112 return &cpmRom[start & 0x0FFF];
120 switch (address & 0x3FFF) {
143 cpmRomEnabled =
true;
147 cpmRomEnabled =
false;
162template<
typename Archive>
165 ar.template serializeBase<WD2793BasedFDC>(*
this);
166 ar.serialize(
"cpmRomEnabled", cpmRomEnabled);
void setMotor(bool status, EmuTime::param time) override
Set motor on/off.
void selectDrive(DriveNum num, EmuTime::param time)
void setSide(bool side) override
Side select.
static std::array< byte, 0x10000 > unmappedRead
static std::array< byte, 0x10000 > unmappedWrite
EmuTime::param getCurrentTime() const
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
byte * getWriteCacheLine(word address) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for writing.
void reset(EmuTime::param time) override
This method is called on reset.
const byte * getReadCacheLine(word start) const override
Test that the memory in the interval [start, start + CacheLine::SIZE) is cacheable for reading.
void serialize(Archive &ar, unsigned version)
SpectravideoFDC(const DeviceConfig &config)
byte peekMem(word address, EmuTime::param time) const override
Read a byte from a given memory location.
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 readMem(word address, EmuTime::param time) override
Read a byte from a location at a certain time from this device.
DriveMultiplexer multiplexer
uint8_t peekDataReg(EmuTime::param time) const
bool peekIRQ(EmuTime::param time) const
uint8_t getStatusReg(EmuTime::param time)
void setTrackReg(uint8_t value, EmuTime::param time)
void setSectorReg(uint8_t value, EmuTime::param time)
uint8_t getTrackReg(EmuTime::param time) const
uint8_t peekSectorReg(EmuTime::param time) const
bool peekDTRQ(EmuTime::param time) const
void setCommandReg(uint8_t value, EmuTime::param time)
uint8_t peekTrackReg(EmuTime::param time) const
bool getDTRQ(EmuTime::param time) const
uint8_t peekStatusReg(EmuTime::param time) const
uint8_t getDataReg(EmuTime::param time)
void setDataReg(uint8_t value, EmuTime::param time)
bool getIRQ(EmuTime::param time) const
uint8_t getSectorReg(EmuTime::param time) const
std::string getName(KeyCode keyCode)
Translate key code to key name.
This file implemented 3 utility functions:
REGISTER_MSXDEVICE(ChakkariCopy, "ChakkariCopy")
uint16_t word
16 bit unsigned integer
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)