--- nono/vm/mfp.cpp 2026/04/29 17:04:45 1.1.1.7 +++ nono/vm/mfp.cpp 2026/04/29 17:04:50 1.1.1.8 @@ -8,7 +8,6 @@ #include "interrupt.h" #include "keyboard.h" #include "mpu680x0.h" -#include "mystring.h" std::unique_ptr gMFP; @@ -40,24 +39,10 @@ MFPDevice::~MFPDevice() { } -// 本体リセットスイッチによるリセット +// デバイスリセット void MFPDevice::ResetHard() { - Reset(); -} - -// MPU の RESET 命令によるリセット -void -MFPDevice::ResetSoft() -{ - Reset(); -} - -// リセット(共通) -void -MFPDevice::Reset() -{ // All internal registers are cleared expect the TxDR, UDR, and TSR. mfp.aer = 0; mfp.ddr = 0; @@ -97,13 +82,13 @@ MFPDevice::Reset() } uint64 -MFPDevice::Read(uint32 addr) +MFPDevice::Read(uint32 offset) { uint8 data; gMPU->AddCycle(24); // InsideOut p.135 - switch (addr) { + switch (offset) { case MFP::GPIP: data = mfp.gpip; break; @@ -184,11 +169,11 @@ MFPDevice::Read(uint32 addr) } uint64 -MFPDevice::Write(uint32 addr, uint32 data) +MFPDevice::Write(uint32 offset, uint32 data) { gMPU->AddCycle(24); // InsideOut p.135 - switch (addr) { + switch (offset) { case MFP::GPIP: putlog(0, "GPIP <- $%02x 未実装書き込み", data); mfp.gpip = data; @@ -305,11 +290,11 @@ MFPDevice::Write(uint32 addr, uint32 dat } uint64 -MFPDevice::Peek(uint32 addr) +MFPDevice::Peek(uint32 offset) { uint8 data; - switch (addr) { + switch (offset) { case MFP::GPIP: data = mfp.gpip; break;