--- nono/m680x0/testea.cpp 2026/04/29 17:05:15 1.1.1.3 +++ nono/m680x0/testea.cpp 2026/04/29 17:05:26 1.1.1.4 @@ -19,7 +19,7 @@ static int g_fetch_ptr; // ダミーのフェッチルーチン // グローバル変数 g_fetch[] で指定された値を順に返す uint32 -MPU680x0Device::fetch_16() +MPU680x0Device::fetch_2() { uint16 data; @@ -31,26 +31,32 @@ MPU680x0Device::fetch_16() } uint32 -MPU680x0Device::fetch_32() +MPU680x0Device::fetch_4() { uint32 data; - data = fetch_16() << 16; - data |= fetch_16(); + data = fetch_2() << 16; + data |= fetch_2(); return data; } -uint32 MPU680x0Device::read_8(uint32 ea) { return 0; } -uint32 MPU680x0Device::read_16(uint32 ea) { return 0; } + // ダミーリード // アドレスを2倍にして返す。 // メモリ間接の post index、pre index を演算だけで判別するため。 uint32 -MPU680x0Device::read_32(uint32 ea) { - return ea << 1; +MPU680x0Device::read_data(busaddr laddr) +{ + if (laddr.GetSize() == 4) { + return laddr.Addr() << 1; + } + return 0; +} + +void +MPU680x0Device::write_data(busaddr laddr, uint32 data) +{ } -void MPU680x0Device::write_8(uint32 ea, uint32 data) { } -void MPU680x0Device::write_16(uint32 ea, uint32 data) { } -void MPU680x0Device::write_32(uint32 ea, uint32 data) { } + void panic_func(const char *func, const char *fmt, ...) {