--- nono/vm/crtc2.cpp 2026/04/29 17:04:41 1.1.1.5 +++ nono/vm/crtc2.cpp 2026/04/29 17:04:50 1.1.1.6 @@ -7,6 +7,8 @@ #include "crtc2.h" #include "renderer.h" +std::unique_ptr gCRTC2; + CRTC2Device::CRTC2Device() { logname = "crtc2"; @@ -41,11 +43,11 @@ CRTC2Device::ResetHard() } uint64 -CRTC2Device::Read(uint32 addr) +CRTC2Device::Read(uint32 offset) { uint32 data; - switch (addr) { + switch (offset) { case 0: // アドレスレジスタ // アドレスレジスタは書き込み専用 // XXX 何が読めるか @@ -84,9 +86,9 @@ CRTC2Device::Read(uint32 addr) } uint64 -CRTC2Device::Write(uint32 addr, uint32 data) +CRTC2Device::Write(uint32 offset, uint32 data) { - switch (addr) { + switch (offset) { case 0: // アドレスレジスタ ar = data & 0x3f; putlog(3, "アドレスレジスタ <- $%02x", ar); @@ -117,9 +119,9 @@ CRTC2Device::Write(uint32 addr, uint32 d } uint64 -CRTC2Device::Peek(uint32 addr) +CRTC2Device::Peek(uint32 offset) { - switch (addr) { + switch (offset) { case 0: // アドレスレジスタ return ar;