--- nono/vm/videoctlr.h 2026/04/29 17:04:36 1.1.1.1 +++ nono/vm/videoctlr.h 2026/04/29 17:04:45 1.1.1.4 @@ -23,11 +23,13 @@ class VideoCtlrDevice public: VideoCtlrDevice(); - ~VideoCtlrDevice() override; + virtual ~VideoCtlrDevice() override; - // パレットのバッファアドレスを取得 - // レンダラとかからの参照用? - const uint16 *GetPalette() const { return &palette.w[0]; } + void ResetHard() override; + + // 加工済みテキストパレットの先頭アドレスを取得 + // レンダラとかからの参照用 + const uint32 *GetCookedPalette() const { return cooked_palette; } protected: // BusIO インタフェース @@ -40,12 +42,16 @@ class VideoCtlrDevice void SetR0(uint32 data); void SetR1(uint32 data); void SetR2(uint32 data); + void MakePalette(); struct videoctlr videoctlr {}; union { uint8 b[1024]; uint16 w[512]; } palette {}; + + // xBGR32 形式のテキストパレット (レンダラ用に加工したもの) + uint32 cooked_palette[16] {}; }; extern std::unique_ptr gVideoCtlr;