--- nono/vm/bt45x.cpp 2026/04/29 17:05:33 1.1.1.5 +++ nono/vm/bt45x.cpp 2026/04/29 17:05:59 1.1.1.8 @@ -76,16 +76,13 @@ BT45xDevice::GetConfigPlaneCount() bool BT45xDevice::Init() { - if (inherited::Init() == false) { - return false; - } - int n = GetConfigPlaneCount(); // ここに来ているということはエラーは起きなかったはず。 assert(n >= 0); nplane = n; lunafb = GetLunafbDevice(); + uimessage = gMainApp.GetUIMessage(); // 継承先のコンストラクタでセットしている。 assert(palettes != 0); @@ -334,17 +331,6 @@ BT45xDevice::MakeHostColor(uint idx_) // 通知が必要なら別途行うこと。 } -// ゲストパレットを uint32 形式にしたものの一覧を返す。(GUI 用) -const std::vector -BT45xDevice::GetIntPalette() const -{ - std::vector ipal; - for (uint n = 0; n < palettes; n++) { - ipal.push_back(PaletteToInt(n)); - } - return ipal; -} - // 通知 void BT45xDevice::Notify() @@ -353,7 +339,7 @@ BT45xDevice::Notify() lunafb->Invalidate2(); // UI にも通知 - UIMessage::Post(UIMessage::PALETTE); + uimessage->Post(UIMessage::PALETTE); } /*static*/ const char @@ -375,7 +361,7 @@ BT454Device::BT454Device() // 使わないけど一応 readmask = 0x0f; - monitor->func = ToMonitorCallback(&BT454Device::MonitorUpdate); + monitor->SetCallback(&BT454Device::MonitorScreen); monitor->SetSize(63, 3); } @@ -385,7 +371,7 @@ BT454Device::~BT454Device() } void -BT454Device::MonitorUpdate(Monitor *, TextScreen& screen) +BT454Device::MonitorScreen(Monitor *, TextScreen& screen) { screen.Clear(); screen.Puts(0, 0, "Model: Bt454"); @@ -452,7 +438,7 @@ BT458Device::BT458Device() // 初期化されないそうなのでゴミを入れておく readmask = 0xcc; - monitor->func = ToMonitorCallback(&BT458Device::MonitorUpdate); + monitor->SetCallback(&BT458Device::MonitorScreen); monitor->SetSize(116, 18); } @@ -487,7 +473,7 @@ BT458Device::Init() } void -BT458Device::MonitorUpdate(Monitor *, TextScreen& screen) +BT458Device::MonitorScreen(Monitor *, TextScreen& screen) { screen.Clear(); screen.Puts(0, 0, "Model: Bt458");