--- nono/vm/scc.cpp 2026/04/29 17:04:45 1.1.1.5 +++ nono/vm/scc.cpp 2026/04/29 17:04:50 1.1.1.6 @@ -38,18 +38,13 @@ SCCDevice::~SCCDevice() // Z8530 は RD と WR を同時に Low にするとリセットがかかる。 // 回路図からは PEDEC から繋がってるという以上のことは分からないけど // 普通に考えればハードリセットでリセットされるよな。 -void -SCCDevice::ResetHard() -{ - Reset(); -} uint64 -SCCDevice::Read(uint32 addr) +SCCDevice::Read(uint32 offset) { gMPU->AddCycle(41); // InsideOut p.135 - switch (addr) { + switch (offset) { case 0: // $E98001 return ReadCtrl(&cr.chan[1]); @@ -69,11 +64,11 @@ SCCDevice::Read(uint32 addr) } uint64 -SCCDevice::Write(uint32 addr, uint32 data) +SCCDevice::Write(uint32 offset, uint32 data) { gMPU->AddCycle(49); // InsideOut p.135 - switch (addr) { + switch (offset) { case 0: // $E98001 WriteCtrl(&cr.chan[1], data); return 0; @@ -94,9 +89,9 @@ SCCDevice::Write(uint32 addr, uint32 dat } uint64 -SCCDevice::Peek(uint32 addr) +SCCDevice::Peek(uint32 offset) { - switch (addr) { + switch (offset) { case 0: // $E98001 return PeekCtrl(&cr.chan[1]); @@ -192,7 +187,7 @@ SCCDevice::WriteCtrl(struct SIO::channel ResetChannel(&cr.chan[1]); break; case 3: // Force Hardware Reset - Reset(); + ResetHard(); break; default: __unreachable();