Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[RFC] MMU: Allow specifying whether to translate an address via the BAT when calling the Host functions. #8682
So after the code debugger is now in a pretty good state I figured I'd check out the other debugging facilities, starting with the Memory viewer. This made me run across this issue again so I figured I'd bring it up once more -- see also #8310, #6913. This is also relevant for the Cheat Search functionality which is currently a bit broken, see #8311.
In short, we have a bunch of HostRead/Write() functions that allow the emulator to look at and modify the emulated game RAM. These are currently written to always respect the
An alternative to forcing the translation would be to let the caller say whether they expect the address to be translated or not, and then bounce with an std::nullopt or similar when the actual CPU state mismatches what the caller wants. That might be a bit cleaner, but makes the calling code and potentially the GUI itself more complex -- thinking specifically of the Cheat Search here. It would prevent the case of the caller saying AlwaysTranslate while the CPU state has translation off and the BAT is in an invalid state, which sounds like a rare and hard to debug issue... hmm. Y'know, now that I've written this up, I actually like that better I think, I think I'll put up an alternate PR for that.
Still, in case we end up preferring this method, here's this PR.