-
Notifications
You must be signed in to change notification settings - Fork 4
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
JMPF after RET #7
Comments
So it's possible to dynamically jump to an address on the VMU by pushing the address to the stack and then calling I think some better analysis would help catch more of those cases, but I'm not sure it's possible to statically determine all of them. Can you tell from the debugger whether or not the |
For now I'll try hardcoding specific entrypoints or something similar as a temporary solution, not sure how this could be figured out in general for all executables |
By the way, the reason the Dreamcast executes the instruction after a return or branch is because it's a superscalar processor that executes two instructions per cycle, and the extra instruction is called a "delayed branch slot." This isn't relevant to the VMU. Also wtetzner and I are collaborating together to add this kind of debugger functionality into EVMU eventually. :) |
That looks to be a jump table with instruction padding, so I doubt that the VMU Simulator is correct either. $21, $96, $E1 jmpf $96E1 |
yeah I think the simulator only showed the lines it was executing so it didnt show the jmpf $96E1 either, hardcoding that jumptable rn |
it's this format https://en.wikipedia.org/wiki/Intel_HEX, more specifically the 8 bit version so it's like EDIT: it's up on my github, btw sorry for derailing the thread |
Sorry for the nondescriptive title, this issue may just be a misunderstanding from my part, but I disassembled Chao Adventure 2, and noticed a lot of instructions are interpreted as data. I used the official VMU emulator from the sdk since it has a proper debugger to see where the code jumps to a part that's interpreted as data.
Above you can see how this part of the code looks like in the disassembly code trace from the emulator
Here you can see it in this program
To me it seems like ret doesn't matter if a JMPF is after it? Not completely sure, but SH4 (the DC's processor) also had something like this so it may be possible. Regardless, it seems to be a problem
The text was updated successfully, but these errors were encountered: