--- nono/m680x0/m68030mmu.cpp 2026/04/29 17:04:28 1.1 +++ nono/m680x0/m68030mmu.cpp 2026/04/29 17:04:49 1.1.1.4 @@ -1,10 +1,9 @@ // // 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" @@ -29,8 +28,8 @@ // ディスクリプタ #define MMU_DESC_S (0x00000100) #define MMU_DESC_CI (0x00000040) -#define MMU_DESC_M (0x00000010) -#define MMU_DESC_U (0x00000008) +#define MMU_DESC_M (0x00000010) +#define MMU_DESC_U (0x00000008) #define MMU_DESC_WP (0x00000004) #define MMU_DESC_DT (0x00000003) @@ -89,11 +88,11 @@ IPRINTF(int indent, const char *fmt, ... // テーブルサーチ操作クラス -class m68030MMU +class m68030MMU final { public: m68030MMU(m68kcpu *); - virtual ~m68030MMU() { } + ~m68030MMU() { } // サーチを実行 void search(); @@ -1466,7 +1465,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 +1487,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 +1504,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 +1513,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; } @@ -1554,7 +1553,7 @@ m68030MMU::dtname(uint32 dt) static char buf[32]; switch (dt) { case DT_INVALID: return "invalid"; - case DT_PAGE: return "page"; + case DT_PAGE: return "page"; case DT_VALID4: return "valid4"; case DT_VALID8: return "valid8"; } @@ -1854,7 +1853,7 @@ get_fc(m68kcpu *cpu) } // MMU 不当命令 (2ワード目で確定) -void +static void mmu_op_illg2(m68kcpu *cpu) { cpulog(1, "MMU 不当命令 %04x %04x", RegIR, RegIR2);