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
DiscIO: Add support for the NFS format #10932
Conversation
|
This should probably have a check for correct directory structure, I got a The volume verifier also claims it's a bad dump, which is not ideal for an official format. We probably should also adjust disc timings for these, considering they're supposed to be running from a NAND or external USB device -- there's probably some variance here depending on what you use but it's definitely faster than an optical disc. All that aside, actually booting and playing the game works, so that's neat. |
What kind of check are you thinking of more specifically? The code is already printing the log message you saw, so are you thinking of some kind of log message that more clearly explains the situation?
Yes, that situation is a bit funny. But I don't want to just claim it's a good dump, because these dumps are not netplay compatible with "real" good dumps – they are in fact bad dumps as long as your criteria for "good dump" is that it matches a real disc. (We also don't have any database of hashes for releases in NFS format as far as I'm aware, so how to determine whether the dump is good by eShop standards is also a problem...)
Probably, but I don't know a good way to test what speeds can be reached. I think I'll leave this out of the scope of this PR. |
75c4a04
to
1b9b788
Compare
I mean that it should probably verify that the nfs files are actually in a directory called Re good dump, I see your point regarding netplay but it's still a bit odd -- 'good dump' generally means that it's an exact copy of the medium it was originally released in, which in this case it should be. Maybe have a specific message about it in the warnings instead of the generic 'bad dump', something like 'although this is a good dump, it is not compatible with the disc release' or whatever? The hashes should be easy enough to collect, there's only like 50 releases across all regions and they're all still available as far as I know, but I guess it's fine if we leave it alone for now, we can sort this out in a follow-up. For the loading times, yeah it's fine to not do anything about this in this PR, I just wanted to note it. |
|
Wait, I just re-verified and now it says it's an unused block instead. Is there some state leakage between two verifications of the same dump...? |
|
It's supposed to give the same result each time you verify. Not sure what's going on here. Seeing as you have this game and I don't, could you try to debug it? Do you get the same hashes each time? There does indeed seem to be something special about the last block. For me when testing with Pandora's Tower, it's a block that's not physically stored in the NFS disc image (NFSBlob.cpp returns all zeroes when asked to read it) and is unused. |
|
It's an out-of-bounds read of |
|
Thanks! Should be fixed now. I also split the GetDataSizeType commit into two, for ease of reviewing. |
|
Other than those few things this looks good to me, though I fully admit to not knowing anything about the format. |
Needed for the next commit. NFS disc images are hashed but not encrypted. While we're at it, also get rid of SupportsIntegrityCheck. It does the same thing as old IsEncryptedAndHashed and new HasWiiHashes.
107f2af
to
964a4f6
Compare
|
I decided to split up the |
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.
Minor nitpick but otherwise I think this is good to go.
For a few years now, I've been thinking it would be nice to make Dolphin support reading Wii games in the format they come in when you download them from the Wii U eShop. The Wii U eShop has some good deals on Wii games (Metroid Prime Trilogy especially is rather expensive if you try to buy it physically!), and it's the only place right now where you can buy Wii games digitally. Of course, Nintendo being Nintendo, next year they're going to shut down this only place where you can buy Wii games digitally. I kind of wish I had implemented this feature earlier so that people would've had ample time to buy the games they want, but... better late than never, right? I used MIT-licensed code from the NOD library as a reference when implementing this. None of the code has been directly copied, but you may notice that the names of the struct members are very similar. https://gitlab.axiodl.com/AxioDL/nod/blob/c1635245b881ed0004ff5e616896579ce1b19164/lib/DiscIONFS.cpp
Previously, we had WBFS and CISO which both returned an upper bound of the size, and other formats which returned an accurate size. But now we also have NFS, which returns a lower bound of the size. To allow VolumeVerifier to make better informed decisions for NFS, let's use an enum instead of a bool for the type of data size a blob has.
Just for ease of reading. No behavioral difference.
| } | ||
| else | ||
| { | ||
| Common::GetStringT("Problems with low severity were found. They will most " |
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.
@JosJuice
This removes the assignment to m_result.summary_text!
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.
Oops, well spotted.


For a few years now, I've been thinking it would be nice to make Dolphin support reading Wii games in the format they come in when you download them from the Wii U eShop. The Wii U eShop has some good deals on Wii games (Metroid Prime Trilogy especially is rather expensive if you try to buy it physically!), and it's the only place right now where you can buy Wii games digitally.
Of course, Nintendo being Nintendo, next year they're going to shut down this only place where you can buy Wii games digitally. I kind of wish I had implemented this feature earlier so that people would've had ample time to buy the games they want, but... better late than never, right?
I used MIT-licensed code from the NOD library as a reference when implementing this. None of the code has been directly copied, but you may notice that the names of the struct members are very similar. https://gitlab.axiodl.com/AxioDL/nod/blob/c1635245b881ed0004ff5e616896579ce1b19164/lib/DiscIONFS.cpp