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
DVDInterface: Mask upper bits of DIMAR in GC mode #10821
Conversation
might be a little better to store mask into a variable at init so you don't need to check bWii each time |
|
It's being computed once when I assume that |
i just put a breakpoint on I guess we rely on games only accessing the regs from the expected alias in each mode. But it is still bugged in this case I guess. |
The masking was removed in d3aad1d, based on a Wii hardware test. Based on https://bugs.dolphin-emu.org/issues/12970 the masking should apply in GameCube mode, though.
I've changed it to have it decide which mask to use based on the alias (0x0C006000 for GameCube and 0x0D006000 for Wii, and the Wii one is only registered in Wii mode). |
Is that correct, did you check if writing to |
It's almost certainly not correct (and address I have to assume that the masking occurs in GC mode on Wii, as otherwise you could overwrite the parts of MEM2 where ARAM and more importantly MIOS live using homebrew with cleverly-chosen disc reads. But again I haven't verified it. That masking would also only really make sense if it applies on write (if it applies on read, it would presumably also apply when the value of the register is used internally, which would be equivalent to it applying on write). |
What I mean is, in theory you could write the register through |
To clarify: on real Wii hardware, in Wii mode, I don't think (There's also the extra complications of virtual addressing (making it |
The masking was removed in d3aad1d, based on a Wii hardware test. Based on https://bugs.dolphin-emu.org/issues/12970 the masking should apply in GameCube mode, though. (I have not actually tested this, as I do not have easy access to a GameCube.)