--- nono/vm/pedec.cpp 2026/04/29 17:05:25 1.1.1.9 +++ nono/vm/pedec.cpp 2026/04/29 17:06:00 1.1.1.13 @@ -26,6 +26,7 @@ #include "pedec.h" #include "fdc.h" #include "fdd.h" +#include "mainapp.h" #include "spc.h" // コンストラクタ @@ -43,10 +44,6 @@ PEDECDevice::~PEDECDevice() bool PEDECDevice::Init() { - if (inherited::Init() == false) { - return false; - } - interrupt = GetInterruptDevice(); // 検索順 @@ -87,7 +84,7 @@ PEDECDevice::ResetHard(bool poweron) } busdata -PEDECDevice::Read(uint32 offset) +PEDECDevice::ReadPort(uint32 offset) { busdata data; @@ -107,11 +104,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 +119,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 +136,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,8 +156,14 @@ PEDECDevice::Peek(uint32 offset) } } +bool +PEDECDevice::PokePort(uint32 offset, uint32 data) +{ + return false; +} + void -PEDECDevice::MonitorUpdate(TextScreen& screen, uint intr_level, int y) +PEDECDevice::MonitorScreen(TextScreen& screen, uint intr_level, int y) { for (uint32 map : disp_list) { int clz = __builtin_clz(map); @@ -228,6 +233,6 @@ PEDECDevice::InterruptAcknowledge(int lv } else if ((stat & IntmapFDD)) { return vector + 1; } else { - return busdata::BusErr; + return BusData::BusErr; } }