New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
N64 tracelog does not show delay slot execution #789
Comments
Does the core disasm itself do it right? |
@pjgat09 hello? |
Do you mean if m64p's debugger correctly shows delay slot execution? I would need to check. I did take a quick look around how you implemented the tracelogger for N64. If I understood correctly you just disassemble the current address whenever you get a callback to do so, so that points to a problem with bizhawk. For this to work we need to disassemble 2 instructions under certain conditions. Unfortunately those conditions are based on if the branch is taken or not, so we would need to know at the time of disassembly if the branch will be taken or not. I'm not sure how easy that would be to do. Another option is to wait until the branch is taken or not and then decide if we should go back and disassemble the delay slot instruction. This is all unless m64p has support already for doing this correctly. I'm going to look into that next. |
Either way I don't feel capable of fixing it if it's that tricky. @Wyst3r what do you think? |
That's fair, this is a tricky problem. I didn't see anything in the m64p source that seemed to indicate they had planned for delay slot decoding, but it seems as though their debugger is very simplistic and they left it up to someone else to implement and use it in their own application. I'm now looking into if it is possible to move when the callback is triggered so that it would call our bizhawk function on delay slots too. |
Turned out to be a relatively simple fix: we just needed to hook a few more spots. |
Example from MK64:
In this example I would have expected to see address 800D33A8 executed in the log as well.
The text was updated successfully, but these errors were encountered: