--- nono/vm/cmmu.cpp 2026/04/29 17:04:55 1.1.1.3 +++ nono/vm/cmmu.cpp 2026/04/29 17:05:10 1.1.1.4 @@ -4,15 +4,18 @@ // Licensed under nono-license.txt // +// // M88200 CMMU の I/O デバイス部分 - -#include "cmmu.h" -#include "mpu88xx0.h" +// // CMMU が確定しない場合はこのデバイスのログを使う。 // CMMU が確定したらそっちのデバイスログから出力する。 -std::unique_ptr gCMMU; +#include "cmmu.h" +#include "mpu88xx0.h" + +// グローバル参照用 +CMMUDevice *gCMMU; // コンストラクタ CMMUDevice::CMMUDevice() @@ -23,6 +26,7 @@ CMMUDevice::CMMUDevice() // デストラクタ CMMUDevice::~CMMUDevice() { + gCMMU = NULL; } bool @@ -196,7 +200,7 @@ CMMUDevice::Write32(uint32 addr, uint32 case BWP0 ... BWP7: n = (offset - BWP0) / 4; assert(n < 8); - cmmu->SetBATC(n, data); + cmmu->SetBWP(n, data); return 0; case CDP0 ... CDP3: @@ -211,7 +215,7 @@ CMMUDevice::Write32(uint32 addr, uint32 break; } putlog(0, "未実装書き込み $%08x <- $%08x", addr, data); - PANIC(" "); + VMPANIC("not impl"); return 0; }