Mem and Regs not part of cpu anymore.

This commit is contained in:
SimoZ64
2025-08-01 21:05:11 +02:00
parent 812b905bdf
commit 010bb5e0bb
35 changed files with 246 additions and 250 deletions

View File

@@ -58,8 +58,6 @@ void InstructionFunc(s64, s64, Disassembler::DisassemblyResult& disasm) {
void CommentFunc(s64, s64, Disassembler::DisassemblyResult& disasm) {
n64::Core& core = n64::Core::GetInstance();
n64::Mem& mem = core.cpu->GetMem();
n64::Registers& regs = core.cpu->GetRegs();
if(!disasm.success) {
ImGui::TextColored(ImColor(0xff71efe5), "");
@@ -92,10 +90,10 @@ void CommentFunc(s64, s64, Disassembler::DisassemblyResult& disasm) {
ImGui::TableNextRow();
for(u32 col = 0; col < 16; col+=4) {
u32 paddr;
if(!regs.cop0.MapVAddr(n64::Cop0::LOAD, vaddr+row*0x10+col, paddr))
if(!n64::Core::GetRegs().cop0.MapVAddr(n64::Cop0::LOAD, vaddr+row*0x10+col, paddr))
continue;
u32 val = mem.Read<u32>(paddr);
u32 val = n64::Core::GetMem().Read<u32>(paddr);
ImGui::TableSetColumnIndex(col+0);
ImGui::Text("%02X", (val >> 24) & 0xff);
@@ -114,7 +112,7 @@ void CommentFunc(s64, s64, Disassembler::DisassemblyResult& disasm) {
bool Debugger::render() {
n64::Core& core = n64::Core::GetInstance();
n64::Registers& regs = core.cpu->GetRegs();
n64::Registers& regs = core.GetRegs();
if(!enabled)
return false;