10.4.0-29: Difference between revisions
Line 40: | Line 40: | ||
===NS=== | ===NS=== | ||
NS added [[APT:IsTitleAllowed|a new APT command]] used by Home Menu which now checks whether IronFall is on the latest version before launching; if it is on an exploitable version and the function is called to launch IronFall the system will reboot. This check is done again before launching the title, throwing an error if it fails. | NS added [[APT:IsTitleAllowed|a new APT command]] used by Home Menu which now checks whether IronFall is on the latest version before launching; if it is on an exploitable version and the function is called to launch IronFall the system will reboot. This check is done again before launching the title, throwing an error if it fails. | ||
All [[NS]] code changes: | |||
* L_103e6c(prev ver at L_103e6c): APT cmd-handler, this was updated for the command mentioned above. | |||
* L_1086f4: New function, this is called by the above cmd-handler. This basically just calls L_10b1cc. | |||
* L_10b1cc: New function, this is the actual [[APT:IsTitleAllowed]] implementation. Returns 0 for blocked, 1 for allowed. | |||
** The beginning of this function is the same as L_10d598, without the u16 check right away. | |||
** This initializes amu, then uses [[AM:GetTitleInfo]] with the input programID(mediatype is hard-coded to SD). If the latter returns an error, this will exit with retval0. | |||
** If u16 entry+4 is < (titleversion>>10), this then exits with retval1. | |||
** Then the AM:GetTitleInfo + versioncheck code is repeated using the update-data title. | |||
** This lastly exits, with retval1 if the update-data titlever is newer than the entry one. | |||
* L_10d598: New function, only called by L_10df40. This is the internal-NS-only version of the [[APT:IsTitleAllowed]] code. Returns 0 for blocked, 1 for allowed. | |||
** This immediately returns 1 when the mediatype isn't SD, or when the title isn't a CTR title. | |||
** Then it loads the uniqueid from the input struct, for determining which entry to use from a table in .rodata. The uniqueid is compared with hard-coded constants in the function code itself, even though the table contains the uniqueids too. The code looks like: "if(uniqueid == constant0) {entryptr = addr0} else if ...". When no entry is found, this immediately returns 1. | |||
** Lastly, if input_version_value is <= u16 entry+4, this returns 0, otherwise 1 is returned. | |||
* L_10df40(prev ver at L_10ddd4): This appears to be the main function used by NS for launching titles in general. Code was added for calling L_10d598() in two locations. The version value passed to L_10d598 here is the title NCCH remaster-version. | |||
See [[APT:IsTitleAllowed|here]] regarding the contents of that table. | |||
===Home Menu=== | ===Home Menu=== |