--- nono/vm/planevram.h 2026/04/29 17:05:33 1.1.1.5 +++ nono/vm/planevram.h 2026/04/29 17:05:51 1.1.1.7 @@ -13,19 +13,21 @@ #include "device.h" #include "bitmap.h" +#include #include -#include class PlaneVRAMDevice : public IODevice { using inherited = IODevice; + using bitset1024 = std::bitset<1024>; + // 更新情報。 struct ModifyInfo { // 1ライン単位の更新フラグ。 // 仮想 Y 座標に対応するので Lunafb も TVRAM も 1024個。 - std::vector line {}; + bitset1024 line {}; // パレットを更新した場合やスクロールした場合のように、 // composite に変更がなくても bitmap を更新する必要がある場合は true。 @@ -36,11 +38,9 @@ class PlaneVRAMDevice : public IODevice PlaneVRAMDevice(int width_, int height_); ~PlaneVRAMDevice() override; + bool Init() override; void ResetHard(bool poweron) override; - // レンダリング時に使うテーブルを事前に計算する。 - void InitDeptable(); - // プレーン数を取得 uint GetPlaneCount() const { return nplane; } @@ -63,7 +63,7 @@ class PlaneVRAMDevice : public IODevice void Invalidate(); // 垂直 VRAM から BitmapI8 バッファを作成する - void RenderVRAMToComposite(const std::vector& modified); + void RenderVRAMToComposite(const bitset1024& modified); // BitmapI8 バッファから BitmapRGBX を作成する。 void RenderCompositeToRGBX(BitmapRGBX& dst,