-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I made a library called libSysTitVer that's intended to function as a backend for SysCheck, but as a library, it can be used in any app that wants to verify a Wii system title for any reason (e.g. MIOS compatibility testing in Wii Swiss Booter).
For current SysCheck, this would be useful for solving two problems:
- We have two defects in MIOS testing, firstly that it's hard-coded to look for MIOS content IDs in locations that only MIOS v10 and derivatives use, and secondly that it has no tests for cMIOS other than DIOS MIOS and so reports WiiGator/WiiPower cMIOS as "MIOS v10".
- Verifying official IOSes is much slower than it needs to be (it should take ~1s to verify them all if integrity testing is not done; libSysTitVer additionally adds the ability to integrity-test a system title by hashing every content file and comparing the hash to the TMD; this takes 7s to run on every IOS).
Both of these point to a conceptual flaw, that SysCheck can't identify identical copies of official titles, but rather tries to test if they have been modded in a few ways, which will lead to it reporting a title as official purely because it doesn't know about the relevant mods. libSysTitCheck solves this problem by hash-verifying and integrity-testing titles.
Hence, I suggest these changes to SysCheck. Include libSysTitVer in the project, and then:
- Test the MIOS (and BC) by first identifying it with
STV_IdentifyCurrentTitle(), and if it doesn't come up with a match, then run the existing SysCheck logic, which looks for date strings in DIOS MIOS. - Test every IOS in the 3–80 range in the same way for an exact match to official, and if it doesn't come up, run the existing tag-based logic.
This should speed up SysCheck and make it more robust. libSysTitVer is intended as a communal framework to which anyone can contribute more title-testing logic, so it eventually becomes a full backend for SysCheck. It's also optimised runtime IOS patching by only doing the NAND access patch, which is all that SysCheck needs.
(tho it has a flaw that just occured to me typing this, which is that libsystitver will return an error if the ios runtime has already been patched before it's called ._. i can consider how to fix that, or for now, it can be relied on to do the patching itself) fixed