--- nono/m680x0/m68030disasm.cpp 2026/04/29 17:04:40 1.1.1.4 +++ nono/m680x0/m68030disasm.cpp 2026/04/29 17:04:43 1.1.1.5 @@ -9,8 +9,8 @@ #include "mystring.h" // コンストラクタ -m680x0disasm::m680x0disasm(DebuggerMD *md_) - : inherited(md_) +m680x0disasm::m680x0disasm(DebuggerMemoryStream& mem_) + : inherited(mem_) { } @@ -21,7 +21,7 @@ m680x0disasm::~m680x0disasm() // 逆アセンブルを実行 bool -m680x0disasm::Exec(saddr_t addr) +m680x0disasm::Exec() { ExecInit(); @@ -31,8 +31,7 @@ m680x0disasm::Exec(saddr_t addr) src.clear(); dst.clear(); - pc = addr; - pc0 = pc.addr; + pc0 = (uint32)mem.laddr; switch (fetch16() >> 6) { #include "m68030switch.h" @@ -87,17 +86,16 @@ m680x0disasm::Exec(saddr_t addr) uint32 m680x0disasm::peek16() { - return md->PeekFetch(pc); + return mem.PeekInst(); } // ワードフェッチ uint32 m680x0disasm::fetch16() { - uint16 data = peek16(); - // IR に入れて PC を進める + uint16 data = mem.FetchInst(); + // IR にも入れる ir.push_back(data); - pc.addr += 2; return data; } @@ -214,7 +212,7 @@ m680x0disasm::make_ea(uint mmrr) s = addr32(); break; case 0x3a: // d16(pc) - s = addr32(pc.addr + (int32)(int16)fetch16()) + + s = addr32((uint32)mem.laddr + (int32)(int16)fetch16()) + "(" + make_reg(Reg::PC) + ")"; break; case 0x3b: // d8(pc,IX)