--- nono/vm/sio.cpp 2026/04/29 17:05:37 1.1.1.15 +++ nono/vm/sio.cpp 2026/04/29 17:05:49 1.1.1.17 @@ -10,6 +10,7 @@ #define MPSCC_SIO_LOG_HACK #include "sio.h" +#include "event.h" #include "hostcom.h" #include "keyboard.h" #include "mainapp.h" @@ -47,14 +48,6 @@ SIODevice::SIODevice() mpscc.chan[0].xc12_ns = 78.125_usec; mpscc.chan[1].xc12_ns = 78.125_usec; - // LUNA では SIO と呼ぶほうが通りがいい。 - // イベントの登録は親クラスで行ってある。 - for (int ch = 0; ch < txevent.size(); ch++) { - auto& chan = mpscc.chan[ch]; - txevent[ch].SetName(string_format("SIO Ch%c TX", chan.name)); - rxevent[ch].SetName(string_format("SIO Ch%c RX", chan.name)); - } - monitor = gMonitorManager->Regist(ID_MONITOR_SIO, this); monitor->func = ToMonitorCallback(&SIODevice::MonitorUpdate); monitor->SetSize(70, 24); @@ -73,8 +66,18 @@ SIODevice::Init() return false; } + hostcom->SetPortName("SIO Ch.A"); + keyboard = GetKeyboard(); + // LUNA では SIO と呼ぶほうが通りがいい。 + // イベントの登録は親クラスで行ってある。 + for (int ch = 0; ch < txevent.size(); ch++) { + auto& chan = mpscc.chan[ch]; + txevent[ch]->SetName(string_format("SIO Ch%c TX", chan.name)); + rxevent[ch]->SetName(string_format("SIO Ch%c RX", chan.name)); + } + return true; }