--- nono/vm/scc.cpp 2026/04/29 17:05:28 1.1.1.14 +++ nono/vm/scc.cpp 2026/04/29 17:05:50 1.1.1.17 @@ -10,6 +10,7 @@ #include "scc.h" #include "bitops.h" +#include "event.h" #include "hostcom.h" #include "keyboard.h" @@ -55,17 +56,9 @@ SCCDevice::SCCDevice() pclk_ns = 250_nsec; } - // X680x0 では SCC と呼ぶほうが通りがいい。 - // イベントの登録は親クラスで行ってある。 - for (int ch = 0; ch < txevent.size(); ch++) { - auto& chan = mpscc.chan[ch]; - txevent[ch].SetName(string_format("SCC Ch%c TX", chan.name)); - rxevent[ch].SetName(string_format("SCC Ch%c RX", chan.name)); - } - - monitor.func = ToMonitorCallback(&SCCDevice::MonitorUpdate); - monitor.SetSize(70, 35); - monitor.Regist(ID_MONITOR_SCC); + monitor = gMonitorManager->Regist(ID_MONITOR_SCC, this); + monitor->func = ToMonitorCallback(&SCCDevice::MonitorUpdate); + monitor->SetSize(70, 35); } // デストラクタ @@ -81,10 +74,20 @@ SCCDevice::Init() return false; } + hostcom->SetPortName("SCC Ch.A"); + if (gMainApp.IsX68030()) { keyboard = GetKeyboard(); } + // X680x0 では SCC と呼ぶほうが通りがいい。 + // イベントの登録は親クラスで行ってある。 + for (int ch = 0; ch < txevent.size(); ch++) { + auto& chan = mpscc.chan[ch]; + txevent[ch]->SetName(string_format("SCC Ch%c TX", chan.name)); + rxevent[ch]->SetName(string_format("SCC Ch%c RX", chan.name)); + } + return true; }