--- nono/vm/lunafb.h 2026/04/29 17:05:10 1.1.1.2 +++ nono/vm/lunafb.h 2026/04/29 17:05:18 1.1.1.4 @@ -59,6 +59,9 @@ class LunafbDevice : public PlaneVRAMDev uint64 Write16(uint32 addr, uint32 data) override; uint64 Write32(uint32 addr, uint32 data) override; uint64 Peek8(uint32 addr) override; + uint64 Poke8(uint32 addr, uint32 data) override; + + void UpdateInfo(TextScreen&, int x, int y) const override; // エミュレータによる出力 void EmuInitScreen(); @@ -71,6 +74,9 @@ class LunafbDevice : public PlaneVRAMDev // offset の VRAM が変更されたことを記録する inline void SetDirty(uint32 offset); + // X 方向にはみ出したときに対応する仮想画面の Y 座標を返す。 + int GetWrapY(int y) const override; + void WriteRFCNT(uint32); void WriteCommonBitmap8(uint32, uint32); void WriteCommonBitmap16(uint32, uint32); @@ -90,6 +96,8 @@ class LunafbDevice : public PlaneVRAMDev // 現在のプレーン数でのプレーンの終了アドレス uint32 plane_end {}; + // 現在のプレーン数での FCSet の(ブロック単位での)最終アドレス + uint32 fcset_end {}; // RFCNT // @@ -122,4 +130,6 @@ class LunafbDevice : public PlaneVRAMDev Monitor monitor { this }; }; -#define gLunafb (dynamic_cast(gPlaneVRAM)) +static inline LunafbDevice *GetLunafbDevice() { + return Object::GetObject(OBJ_PLANEVRAM); +}