--- nono/vm/crtc2.cpp 2026/04/29 17:04:41 1.1.1.5 +++ nono/vm/crtc2.cpp 2026/04/29 17:04:55 1.1.1.7 @@ -7,13 +7,13 @@ #include "crtc2.h" #include "renderer.h" +std::unique_ptr gCRTC2; + CRTC2Device::CRTC2Device() + : inherited("CRTC2") { - logname = "crtc2"; - devname = "CRTC2"; devaddr = 0xd1000000; - vdisp_event.dev = this; vdisp_event.func = (DeviceCallback_t)&CRTC2Device::VDispCallback; vdisp_event.SetName("CRTC2 V-DISP"); } @@ -41,11 +41,11 @@ CRTC2Device::ResetHard() } uint64 -CRTC2Device::Read(uint32 addr) +CRTC2Device::Read(uint32 offset) { uint32 data; - switch (addr) { + switch (offset) { case 0: // アドレスレジスタ // アドレスレジスタは書き込み専用 // XXX 何が読めるか @@ -84,9 +84,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 +117,9 @@ CRTC2Device::Write(uint32 addr, uint32 d } uint64 -CRTC2Device::Peek(uint32 addr) +CRTC2Device::Peek(uint32 offset) { - switch (addr) { + switch (offset) { case 0: // アドレスレジスタ return ar;