--- nono/vm/gvram.cpp 2026/04/29 17:04:55 1.1.1.5 +++ nono/vm/gvram.cpp 2026/04/29 17:05:10 1.1.1.6 @@ -4,19 +4,21 @@ // Licensed under nono-license.txt // -#include "gvram.h" -#include "mpu.h" -#include "videoctlr.h" - // // GVRAM // + // GVRAM はワード単位でホストバイトオーダ配置なので、 // バイトアクセス時は HB() マクロを使用のこと。 -// -std::unique_ptr gGVRAM; +#include "gvram.h" +#include "mpu.h" +#include "videoctlr.h" + +// グローバル参照用 +GVRAMDevice *gGVRAM; +// コンストラクタ GVRAMDevice::GVRAMDevice() : inherited("GVRAM") { @@ -26,8 +28,10 @@ GVRAMDevice::GVRAMDevice() mem.reset(new uint8[devlen]); } +// デストラクタ GVRAMDevice::~GVRAMDevice() { + gGVRAM = NULL; } uint64