--- nono/vm/bitmap.h 2026/04/29 17:04:28 1.1 +++ nono/vm/bitmap.h 2026/04/29 17:04:31 1.1.1.2 @@ -42,11 +42,16 @@ class BitmapDevice } // ビットマップのアドレスを取得 - const uint8 *GetBuf() const { return mem; } + const uint8 *GetBuf() const { return mem.get(); } // 更新フラグのアドレスを取得 std::atomic *GetDirty() { return atomic_dirty; } + // エミュレータによる出力 + void EmuConsoleOpen(TextScreen *t); + void EmuConsoleUpdate(); + void EmuConsoleClose(); + private: void Invalidate(); void WriteRFCNT(uint32); @@ -84,7 +89,7 @@ class BitmapDevice // ビットマッププレーン。 // ロングワードでホストバイトオーダー。 // 1枚が 256KB。1 or 4枚 - uint8 *mem = NULL; + std::unique_ptr mem {}; // 更新フラグ。 // 更新があったラインは 1、なければ 0。 @@ -95,6 +100,15 @@ class BitmapDevice // ファンクションセットとアクセスマスク u_int fcs[MAX_PLANES] {}; uint32 mask[MAX_PLANES] {}; + + // エミュレータによるコンソール出力 + TextScreen *textscr; + std::unique_ptr prev; + int screen_w; // 桁数 + int screen_h; // 行数 + int origin_x; // 原点 X [dot] + int origin_y; // 原点 Y [dot] + }; -extern BitmapDevice *gBitmap; +extern std::unique_ptr gBitmap;