Skip to content
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

BIOS test 2 fail #5

Closed
DenSinH opened this issue Jun 30, 2020 · 2 comments
Closed

BIOS test 2 fail #5

DenSinH opened this issue Jun 30, 2020 · 2 comments

Comments

@DenSinH
Copy link

DenSinH commented Jun 30, 2020

I was running the test against my own emulator, and couldn't figure out why it would go wrong. I checked the registers, and the value in R1 was not the value it was supposed to read, but it was 1 instead. First I thought the m_word macro might not have worked, but it did.

When checking out what happens in the SQRT SWI I found that it jumped to 0x404 in the BIOS, and ran these instructions right after the handler:
image
the SWI changes the value in R1!

It fails on some other emulators as well, and probably passes on mGBA because it HLEs the BIOS. You can probably simply fix the test by using R0 instead of R1, or some other register that is not changed.

@fleroviux
Copy link
Contributor

+1 the test fails with the real BIOS. verified in mGBA and NBA using a real BIOS.

@jsmolka
Copy link
Owner

jsmolka commented Jun 30, 2020

Thanks for this. I am kinda mad because I read the GBATEK documentation and it never mentioned r1. Now the only things left which don't work on real hardware are the 32k memory mirrors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants