It looks like I've somehow forgotten to ever implement this - the flag exists, but does nothing at the moment. I'll try to take a look at this bit soon.93143 wrote: Mon Apr 21, 2025 3:54 pmWould it work if I did something like this?
I'm not familiar with the Mesen source code, so I'm not particularly clear on how to handle the CPU-only "Back-up RAM" (particularly since you can't write to BRAM if $3033.0 is reset), but I've made a stab at it... or does Mesen already handle that somewhere? It doesn't look like it...
If you need to use both the CPU-only cart ram and GSU+CPU cart ram, you can get the handlers for the CPU-only cart ram via "_console->GetCartridge()->GetSaveRamHandlers()" and use that to map them wherever you want/need. GetSaveRamHandlers should already be the correct size if the header specifies a "regular" save ram size, I think.
This will cause conflicts with the .srm save files though (both rams will try to save to the same file, and only one of them will be saved properly), so the code for this would eventually need to get tweaked for it to work properly.
The mappings you listed would map the first 2mb of rom to gsu+cpu as usual, then 2mb to 4mb would be at 80-BF:8000-FFFF, and the next 4mb would be at C0-FF:0000-FFFF. So that probably sounds correct, depending on what you want.