--- nono/m680x0/m68030mmu.cpp 2026/04/29 17:04:28 1.1 +++ nono/m680x0/m68030mmu.cpp 2026/04/29 17:04:34 1.1.1.3 @@ -1,16 +1,16 @@ // // nono -// Copyright (C) 2017 isaki@NetBSD.org +// Copyright (C) 2020 nono project +// Licensed under nono-license.txt // -#include "header.h" -#include "mystring.h" #include "m68030core.h" #include "m68030bus.h" #include "m68030ea.h" #include "m68030mmu.h" #include "bus.h" #include "mpu.h" +#include "mystring.h" #define TIA (0) #define TIB (1) @@ -89,11 +89,11 @@ IPRINTF(int indent, const char *fmt, ... // テーブルサーチ操作クラス -class m68030MMU +class m68030MMU final { public: m68030MMU(m68kcpu *); - virtual ~m68030MMU() { } + ~m68030MMU() { } // サーチを実行 void search(); @@ -1466,7 +1466,7 @@ m68030MMU::phys_read_32(uint32 addr) // 物理バスアクセス cpu->bus.ssw = SSW_BUS_R | FC_SD; - data = m68030_phys_read_32(addr); + data = vm_phys_read_32(addr); if ((int64)data < 0) return data; @@ -1488,7 +1488,7 @@ m68030MMU::phys_write_32(uint32 addr, ui // 物理バスアクセス cpu->bus.ssw = SSW_BUS_W | FC_SD; - berr = m68030_phys_write_32(addr, data); + berr = vm_phys_write_32(addr, data); if ((int64)berr < 0) return berr; @@ -1505,7 +1505,7 @@ m68030MMU::phys_peek_32(uint32 addr) uint32 data; // 1バイト目はバスエラーを検査。 - peekdata = m68030_phys_peek_8(addr); + peekdata = vm_phys_peek_8(addr); if ((int64)peekdata < 0) { // バスエラー return -1; @@ -1514,9 +1514,9 @@ m68030MMU::phys_peek_32(uint32 addr) // ここはロングワード境界でアクセスしてるはずなので、 // 先頭バイト以外のバスエラーチェックは不要。 - data |= m68030_phys_peek_8(addr + 1) << 16; - data |= m68030_phys_peek_8(addr + 2) << 8; - data |= m68030_phys_peek_8(addr + 3); + data |= vm_phys_peek_8(addr + 1) << 16; + data |= vm_phys_peek_8(addr + 2) << 8; + data |= vm_phys_peek_8(addr + 3); return data; } @@ -1854,7 +1854,7 @@ get_fc(m68kcpu *cpu) } // MMU 不当命令 (2ワード目で確定) -void +static void mmu_op_illg2(m68kcpu *cpu) { cpulog(1, "MMU 不当命令 %04x %04x", RegIR, RegIR2);