--- nono/vm/videoctlr.cpp 2026/04/29 17:04:39 1.1.1.2 +++ nono/vm/videoctlr.cpp 2026/04/29 17:04:42 1.1.1.3 @@ -5,6 +5,7 @@ // #include "videoctlr.h" +#include "mpu.h" // e82000..e823ff パレット // e82400..e824ff R0(e82400.w) のミラー @@ -27,6 +28,12 @@ VideoCtlrDevice::~VideoCtlrDevice() { } +void +VideoCtlrDevice::ResetHard() +{ + // XXX not yet +} + // addr は何ワード目のポートかという意味になるので // $E82002 が addr=1 (番目のワード)。 uint64 @@ -34,6 +41,8 @@ VideoCtlrDevice::Read(uint32 addr) { uint32 data; + gMPU->AddCycle(9); // InsideOut p.135 + if (addr < 0x400 / 2) { // パレット data = palette.w[addr]; @@ -56,6 +65,8 @@ VideoCtlrDevice::Read(uint32 addr) uint64 VideoCtlrDevice::Write(uint32 addr, uint32 data) { + gMPU->AddCycle(11); // InsideOut p.135 + if (addr < 0x400 / 2) { // パレット putlog(3, "パレット $%06x.W <- $%04x", baseaddr + addr * 2, data); palette.w[addr] = data;