SSV and SLV switched, fix shift in SBV, implement "Dump RDRAM" and "Dump IMEM" buttons in GUI

This commit is contained in:
CocoSimone
2022-10-06 02:17:36 +02:00
parent 89daa969eb
commit 73d65c2246
6 changed files with 101 additions and 49 deletions

View File

@@ -182,6 +182,20 @@ void Window::Render(n64::Core& core) {
NFD_FreePath(outpath);
}
}
if (ImGui::MenuItem("Dump RDRAM")) {
FILE *fp = fopen("rdram.dump", "wb");
u8 *temp = core.mem.GetRDRAM();
util::SwapBuffer32(RDRAM_SIZE, temp);
fwrite(temp, 1, RDRAM_SIZE, fp);
fclose(fp);
}
if (ImGui::MenuItem("Dump IMEM")) {
FILE *fp = fopen("imem.dump", "wb");
u8 *temp = core.mem.mmio.rsp.imem;
util::SwapBuffer32(IMEM_SIZE, temp);
fwrite(temp, 1, IMEM_SIZE, fp);
fclose(fp);
}
if (ImGui::MenuItem("Exit")) {
core.done = true;
}