--- nono/vm/pedec.cpp 2026/04/29 17:05:25 1.1.1.9 +++ nono/vm/pedec.cpp 2026/04/29 17:05:33 1.1.1.11 @@ -26,6 +26,7 @@ #include "pedec.h" #include "fdc.h" #include "fdd.h" +#include "mainapp.h" #include "spc.h" // コンストラクタ @@ -87,7 +88,7 @@ PEDECDevice::ResetHard(bool poweron) } busdata -PEDECDevice::Read(uint32 offset) +PEDECDevice::ReadPort(uint32 offset) { busdata data; @@ -107,11 +108,12 @@ PEDECDevice::Read(uint32 offset) } // XXX wait? + data |= BusData::Size1; return data; } busdata -PEDECDevice::Write(uint32 offset, uint32 data) +PEDECDevice::WritePort(uint32 offset, uint32 data) { switch (offset) { case 0: // $E9C001 割り込みマスク @@ -121,7 +123,7 @@ PEDECDevice::Write(uint32 offset, uint32 intmap_enable |= (data & 0x02) ? IntmapFDD : 0; intmap_enable |= (data & 0x01) ? IntmapPRT : 0; - putlog(1, "Set Interrupt Mask HDD=%d FDC=%d FDD=%d PRT=%d", + putlog(1, "Set Interrupt Mask HDD=%u FDC=%u FDD=%u PRT=%u", ((intmap_enable & IntmapHDD) ? 1 : 0), ((intmap_enable & IntmapFDC) ? 1 : 0), ((intmap_enable & IntmapFDD) ? 1 : 0), @@ -138,11 +140,12 @@ PEDECDevice::Write(uint32 offset, uint32 } // XXX wait? - return 0; + busdata r = BusData::Size1; + return r; } busdata -PEDECDevice::Peek(uint32 offset) +PEDECDevice::PeekPort(uint32 offset) { switch (offset) { case 0: @@ -157,6 +160,12 @@ PEDECDevice::Peek(uint32 offset) } } +bool +PEDECDevice::PokePort(uint32 offset, uint32 data) +{ + return false; +} + void PEDECDevice::MonitorUpdate(TextScreen& screen, uint intr_level, int y) { @@ -228,6 +237,6 @@ PEDECDevice::InterruptAcknowledge(int lv } else if ((stat & IntmapFDD)) { return vector + 1; } else { - return busdata::BusErr; + return BusData::BusErr; } }