forked from Ports/goldeneye-pc-port
M-27: D146 unknown-GBI-opcode -> end DL instead of abort(); tools_pc/debug.ps1
D146 (port/fast3d/gfx_pc.cpp): an unrecognised opcode in the DL walk called sysFatalError() -> abort() -> whole process dies with no ge007.crash.log (the crash handler does not cover abort). Seen on the real post-Dam MISSION COMPLETE screen: "[FATAL] Unknown GBI opcode 0x40c03 at 0x70161a8c" - a front-end 3D model (dossier, D75/D144 family) whose display list was never built, sitting at a valid DRAM address full of junk. D144 guarded the bad matrix pointer; the walk then hit more garbage. Now: log loudly (rate-limited x20) and `return` to end the (sub-)DL so the frame finishes. A real level-render desync is still visible in the log. tools_pc/debug.ps1: launch the port under gdb from the repo root so a playtest crash always leaves a backtrace (abort/fatal or silent exit). -Menu <id> sets GE_STARTMENU; passes through -level_XX etc. Prints the FATAL line + backtrace + crash log when the game exits. Verified: GE_STARTMENU=13 mission-complete -> Next chain renders, no abort, no crash (D75 model cosmetics aside).
This commit is contained in:
1 parent
080056b125
commit
cea9ce0df9
2 files changed
+98
-2
No files matched your search
+20
-2
@@ -2757,8 +2757,26 @@ static void gfx_run_dl(Gfx* cmd) {
|
||||
i * 4, r[i], r[i + 1], r[i + 2], r[i + 3]);
|
||||
}
|
||||
}
|
||||
sysFatalError("Unknown GBI opcode 0x%02x at %p.\nw0 %08x\nw1 %08x", opcode, cmd, cmd->words.w0, cmd->words.w1);
|
||||
break;
|
||||
/* D146: an unknown opcode means the DL walk has desynced or
|
||||
* this DL is garbage (a front-end 3D model whose display list
|
||||
* was never built - the D75 / D144 family - lives at a valid
|
||||
* DRAM address full of junk). Aborting the whole process over
|
||||
* one bad menu model is the wrong trade for a breadth-first
|
||||
* port: end this (sub-)DL and let the frame finish. Still
|
||||
* logged loudly, rate-limited, so a real level-render desync
|
||||
* is not hidden. */
|
||||
{
|
||||
static int warned = 0;
|
||||
if (warned < 20) {
|
||||
warned++;
|
||||
sysLogPrintf(LOG_ERROR,
|
||||
"D146: unknown GBI opcode 0x%02x at %p (w0=%llx w1=%llx) - ending DL",
|
||||
opcode, (void *)cmd,
|
||||
(unsigned long long)cmd->words.w0,
|
||||
(unsigned long long)cmd->words.w1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
++cmd;
|
||||
|
||||
Reference in new issue
Block a user