2012-12-28 18:55:28 +01:00
|
|
|
libruntimeiospatch function overview
|
|
|
|
====================================
|
|
|
|
|
|
|
|
libruntimeiospatch 1.0:
|
|
|
|
|
|
|
|
====================
|
|
|
|
=== have_ahbprot ===
|
|
|
|
====================
|
|
|
|
|
|
|
|
This function returns true, then there is HW_AHBPROT access available.
|
|
|
|
|
|
|
|
>> Flags: none
|
|
|
|
|
|
|
|
******
|
2012-12-28 21:21:34 +01:00
|
|
|
if (have_ahbprot())
|
2012-12-28 18:55:28 +01:00
|
|
|
do_something
|
|
|
|
else
|
|
|
|
do_something_else
|
|
|
|
fi
|
|
|
|
******
|
|
|
|
|
|
|
|
========================
|
|
|
|
=== IosPatch_AHBPROT ===
|
|
|
|
========================
|
|
|
|
|
|
|
|
This function can be used to keep HW_AHBPROT access when going to reload IOS
|
|
|
|
|
|
|
|
>> Flags: [bool]verbose (whether to print messages on-screen)
|
|
|
|
|
2012-12-28 21:07:29 +01:00
|
|
|
>> Return:
|
|
|
|
-5: no HW_AHBPROT access
|
2012-12-28 21:21:34 +01:00
|
|
|
-7: patching HW_AHBPROT access failed
|
2012-12-28 21:07:29 +01:00
|
|
|
>0: success
|
|
|
|
|
2012-12-28 18:55:28 +01:00
|
|
|
******
|
|
|
|
if(have_ahbprot()) {
|
|
|
|
s32 ret;
|
|
|
|
ret = IosPatch_AHBPROT(false);
|
|
|
|
if (ret) {
|
|
|
|
IOS_ReloadIOS(36);
|
|
|
|
} else {
|
|
|
|
printf("IosPatch_AHBPROT failed.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
******
|
|
|
|
|
|
|
|
========================
|
|
|
|
=== IosPatch_RUNTIME ===
|
|
|
|
========================
|
|
|
|
|
|
|
|
This function applies patches on current IOS
|
|
|
|
|
|
|
|
>> Flags: [bool]wii (whether to apply Wii patches)
|
|
|
|
[bool]sciifii (whether to apply extra Sciifii patches)
|
|
|
|
[bool]vwii (whether to apply extra vWii patches)
|
|
|
|
[bool]verbose (whether to print messages on-screen)
|
|
|
|
|
2012-12-28 21:07:29 +01:00
|
|
|
>> Return:
|
|
|
|
-5: no HW_AHBPROT access
|
|
|
|
>0: success (return equals to number of applied patches)
|
|
|
|
|
2012-12-28 18:55:28 +01:00
|
|
|
<< Patchsets:
|
|
|
|
Wii:
|
|
|
|
* DI Readlimit
|
|
|
|
* ISFS Permissions
|
|
|
|
* ES SetUID
|
|
|
|
* ES SetIdentify
|
|
|
|
* Hash Check (aka Trucha)
|
|
|
|
* New Hash Check (aka New Trucha)
|
|
|
|
|
|
|
|
Sciifii:
|
|
|
|
* MEM2 Prot
|
|
|
|
* ES OpenTitleContent 1 & 2
|
|
|
|
* ES ReadContent Prot
|
|
|
|
* ES CloseContent
|
2012-12-28 21:21:34 +01:00
|
|
|
* ES TitleVersionCheck
|
2012-12-28 18:55:28 +01:00
|
|
|
* ES TitleDeleteCheck
|
|
|
|
|
|
|
|
vWii:
|
|
|
|
* Kill Anti-SystemTitle-Install 1, 2, 3, 4 & 5
|
|
|
|
|
|
|
|
|
|
|
|
******
|
|
|
|
If(have_ahbprot()) {
|
|
|
|
IosPatch_RUNTIME(true, false, false, false);
|
|
|
|
}
|
|
|
|
******
|
|
|
|
|
|
|
|
libruntimeiospatch 1.1:
|
|
|
|
|
|
|
|
=====================
|
|
|
|
=== IosPatch_FULL ===
|
|
|
|
=====================
|
|
|
|
|
|
|
|
This function combines IosPatch_AHBPROT + IOS_ReloadIOS + IosPatch_RUNTIME
|
|
|
|
|
|
|
|
>> Flags: [bool]wii (whether to apply Wii patches)
|
|
|
|
[bool]sciifii (whether to apply extra Sciifii patches)
|
|
|
|
[bool]vwii (whether to apply extra vWii patches)
|
|
|
|
[bool]verbose (whether to print messages on-screen)
|
|
|
|
[int]ios (which IOS to reload into)
|
|
|
|
|
2012-12-28 21:07:29 +01:00
|
|
|
>> Return:
|
|
|
|
-5: no HW_AHBPROT access
|
|
|
|
-7: patching HW_AHBPROT access failed
|
|
|
|
>0: success (return equals to number of applied patches)
|
|
|
|
|
2012-12-28 18:55:28 +01:00
|
|
|
******
|
|
|
|
If(have_ahbprot()) {
|
|
|
|
IosPatch_FULL(true, false, false, false, 58);
|
|
|
|
}
|
2012-12-28 21:07:29 +01:00
|
|
|
******
|
|
|
|
|
|
|
|
libruntimeiospatch 1.2:
|
|
|
|
|
|
|
|
======================================
|
|
|
|
=== get_libruntimeiospatch_version ===
|
|
|
|
======================================
|
|
|
|
|
|
|
|
This function returns the version of libruntimeiospatch in MMM format.
|
|
|
|
|
|
|
|
MMM = MajorMinorMicro. 1.2 = 120, 1.9.1 = 191, and so on.
|
|
|
|
|
|
|
|
>> Flags: none
|
|
|
|
|
|
|
|
******
|
|
|
|
int lrip = 0;
|
|
|
|
lrip = get_libruntimeiospatch_version()
|
|
|
|
******
|