-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for MiSTer N64 saves? #20
Comments
I'm not the owner of this repo, but I'll be adding support for this to https://savefileconverter.com/#/mister sometime soon (just gotta get through moving homes first :) ). You can checkout the github repo here: https://github.com/euan-forrester/save-file-converter For reference to the repo owner here, should they also wish to add support for this, the format is:
So you can generally tell what's in the file just by looking at the size. The exception is a Flash RAM save is the same size as 4 controller pak saves. So to disambiguate there you could try and parse the file as controller pak saves. The wrinkle with that is that the controller pak data defaults to just all EDIT: Also, the cart save is in emulator byte order and not original hardware byte order (I can never remember which is big and which is little). |
I'll look into it. I already have partial support for Mupen64plus-Next saves which do a similar internal "all-in-one" bundling. Though the way it currently works is that I just straight up zero-fill everything except the P1 Controller Pak data. As it was simpler to implement that way. I figured that most games that use Controller Pak don't use any other save type. WWF No Mercy is one game that happens to use both. So I suppose it's also time for a more rigorous solution. The way I'll probably go about doing it, is to first detect the
That sounds weird. You sure? It should really just match N64 hardware, which is big-endian. Though PC emulators do seem to leave EEPROM and Controller Pak data in their original form, it's just really SRAM or Flash that seems to have the swap occur. Like Harvest Moon was one game where an Everdrive save had to be swapped to work in an emulator; but EEPROM and MPK files did not.
I'm a bit confused. I'm looking at the MiSTer code and it seems to use actual template data from Mupen64, not 0x00's? |
I think that the overall caveat with this n64 mister stuff is that it's all a work-in-progress and subject to change. I was warned to not implement this stuff yet for the savefileconverter site because the core is not stable, but it's quickly becoming popular and I've had a few users now asking about it so I went ahead and began.
Yeah I was surprised too. I tested everything carefully though. I got a directory of sample files from a user, and went through them to find a save of each type with actual gameplay data in it so I could verify it loads correctly. If you want to check out some sample data, you can take a look at my work-in-progress branch: https://github.com/euan-forrester/save-file-converter/tree/n64-mister
I'm not sure what to say here. The example files I was given had all |
Thanks, it's great to see you guys collaborating :D |
It sounds like the current .sav file format is just a quick fix not set in stone, and will be subject to change. It sounds like the final core might even have separated save files, and so, special support wouldn't need to be added if that happens. That said, I will still fix Mupen64Plus-next saves , since lack of dual save support in WWF No Mercy is a big oversight. And I should also be able to do Mister64 beta save support at least with minimal code. @KingKannibal Would you be able to make a few more save files for the various save types? Basically make save files that contain both primary saves and controller pak saves? Would give me files to test with. Some easy ones: There's actually not that many games that support both, but those ones are probably the easiest to make a save on. |
Sure, I'll have these out as soon as possible. |
Process for each game:[Let me know if any of these need to be redone]
Games that don't boot yet as of N64_20231115
edit: I didn't know I could upload zips |
@KingKannibal Could you please re-create at least one of these (e.g. Mario Kart 64, since it's easy to use for testing) with the latest version of the core? The controller pak data is quite corrupted, and fails several integrity checks that I'd rather not disable. bryc helped the developer of the core fix some issues related to this, and I'm hopeful that newer versions of the core won't have this issue. BTW, the controller pak data needs to be endian swapped before it's readable, which was another endian-related surprise with this data. |
Yes, I'll be supplying new saves asap. |
@euan-forrester Here's the save file made with the latest core: N64_20231124 |
@KingKannibal Wow, thanks for the quick turnaround! It looks like you didn't make any gameplay progress in this save? Just started the game and then took the save file? It's good to see that, because now it looks like the core correctly initializes all 4 controller paks rather than leaving them at all Could I ask you to do another Mario Kart save with this core -- maybe do a time trial so that there's data saved in the cartridge area, and also save a ghost so there's data in the controller pak as well? Then I think I'm good for files! Thanks to you for all this testing, and thanks to @bryc for helping to improve the core so that the files are better! |
@euan-forrester @bryc
|
Here are the save files produced with the latest core [as of posting]. Includes a clean save, and a save with ghost data. |
Here is what the split saves look like in the current test build of MiSTer Main where they are experimenting with split saves. |
@KingKannibal Thanks for all of that! And for noticing that there's a new experiment with split saves (I'm not sure where you saw that!) I've finished my conversion code, and incorporated your saves into my automated tests for the 'current' format, but before writing the UI I think it makes sense to pause here and see what direction the mister team takes with their save format, and wait for the format to become more finalized. I was warned earlier not to work on this yet, but after a few users asked for it I wanted to proceed anyway. But it seems that yeah it's too early. It's not really clear to me how to determine when the save format is (close enough to) finalized, other than waiting until the core moves under https://github.com/MiSTer-devel |
@euan-forrester Yeah, I'm gonna wait to see if the end up switching to the split saves or staying under the singular format. |
Looks good. If the split saves method ends up practical and reliable, that'd be the way to go IMO. It loads in MPKEdit directly just fine. Let me know if they go forward with split saves or decide to go back to single files :) |
Sure thing, I'll try my best to keep up with developments regarding saves. |
Hello, found your tool online wanting to copy a DexDrive save for use with the MiSTer FPGA N64 core now that it supports saves. However unconventional, I have uploaded the save file with the .txt extension so that you can take a look at it. The original extension is .sav.
WWF No Mercy (USA).txt
The text was updated successfully, but these errors were encountered: