Weird timing issue?
Posted: Wed Aug 19, 2020 5:22 am
Hi folks,
I've put together a JP->EN translation of a Megadrive game. Can't talk too much about it, under NDA, but I've hit a really weird issue with what little of the code I changed. Execution hits a certain spot, the stack pointer gets offset by several bytes, the PC jumps to a completely different address, and the game crashes. But it only does this on accurate emulators like Bizhawk or Exodus; I developed using the tracing enabled version of Gens, which it *does* successfully work on.
Here's some traces of the old code vs the new code obtained with Bizhawk, showing where the issue happens after 10A80:
https://pastebin.com/HFzDBRLQ
And the code I actually wrote:
https://pastebin.com/90BsSRmh
Anything jump out that I'm doing obviously wrong?
I've put together a JP->EN translation of a Megadrive game. Can't talk too much about it, under NDA, but I've hit a really weird issue with what little of the code I changed. Execution hits a certain spot, the stack pointer gets offset by several bytes, the PC jumps to a completely different address, and the game crashes. But it only does this on accurate emulators like Bizhawk or Exodus; I developed using the tracing enabled version of Gens, which it *does* successfully work on.
Here's some traces of the old code vs the new code obtained with Bizhawk, showing where the issue happens after 10A80:
https://pastebin.com/HFzDBRLQ
And the code I actually wrote:
https://pastebin.com/90BsSRmh
Anything jump out that I'm doing obviously wrong?