Added support for multiple transferpak games - #570
Open
JPZV wants to merge 3 commits into
Open
Conversation
Collaborator
|
Mustve missed this PR, will check |
Collaborator
|
probably part of the next batch of merges |
|
Thank you for putting this pull request together and for your work on this feature. It would be a huge feature for my upcoming event, a local pokemon tournament where players bring their own save files. Since this was planned for merging around a year ago, I wanted to gently check in on its current status. Are there any remaining blockers, feedback, or open items that need to be addressed before this can be merged? Please let us know if any help is needed to get this across the finish line. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for loading different GB games on transferpak for each controller. This allows, for example, to play Pokemon Red for P1, Blue for P2, and Yellow for P3 on Pokemon Stadium
How it works (For the End-User)
Until now, you had to have both the .gb and .sav files alongside the N64 ROM (and with the same name), having this structure:
But now you have to create a .pak folder and inside place the .gb and .sav files for every controller, naming them from 1.gb to 4.gb. For example:
Also, you can combine both the old and the new methods (the newer one has higher priority). For example:
With that, only the first player will have a different ROM while other players will use the same pokemon stadium.z64.gb ROM.
How it's implemented (for Libretro maintainers)
Now the global variables
retro_transferpak_rom_pathandretro_transferpak_ram_pathare string arrays of fixed length of 4 (one for each controller). Then, on startup, the core will search for each .gb and .sav file (naming from 1 to 4) inside the{GAME_FILE_NAME}.pakfolder. If there is no .gb or .sav file for that controller, then it'll rollback to the old method and, in case there are those files, it'll assign those files for that specific controller.So, in pseudo code, it'd be something like this: