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
Remove NKit data when extracting a GCN/Wii disc volume #11863
Conversation
c3e2a29
to
5b57289
Compare
|
I would prefer to not keep having to add special handling for NKit files throughout the Dolphin code base. Is this really something that happens often to people who don't have the technical ability to fix the problem after the fact? For what it's worth, extracted disc images do in fact have almost all the problems that NKit files have. |
|
If you don't see the value in handling a popular format correctly, unofficial it may be, then I don't know how to convince you. |
|
There's already a game mod out there with this issue. I think Dolphin should prevent this from happening again. |
|
Yes, so as I discussed and learned from the NKit discord, then mentioned in the IRC, I encountered a Pikmin 2 mod which made this exact mistake. While not all tools can be perfect, at least Dolphin can help prevent this user error. |
|
Okay, I won't block this PR then. But I would like someone else to merge it. |
|
With that resolved... I had considered making the DiscIO::ExportData function return the File::IOFile class it constructs, allowing the caller to either immediately convert it to a bool, or carry on using it. This would remove the need to open the file a second time in ExportWiiUnencryptedHeader and ExportHeader for these minor edits, though due to the File::IOFile operator bool overload being explicit, I thought it looked kind of ugly. Would this still be preferred over opening the file a second time? |
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.
Sorry, I wrote three review comments yesterday but then somehow forgot to actually send them. Here they are.
|
Should we note the game mod that actually bugs out on this? Or are there multiple? I'm also unsure what to do about this because the format is rather weird, but considering so many people currently use it, I'm not sure we have a huge choice and obscure bugs are the worst. |
|
I forgot to reply to this, my apologies. This is the mod's release video. While it is the only example I know of, it has become popular in the Pikmin 2 hacking community to teach new modders to use Dolphin Emulator for extracting, editing, and rebuilding a game. I believe it is inevitable for new modders to repeat this mistake, perhaps spreading to other Gamecube modding communities that similarly have no qualms publishing mods in such a way... |
|
I'm not exactly happy about adding special handling here, but considering how important modding is and how prevalent nkit is among users, I don't see a good way around this. If nkit falls out of favor in the future, we can remove this special handling pretty easily. I'll give others some time to object, but otherwise I'll merge this in a day or two. Feel free to ping me if I forget. |
|
@JMC47 Today is day n of waiting for you to merge. |
|
No one has objected and it's been a week. I guess we do it. |
NKit stores some data in the disc and partition headers. Since the extracted filesystem format (GCReEx format?) cannot be an NKit format, it makes sense to remove this info. This will be helpful for a niche scenario in which a user extracts an NKit format ISO using Dolphin, then rebuilds the ISO using either Dolphin (which surprisingly is able to) or a third party tool, as the NKit data being left in will produce false-positives when loading the rebuilt disc in Dolphin Emulator.