--- nono/debugger/debugger_hd64180.cpp 2026/04/29 17:05:16 1.1.1.1 +++ nono/debugger/debugger_hd64180.cpp 2026/04/29 17:05:49 1.1.1.5 @@ -53,11 +53,12 @@ DebuggerMD_hd64180::GetCPUState() const } } -// アドレス変換 (lookup は不要) -uint64 -DebuggerMD_hd64180::TranslateAddr(saddr_t laddr, bool lookup) const +// アドレス変換 +busaddr +DebuggerMD_hd64180::TranslateAddr(busaddr laddr) const { - return cpu->TranslatePeek((uint32)laddr); + uint32 paddr = cpu->TranslatePeek(laddr.Addr()); + return busaddr(paddr); } // ステップアウトを設定する @@ -160,10 +161,10 @@ DebuggerMD_hd64180::ShowRegister(FILE *c bool DebuggerMD_hd64180::ShowRegMain(FILE *cons) { - // AF:00 00 (------) PC:0000 AF':00 00 (-------) + // AF:00 00 (------) PC:0000 AF':00 00 // BC:00 00 SP:0000 BC':00 00 - // DE:00 00 IX:0000 I:00 DE':00 00 IX':0000 - // HL:00 00 IY:0000 R:00 HL':00 00 IY':0000 + // DE:00 00 IX:0000 I:00 DE':00 00 + // HL:00 00 IY:0000 R:00 HL':00 00 uint8 reg_i = cpu->GetI(); uint8 reg_r = cpu->GetR(); @@ -192,17 +193,14 @@ DebuggerMD_hd64180::ShowRegMain(FILE *co bool vi = (reg_i != prev_i); std::string fstr1 = FlagStr(cpu->reg.f); - std::string fstr2 = FlagStr(cpu->reg.ex.f); - fprintf(cons, "AF:%s%02x%s %s%02x%s (%s) PC:%04x " - "AF':%s%02x%s %s%02x%s (%s)\n", + "AF':%s%02x%s %s%02x%s\n", BOLDIF(va), cpu->reg.a, NORM, BOLDIF(vf), cpu->reg.f.Get(), NORM, fstr1.c_str(), cpu->reg.pc, BOLDIF(vxa), cpu->reg.ex.a, NORM, - BOLDIF(vxf), cpu->reg.ex.f.Get(), NORM, - fstr2.c_str()); + BOLDIF(vxf), cpu->reg.ex.f.Get(), NORM); fprintf(cons, "BC:%s%02x%s %s%02x%s SP:%s%04x%s " "BC':%s%02x%s %s%02x%s\n", BOLDIF(vb), cpu->reg.b, NORM, @@ -294,7 +292,7 @@ DebuggerMD_hd64180::Disassemble(Debugger { hd64180disasm dis; if (dis.Exec(&mem) == false) { - return "dis.Exec() failed"; + return "dis.Exec() failed."; } // dis.bin は uint8 列なのでそのままダンプ。 @@ -348,3 +346,11 @@ DebuggerMD_hd64180::CondStr(const std::v // 条件命令ではない return ""; } + +// 命令ニーモニックに対するバイナリを文字列形式で返す。 +// 対応しない場合は "" を返す。cmd_bi 用。 +std::string +DebuggerMD_hd64180::ParseInst(const std::string& inst) const +{ + return ""; +}