--- nono/vm/fdc.cpp 2026/04/29 17:04:44 1.1.1.6 +++ nono/vm/fdc.cpp 2026/04/29 17:04:55 1.1.1.8 @@ -12,13 +12,11 @@ std::unique_ptr gFDC; // コンストラクタ FDCDevice::FDCDevice() + : inherited("FDC") { - logname = "fdc"; - devname = "FDC"; devaddr = baseaddr; devlen = 0x2000; - event.dev = this; event.func = (DeviceCallback_t)&FDCDevice::Callback; event.SetName("FDC"); } @@ -37,11 +35,11 @@ FDCDevice::ResetHard() } uint64 -FDCDevice::Read(uint32 addr) +FDCDevice::Read(uint32 offset) { gMPU->AddCycle(19); // InsideOut p.135 - switch (addr) { + switch (offset) { case 0: return ReadStatus(); case 1: @@ -55,11 +53,11 @@ FDCDevice::Read(uint32 addr) } uint64 -FDCDevice::Write(uint32 addr, uint32 data) +FDCDevice::Write(uint32 offset, uint32 data) { gMPU->AddCycle(19); // InsideOut p.135 - switch (addr) { + switch (offset) { case 0: return 0; @@ -77,7 +75,8 @@ FDCDevice::Write(uint32 addr, uint32 dat (fdc.drivesel & 8) ? " #3" : ""); } if ((data & 0xe0) != 0) { - putlog(0, "未実装ビット書き込み $%06x <- $%02x", addr, data); + putlog(0, "未実装ビット書き込み $%06x <- $%02x", + gMPU->GetPaddr(), data); } return 0; @@ -99,7 +98,7 @@ FDCDevice::Write(uint32 addr, uint32 dat } uint64 -FDCDevice::Peek(uint32 addr) +FDCDevice::Peek(uint32 offset) { // XXX 未実装 return 0xff;