--- nono/vm/tvram.cpp 2026/04/29 17:05:43 1.1.1.14 +++ nono/vm/tvram.cpp 2026/04/29 17:06:01 1.1.1.16 @@ -12,11 +12,13 @@ // バイトアクセス時は HLB()、ワードアクセス時は HLW() マクロを使用のこと。 #include "tvram.h" +#include "event.h" #include "textscreen.h" #include "videoctlr.h" // InsideOut p.135 -static const busdata wait = busdata::Wait(9 * 40_nsec); +/*static*/ const busdata +TVRAMDevice::wait = busdata::Wait(9 * 40_nsec); // コンストラクタ TVRAMDevice::TVRAMDevice() @@ -43,17 +45,17 @@ TVRAMDevice::Init() return false; } - constexpr uint devlen = 512 * 1024; + constexpr size_t devlen = 512 * 1024; mem.reset(new(std::nothrow) uint8[devlen]); if ((bool)mem == false) { - warnx("Cannot allocate %u bytes at %s", devlen, __method__); + warnx("Could not allocate %zu bytes at %s", devlen, __method__); return false; } videoctlr = GetVideoCtlrDevice(); - // 加工済みパレットを取得 - palette = &(videoctlr->GetHostPalette())[0]; + // 加工済みテキストパレットを取得。 + palette = videoctlr->GetHostPalettePtr(256); return true; }