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
HLE Riivolution patch support #10127
Conversation
48df0bc
to
2b2888a
Compare
|
I'm fine with the current UI, it has a similar look and feel compared to Riivolution UI. I tested this PR with UMH3+MH3SP-patcher Riivolution files. I also used AltWFC and MH3SP as server replacements. Regarding MH3SP-patcher, some memory patches are working, the search ones using It also seems the UMH3 title screen replacement isn't working. They look like this: <file disc="/04/title_bg_eng.tpl" external="mh3t/textures/title/0.tpl" />@AdmiralCurtiss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, 2 of 2 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, 2 of 2 files at r5, 2 of 2 files at r6, 2 of 2 files at r7.
Reviewable status: 0 of 24 files reviewed, 2 unresolved discussions (waiting on @AdmiralCurtiss and @JosJuice)
a discussion (no related file):
I think the system of having to first select the game in the game list and then go to the Tools menu will be unintuitive for users. Currently the only actions in Dolphin that a user needs to do this for are certain TAS actions like starting recording a movie from boot, and I've seen it happen several times that TASers who are new to Dolphin don't understand why Start Recording is greyed out and what they're supposed to do in order to start recording. Having "Start with Riivolution" as a right-click option on games would be better.
Source/Core/DiscIO/DirectoryBlob.cpp, line 554 at r5 (raw file):
const u64 data_size = partitions[i].partition.GetDataSize(); const u64 partition_offset = partition_address + PARTITION_DATA_OFFSET;
I would suggest naming this partition_data_offset if it doesn't mess up the line widths too much. I try to always use "partition" when referring to the beginning of the whole partition and "partition data" when referring to the start of the encrypted+hashed area, whereas "address" and "offsets" are basically synonyms.
This is very cool @AdmiralCurtiss ! I can think of some usability improvements.
I will give this a whirl soon. I have a lot of translations I want to check out. |
I did it like this so that the patches are as close as how you would install and use them on a real Wii -- which for most mods just means extracting the patch archive into the Riivolution folder (instead of the SD card root) and you're good. I'm not against 'future-proofing' this for a possible enhancement system, but I have no idea what the best way to accomplish that would be.
Where?
Multiple mods at once are already supported here -- as they are on real Riivolution, for that matter! It will load all matching XMLs at once and you can just pick and choose what you want. I'm not the biggest fan of handling this like game cheats/patches because that would make it very easy to accidentally leave a mod on when you want to play the vanilla game, but ymmv. |
Any idea how it handles conflicts?
Fair. I was looking at this the opposite way. Thinking that if I most often want to play with the mod, I have to remember to use this sub-menu to launch it. I can't just double click on it. Plus, it's very possible I want to trigger it from the command line (ex: frontend launchers). Having a separate option for that might be a bit klunky (just my opinion of course).
Even if we didn't have a gameid layer, I think it'd be intuitive to add it to the game context menu. Riivolution is for Wii retail only right? just curious, is there anything similar for GC/Wiiware? Wondering if |
Riivolution XML files already identify what game ID they're for. (See the I think the main result of requiring a game ID folder structure would be to make this feature harder for users to set up. Getting them to name their texture pack folders correctly is already hard as it is... (Or at least it was before the texture pack folder naming system was improved. I'm don't think I actually see that many problems with it nowadays.) |
|
Thanks @JosJuice . If we have a way to find all the mods for a given game (ex: ability to list all enhancements in the UI for a given gameid), I think we're at least future-proofed in that sense. Updated my comments. |
|
One other comment, if we do keep the current interface, please switch to having "Start" as the default button. That way after clicking to begin the game, I can just hit enter to play. That being said, I tried a handful of mods. They all worked very well!! |
|
Was pretty painless to setup for the most part. I think the biggest issue is figuring out to highlight the game if you're not used to recording TASes. |
|
Does this have a priority order like real riivolution? Also, is the intended method to copy the riivolution folders for each respective mod into the main riivolution folder in |
|
Does Riivolution have a priority system? I haven't seen anything along those lines but maybe I've just overlooked it. Right now I'm not doing any conflict handling or similar, and I was under the impression Riivolution didn't either. As for the other question, just treat it like you would on a real Wii with an SD card. All |
|
Riivolution handles conflicts via the vertical order of the mods, with the higher mods overriding the other mods, iirc. |
|
And how is that order decided (especially across multiple XML files)...? |
|
Dragging and dropping with wiimote, I think. Not sure about the backend, but the source code probably shows. |
|
Oh, I didn't realize that was possible! Okay, thanks, I'll research the exact details. |
aef348c
to
224d770
Compare
|
@sepalani Can you try the Monster Hunter patches again? The XML files didn't set any root patch, which I assumed meant 'relative to SD root' but seems to instead mean 'relative to folder containing xml'. They also used Ocarina patches, which were unimplemented before -- I've implemented them now, I think. |
|
@AdmiralCurtiss |
|
@Zopolis4 Are you absolutely sure Riivolution on console has a priority feature? I just spent some time messing with it and was unable to find any such thing. Additionally, if I enable multiple patches for the same file, they just seem to get applied in the order they're listed in the XML file, later patches for any given file or file region overwriting whatever happens to be there at the time -- which is identical to what I'm doing here. One thing I ran into that I didn't realize before is that apparently the offset in mid-file patches is limited to 4 byte alignments, getting aligned down (that is, Also, I'm still not fully treating external paths accurately. If they start with a '/' they seemingly are relative to the SD card root, regardless of what is given as the 'root' parameter. Which makes some sense, I guess. Fixes for both of these will follow shortly... |
|
I may be wrong, I'm mainly going off of memory here. I trust your judgment on this, especially as I could not find any relevant mentions of priority in riivolution's source code. |
224d770
to
ecc4567
Compare
I need to look through the code but how do you signify a later patch?? These are just files in the directory, are they loaded in name order? |
|
I mean, like, if you did this: If you enable all three of these patches, file Then you end up with the first 4 bytes of With folder patches and recursive file replacement this gets more convoluted to test, but I'd presume it's similar? |
Does that mean filename ordering? -- I question if we should be HLE'ing the actual riivolution loading as opposed to us owning the patch ordering and riivolution just being one type of patch. Priority handling is important and sounds like an oversight from the Riivolution team. Also, as mentioned before, I feel like the folder inside 'Load' should be called mods so it is generic. This allows us to support other patch formats in the future (ex: the Pokemon Mystery Dungeon translation patches are bps because riivolution only applies to Wii retail discs). |
Depends on the code that writes the FAT in the first place I guess? I think in practice you can make no assumptions, though of course we could define a logic for it for consistency (even if that may be inconsistent with actual Riivolution). I do agree that supporting other types of patches makes sense, but the specifics of how you'd actually like that to be implemented are rather nebulous to me. I'm also not sure if it really makes sense to mix together multiple types of patches in the same place in the file system. Maybe make mockup or something so I have a better idea what you want here? |
…game's file system and memory.
…uring the patching process to properly resolve the paths given in the XML. This also may eventually allow loading patches from sources other than the 1:1 expected file structure host file system, such as memory or an archive file.
… match console behavior.
…hed games until we have proper emulation for that.
…n launching a patch.
…XMLs that remember the last selection.
…h options when launching via the RiivolutionBootWidget.
…to actual Riivolution.
…ing a main.dol file.
…peration may be on different partitions or devices. Implement a fallback for that.
bbbf7f4
to
4f82810
Compare
|
I've used this for a while and its great, but I do suggest making a change so that the selected Riivo Patches will stay enabled after loading the game, like in Riivolution. (Riivolution has a |
|
Uh, that's in there as of a few commits ago. Or do you mean that the patches should stay 'on' even when you boot the game without the Riivolution UI? That's not going to happen like that (in this PR) because we have a different thing planned. |
yeah I meant patches should stay on lol |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r23, 3 of 3 files at r24, all commit messages.
Dismissed @sepalani from 4 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @AdmiralCurtiss)
This comment has been minimized.
This comment has been minimized.
|
That's... just how you do things on Github, and git in general. Make a branch, work on it, merge into master when it's done, then delete the branch as it's no longer useful anymore -- all the data is now in master. Keeps your repository tidy. |
|
I have never actually seen a branch get deleted after a merge... |
|
AdmiralCurtiss is right -- GitHub even nudges you to do it after you merge a PR. (The message is something like "You're all set -- the original branch can now be safely deleted. ['Delete Branch' button]") |
oh, I never knew that |


Implemented in this PR right now:
{user dir}/Load/Riivolution/.Known desired features or issues that are (currently) not implemented in this PR:
NOTE: Some of the specific details below may be a bit outdated, but the general gist still applies.
This implements the ability to parse and apply Riivolution XML files by rebuilding the game's FST before launch using DirectoryBlob.
A new subfolder in the user directory (
Load/Riivolution) has been added to act as the virtual SD card root that Riivolution patches would normally search files in. Patch XMLs inLoad/Riivolution/riivolutionwill also be parsed automatically when using this feature, mimicking how Riivolution loads XML files in(SD root)/riivolution.To launch a game using this feature, right-click it in the game list and select
Start with Riivolution...after placing the desired patch files inLoad/Riivolution. Then select the patches you'd like to apply, and clickStart.So for example, to launch Newer Super Mario Bros. Wii you would do the following:
NewerSMBWandriivolutionfolders into theLoad/Riivolutiondirectory. (example)Start with Riivolution....Startin the patch selection window. (example)I'm open to suggestions for improving the user-experience, though I don't think the current way is terrible.