--- nono/vm/fdc.cpp 2026/04/29 17:04:35 1.1.1.4 +++ nono/vm/fdc.cpp 2026/04/29 17:04:41 1.1.1.5 @@ -30,12 +30,15 @@ void FDCDevice::ResetHard() { // XXX 他には + event.Stop(); idle_phase(); } uint64 FDCDevice::Read(uint32 addr) { + gMPU->AddCycle(19); // InsideOut p.135 + switch (addr) { case 0: return ReadStatus(); @@ -52,6 +55,8 @@ FDCDevice::Read(uint32 addr) uint64 FDCDevice::Write(uint32 addr, uint32 data) { + gMPU->AddCycle(19); // InsideOut p.135 + switch (addr) { case 0: return 0; @@ -305,9 +310,9 @@ FDCDevice::result_phase() // イベントコールバック void -FDCDevice::Callback(int arg) +FDCDevice::Callback(Event& ev) { - switch (arg) { + switch (ev.code) { case FDC::CMD_RECALIBRATE: fdd[fdc.accdrive].seek = false; fdc.DIO = DIOtoHost;