--- nono/vm/bt45x.h 2026/04/29 17:05:29 1.1.1.3 +++ nono/vm/bt45x.h 2026/04/29 17:06:00 1.1.1.6 @@ -12,9 +12,9 @@ #include "device.h" #include "color.h" -#include "monitor.h" -class Renderer; +class LunafbDevice; +class UIMessage; class BT45xDevice : public IODevice { @@ -33,11 +33,11 @@ class BT45xDevice : public IODevice // プレーン数を取得 uint GetPlaneCount() const { return nplane; } - // ホストパレットのアドレスを取得 + // ホストパレットを取得。(レンダラとかからの参照用) const std::vector& GetHostPalette() const { return hostcolor; } - // 生パレットを uint32 形式にしたものを返す (GUI 用) - const std::vector GetIntPalette() const; + // ゲストパレットを取得。(GUI 情報表示用) + const std::vector& GetGuestPalette() const { return color; } // BusIO インタフェース // (内蔵 ROM からのアクセス用に特別に public にしてある) @@ -116,12 +116,13 @@ class BT45xDevice : public IODevice // see https://twitter.com/tsutsuii/status/356704682514714625 std::vector hostcolor {}; - Renderer *renderer {}; - - Monitor monitor { this }; + Monitor *monitor {}; // ログ出力用 static const char rgbstr[3]; + + LunafbDevice *lunafb {}; + UIMessage *uimessage {}; }; // Bt454 @@ -135,7 +136,7 @@ class BT454Device : public BT45xDevice ~BT454Device() override; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); uint32 ReadControl() override; void WriteControl(uint32 data) override; @@ -155,7 +156,7 @@ class BT458Device : public BT45xDevice bool Init() override; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); uint32 ReadControl() override; void WriteControl(uint32 data) override; @@ -173,6 +174,6 @@ class BT458Device : public BT45xDevice uint8 testreg {}; // テストレジスタ }; -static inline BT45xDevice *GetBT45xDevice() { +inline BT45xDevice *GetBT45xDevice() { return Object::GetObject(OBJ_BT45x); }