Fix gfx debugger with branch calls (#570)

* increase gfx debugger line buffer size

* fix gfx exec stack branch calls
This commit is contained in:
Archez
2024-05-08 10:18:43 -04:00
committed by GitHub
parent 61e304d21f
commit d2f8965781
2 changed files with 7 additions and 5 deletions
+6 -4
View File
@@ -2935,7 +2935,7 @@ bool gfx_dl_otr_filepath_handler_custom(F3DGfx** cmd0) {
} else {
if (nDL != nullptr) {
(*cmd0) = nDL;
g_exec_stack.branch(*cmd0);
g_exec_stack.branch(cmd);
return true; // shortcut cmd increment
} else {
assert(0 && "???");
@@ -2965,7 +2965,7 @@ bool gfx_dl_handler_common(F3DGfx** cmd0) {
}
} else {
(*cmd0) = subGFX;
g_exec_stack.branch(*cmd0);
g_exec_stack.branch(cmd);
return true; // shortcut cmd increment
}
return false;
@@ -3008,7 +3008,7 @@ bool gfx_dl_index_handler(F3DGfx** cmd0) {
}
} else {
(*cmd0) = subGFX;
g_exec_stack.branch(*cmd0);
g_exec_stack.branch(cmd);
return true; // shortcut cmd increment
}
return false;
@@ -3023,6 +3023,7 @@ bool gfx_pushcd_handler_custom(F3DGfx** cmd0) {
// TODO handle special OTR opcodes later...
bool gfx_branch_z_otr_handler_f3dex2(F3DGfx** cmd0) {
// Push return address
F3DGfx* cmd = (*cmd0);
uint8_t vbidx = (uint8_t)((*cmd0)->words.w0 & 0x00000FFF);
uint32_t zval = (uint32_t)((*cmd0)->words.w1);
@@ -3036,7 +3037,8 @@ bool gfx_branch_z_otr_handler_f3dex2(F3DGfx** cmd0) {
if (gfx != 0) {
(*cmd0) = gfx;
return true;
g_exec_stack.branch(cmd);
return true; // shortcut cmd increment
}
}
return false;
+1 -1
View File
@@ -95,7 +95,7 @@ void GfxDebuggerWindow::DrawDisasNode(const F3DGfx* cmd, std::vector<const F3DGf
gfxd_input_buffer(input.data(), sizeof(uint32_t) * size * 2);
gfxd_endian(gfxd_endian_host, sizeof(uint32_t));
char buff[256] = { 0 };
char buff[512] = { 0 };
gfxd_output_buffer(buff, sizeof(buff));
gfxd_enable(gfxd_emit_dec_color);
gfxd_target(gfxd_f3dex2);