--- nono/vm/printer.cpp 2026/04/29 17:05:14 1.1.1.7 +++ nono/vm/printer.cpp 2026/04/29 17:05:18 1.1.1.8 @@ -11,28 +11,22 @@ #include "printer.h" #include "mpu.h" -// グローバル参照用 -PrinterDevice *gPrinter; - // コンストラクタ PrinterDevice::PrinterDevice() - : inherited("Printer") + : inherited(OBJ_PRINTER) { - devaddr = baseaddr; - devlen = 0x2000; } // デストラクタ PrinterDevice::~PrinterDevice() { - gPrinter = NULL; } uint64 PrinterDevice::Read8(uint32 addr) { // 書き込み専用 - gMPU->AddCycle(7); // InsideOut p.135 + mpu->AddCycle(7); // InsideOut p.135 return (uint64)-1; } @@ -40,14 +34,14 @@ uint64 PrinterDevice::Read16(uint32 addr) { // 書き込み専用 - gMPU->AddCycle(7); // InsideOut p.135 + mpu->AddCycle(7); // InsideOut p.135 return (uint64)-1; } uint64 PrinterDevice::Write8(uint32 addr, uint32 data) { - gMPU->AddCycle(7); // InsideOut p.135 + mpu->AddCycle(7); // InsideOut p.135 uint32 offset = addr - baseaddr; switch (offset) {