|
|
1.1 root 1: //
2: // nono
1.1.1.2 root 3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
1.1 root 5: //
6:
7: #pragma once
8:
9: #include "debugger_private.h"
1.1.1.2 root 10: #include "mpu680x0.h"
1.1 root 11: #include "m68030.h"
12: #include "m68030disasm.h"
13:
14: class DebuggerMD_m680x0 : public DebuggerMD
15: {
1.1.1.2 root 16: using inherited = DebuggerMD;
1.1 root 17: public:
1.1.1.2 root 18: DebuggerMD_m680x0(Debugger *parent, m68kcpu *cpu);
19: ~DebuggerMD_m680x0() override;
20:
21: void ReqSet(uint32 flag) override { cpu->atomic_reqflag |= flag; }
22: void ReqClr(uint32 flag) override { cpu->atomic_reqflag &= ~flag; }
23:
24: bool IsSuper() const override { return cpu->reg.s; }
25: bool MMUEnabled() const override { return cpu->mmu_enable; }
1.1.1.5 ! root 26: uint64 TranslateAddr(saddr_t laddr, bool lookup) const override;
1.1.1.2 root 27:
28: uint32 GetPC() const override { return RegPC; }
29:
30: void SetStepOut() override;
31: bool IsStepOut() const override;
1.1.1.5 ! root 32: bool IsOpStepIn(DebuggerMemoryStream& mem) override;
1.1.1.2 root 33: uint64 GetRegAddr(const char *name) const override;
34: void BackupRegs() override { prev = cpu->reg; }
35: bool ShowRegister(Console *cons, const std::vector<std::string>& args)
36: override;
1.1.1.5 ! root 37: const HelpMessages& GetHelpListReg() const override;
! 38: const HelpMessages& GetHelpReg() const override;
1.1 root 39:
1.1.1.3 root 40: BranchHistory& GetBrHist() const override { return cpu->brhist; }
41: BranchHistory& GetExHist() const override { return cpu->exhist; }
1.1.1.2 root 42:
43: bool CheckLEA(uint32 laddr) override { return false; }
1.1 root 44:
1.1.1.5 ! root 45: bool Disassemble(DebuggerMemoryStream& mem,
1.1.1.2 root 46: std::string& mnemonic, std::vector<uint8>& bin) override;
1.1 root 47: std::string FormatDisasm(const std::string& mnemonic,
1.1.1.2 root 48: const std::vector<uint8>& bin) override;
1.1 root 49: std::string FormatDisasmLive(const std::string& mnemonic,
1.1.1.2 root 50: const std::vector<uint8>& bin) override;
1.1 root 51:
1.1.1.4 root 52: const char *GetExceptionName(int vector) const override;
53:
1.1 root 54: private:
1.1.1.4 root 55: m68kcpu *cpu {}; // CPU コア
56: m68kreg prev {}; // 前回のレジスタセットのコピー
1.1 root 57:
58: const char *CondStr(const std::vector<uint16>& ir);
59: bool IsOPcc(uint16 op);
60: bool IsDBcc(uint16 op);
61: bool IsCond(uint16 op);
62:
1.1.1.5 ! root 63: static const HelpMessages HelpListReg;
! 64: static const HelpMessages HelpReg;
1.1.1.2 root 65: void ShowRegMain(Console *cons);
66: void ShowRegFPU(Console *cons);
67: void ShowRegMMU(Console *cons);
68: void ShowRegATC(Console *cons);
69: void ShowRegOther(Console *cons);
70:
1.1.1.4 root 71: uint32 so_a7 {}; // ステップアウト判定用
72: uint16 so_sr {};
1.1 root 73: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.