-
Notifications
You must be signed in to change notification settings - Fork 0
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
mGBA debug enable register not properly restored #1
Comments
Hey @Vulcalien, Tested current behavior in different emulators: Maybe I'm wildly misunderstanding something? (which is very possible because I have a light fever) |
Hey @Vulcalien |
I still believe the stored value read from the Enable register should not be restored, since it's not a real read/write register. But I don't have time to test this right now. I would test this scenario:
I suspect that after identify_mgba(), Debug will be disable instead. If that's not the case, then I was mistaken and this issue should be closed. |
It took me a while to understand where you're coming from (not the whole year, no :D), but it apears to me that this is not the case and the correct value is restored. So if mgba was in debug mode, it stays in debug mode, but if it wasnt, then it gets enabled and disabled in the next instruction. |
I haven't tested the code, but by looking at it I noticed you're reading the register's value and then writing the same value again. But the debug enable register, when read, does not return '0xc0de', but instead '0x1dea' or any other value.
So when restoring the register, it should look something like this:
The text was updated successfully, but these errors were encountered: