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

IWRAM Open Bus LSW/MSW wrong way around? #1575

Closed
fleroviux opened this issue Nov 11, 2019 · 0 comments
Closed

IWRAM Open Bus LSW/MSW wrong way around? #1575

fleroviux opened this issue Nov 11, 2019 · 0 comments

Comments

@fleroviux
Copy link

fleroviux commented Nov 11, 2019

https://github.com/mgba-emu/mgba/blob/master/src/gba/memory.c#L355

Based on the description on GBATEK, it appears to me, that the MSW and LSW for IWRAM actually should be the other way around.
Out of general curiosity I wrote a small (currently very immature) test ROM last night, and its result in mGBA 0.8 seems to match my observation.

image
(left value is actual result, right value is what it expects, according to real HW)

It is also interesting to note, that with Thumb code in IWRAM it is possible that data reads/writes influence observed open bus values, as each instruction prefetch only trashes a HWORD of the latch. The test ROM demonstrates this. Although I'd guess (or hope?) that no game actually relies on this :p

The test ROM (the code is also in the repo, but currently very messy):
https://github.com/fleroviux/openbuster/releases/download/0.1/openbuster.gba

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

1 participant