mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-11-24 18:16:56 +01:00
remove API, add docs in runtimeiospatch.h
This commit is contained in:
parent
e45a171d60
commit
6ffc411293
@ -1,131 +0,0 @@
|
||||
libruntimeiospatch function overview
|
||||
====================================
|
||||
|
||||
>>>>>>>> libruntimeiospatch 1.3: <<<<<<<<
|
||||
|
||||
===================== ===================
|
||||
=== ERROR_AHBPROT === === ERROR_PATCH ===
|
||||
===================== ===================
|
||||
|
||||
Use those to catch occuring errors
|
||||
|
||||
******
|
||||
if (IosPatch_AHBPROT(false) == ERROR_AHBPROT)
|
||||
printf("AHBPROT is still enabled!");
|
||||
|
||||
if (IosPatch_RUNTIME(true, false, false, false) == ERROR_PATCH)
|
||||
printf("Patching IOS failed!");
|
||||
|
||||
========================
|
||||
=== AHBPROT_DISABLED ===
|
||||
========================
|
||||
|
||||
Returns true when HW_AHBPROT access can be applied
|
||||
|
||||
******
|
||||
If(AHBPROT_DISABLED) {
|
||||
do_something
|
||||
} else {
|
||||
do_something_else
|
||||
}
|
||||
******
|
||||
|
||||
===================================
|
||||
=== LIB_RUNTIMEIOSPATCH_VERSION ===
|
||||
===================================
|
||||
|
||||
Stores printable version of libruntimeiospatch.
|
||||
|
||||
>>>>>>>> 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)
|
||||
|
||||
>> Return:
|
||||
-5: no HW_AHBPROT access
|
||||
-7: patching HW_AHBPROT access failed
|
||||
>0: success (return equals to number of applied patches)
|
||||
|
||||
******
|
||||
If(AHBPROT_DISABLED) {
|
||||
IosPatch_FULL(true, false, false, false, 58);
|
||||
}
|
||||
******
|
||||
|
||||
>>>>>>>> libruntimeiospatch 1.0: <<<<<<<<
|
||||
|
||||
========================
|
||||
=== 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)
|
||||
|
||||
>> Return:
|
||||
-5: no HW_AHBPROT access
|
||||
-7: patching HW_AHBPROT access failed
|
||||
>0: success
|
||||
|
||||
******
|
||||
if(AHBPROT_DISABLED) {
|
||||
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)
|
||||
|
||||
>> Return:
|
||||
-5: no HW_AHBPROT access
|
||||
>0: success (return equals to number of applied patches)
|
||||
|
||||
<< 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
|
||||
* ES TitleVersionCheck
|
||||
* ES TitleDeleteCheck
|
||||
|
||||
vWii:
|
||||
* Kill Anti-SystemTitle-Install 1, 2, 3, 4 & 5
|
||||
|
||||
|
||||
******
|
||||
If(AHBPROT_DISABLED) {
|
||||
IosPatch_RUNTIME(true, false, false, false);
|
||||
}
|
||||
******
|
@ -13,24 +13,128 @@
|
||||
|
||||
|
||||
#ifndef _RUNTIMEIOSPATCH_H_
|
||||
#define _RUNTIMEIOSPATCH_H_
|
||||
#define _RUNTIMEIOSPATCH_H_
|
||||
|
||||
#define LIB_RUNTIMEIOSPATCH_VERSION "1.3.0"
|
||||
/**
|
||||
* Version information for Libruntimeiospatch.
|
||||
*/
|
||||
#define LIB_RUNTIMEIOSPATCH_VERSION "1.3.0"
|
||||
|
||||
#define AHBPROT_DISABLED (*(vu32*)0xcd800064 == 0xFFFFFFFF)
|
||||
//==============================================================================
|
||||
// HW_RVL header
|
||||
//==============================================================================
|
||||
#if defined(HW_RVL) /* defined(HW_RVL) */
|
||||
|
||||
#define ERROR_AHBPROT -5
|
||||
#define ERROR_PATCH -7
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/**
|
||||
*Returns true when HW_AHBPROT access can be applied
|
||||
*/
|
||||
#define AHBPROT_DISABLED (*(vu32*)0xcd800064 == 0xFFFFFFFF)
|
||||
|
||||
s32 IosPatch_AHBPROT(bool verbose);
|
||||
s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose);
|
||||
s32 IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS);
|
||||
//==============================================================================
|
||||
// Error code definitions:
|
||||
//==============================================================================
|
||||
#define ERROR_AHBPROT -5
|
||||
#define ERROR_PATCH -7
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
//==============================================================================
|
||||
// C++ header
|
||||
//==============================================================================
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* __cplusplus */
|
||||
|
||||
//==============================================================================
|
||||
// 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
|
||||
* ES TitleVersionCheck
|
||||
* ES TitleDeleteCheck
|
||||
|
||||
vWii:
|
||||
* Kill Anti-SystemTitle-Install 1, 2, 3, 4 & 5
|
||||
*/
|
||||
|
||||
|
||||
//==============================================================================
|
||||
// Functions:
|
||||
//==============================================================================
|
||||
|
||||
/**
|
||||
* This function can be used to keep HW_AHBPROT access when going to reload IOS
|
||||
* @param verbose Flag determing whether or not to print messages on-screen
|
||||
* @example
|
||||
* if(AHBPROT_DISABLED) {
|
||||
* s32 ret;
|
||||
* ret = IosPatch_AHBPROT(false);
|
||||
* if (ret) {
|
||||
* IOS_ReloadIOS(36);
|
||||
* } else {
|
||||
* printf("IosPatch_AHBPROT failed.");
|
||||
* }
|
||||
* }
|
||||
* @return Signed 32bit integer representing code
|
||||
* > 0 : Success - return equals to number of applied patches
|
||||
* ERROR_AHBPROT : Error - No HW_AHBPROT access
|
||||
*/
|
||||
s32 IosPatch_AHBPROT(bool verbose);
|
||||
|
||||
|
||||
/**
|
||||
* This function applies patches on current IOS
|
||||
* @see Patchsets
|
||||
* @param wii Flag determing whether or not to apply Wii patches.
|
||||
* @param sciifii Flag determing whether or not to apply extra Sciifii patches.
|
||||
* @param vwii Flag determing whether or not to apply extra vWii patches.
|
||||
* @param verbose Flag determing whether or not to print messages on-screen.
|
||||
* @example if(AHBPROT_DISABLED) IosPatch_FULL(true, false, false, false);
|
||||
* @return Signed 32bit integer representing code
|
||||
* > 0 : Success - return equals to number of applied patches
|
||||
* ERROR_AHBPROT : Error - No HW_AHBPROT access
|
||||
* ERROR_PATCH : Error - Patching HW_AHBPROT access failed
|
||||
*/
|
||||
s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose);
|
||||
|
||||
|
||||
/**
|
||||
* This function combines IosPatch_AHBPROT + IOS_ReloadIOS + IosPatch_RUNTIME
|
||||
* @see Patchsets
|
||||
* @param wii Flag determing whether or not to apply Wii patches.
|
||||
* @param sciifii Flag determing whether or not to apply extra Sciifii patches.
|
||||
* @param vwii Flag determing whether or not to apply extra vWii patches.
|
||||
* @param verbose Flag determing whether or not to print messages on-screen.
|
||||
* @param IOS Which IOS to reload into.
|
||||
* @example if(AHBPROT_DISABLED) IosPatch_FULL(true, false, false, false, 58);
|
||||
* @return Signed 32bit integer representing code
|
||||
* > 0 : Success - return equals to number of applied patches
|
||||
* ERROR_AHBPROT : Error - No HW_AHBPROT access
|
||||
* ERROR_PATCH : Error - Patching HW_AHBPROT access failed
|
||||
*/
|
||||
s32 IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS);
|
||||
|
||||
//==============================================================================
|
||||
// C++ footer
|
||||
//==============================================================================
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
//==============================================================================
|
||||
// HW_RVL footer
|
||||
//==============================================================================
|
||||
#endif /* defined(HW_RVL) */
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user