--- nono/vm/pio.cpp 2026/04/29 17:05:29 1.1.1.14 +++ nono/vm/pio.cpp 2026/04/29 17:05:51 1.1.1.17 @@ -29,9 +29,11 @@ #include "pio.h" #include "bitops.h" #include "dipsw.h" +#include "event.h" #include "interrupt.h" #include "lcd.h" #include "mainapp.h" +#include "monitor.h" #include "mpu64180.h" #include "power.h" #include "scheduler.h" @@ -330,9 +332,9 @@ PIO0Device::PIO0Device() } // PIO0/PIO1 - monitor.func = ToMonitorCallback(&PIO0Device::MonitorUpdate); - monitor.SetSize(76, 15); - monitor.Regist(ID_MONITOR_PIO); + monitor = gMonitorManager->Regist(ID_MONITOR_PIO, this); + monitor->func = ToMonitorCallback(&PIO0Device::MonitorUpdate); + monitor->SetSize(76, 15); } // デストラクタ @@ -344,10 +346,6 @@ PIO0Device::~PIO0Device() bool PIO0Device::Init() { - if (inherited::Init() == false) { - return false; - } - interrupt = GetInterruptDevice(); pio1 = GetPIO1Device(); @@ -527,7 +525,7 @@ PIO0Device::GetPA() const data |= ((int)dipsw1[i]) << i; } if (msb_first) { - data = bitrev(data); + data = bitrev8(data); } return data & 0xff; } @@ -541,7 +539,7 @@ PIO0Device::GetPB() const data |= ((int)dipsw2[i]) << i; } if (msb_first) { - data = bitrev(data); + data = bitrev8(data); } return data & 0xff; } @@ -664,10 +662,6 @@ PIO1Device::~PIO1Device() bool PIO1Device::Init() { - if (inherited::Init() == false) { - return false; - } - lcd = GetLCDDevice(); mpu64180 = GetMPU64180Device(); powerdev = GetPowerDevice();