7f75f5eb1e
*Due space limitations only the debug version of kenobigc is supported, this means there is a bit less space for cheats. git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@2 be6c1b03-d731-4111-a574-e37d80d43941
52 lines
839 B
C
52 lines
839 B
C
#ifndef _PATCHES_
|
|
#define _PATCHES_
|
|
|
|
#include "string.h"
|
|
#include "global.h"
|
|
#include "ipc.h"
|
|
#include "alloc.h"
|
|
#include "ff.h"
|
|
#include "vsprintf.h"
|
|
#include "HW.h"
|
|
#include "dol.h"
|
|
|
|
|
|
typedef struct PatchInfo
|
|
{
|
|
u8 *Signature;
|
|
u8 *Mask;
|
|
u32 Length;
|
|
u32 FunctionLength;
|
|
u8 *Patch;
|
|
u32 PatchLength;
|
|
char *Name;
|
|
} PatchInfo;
|
|
|
|
typedef struct FuncPattern
|
|
{
|
|
u32 Length;
|
|
u32 Loads;
|
|
u32 Stores;
|
|
u32 FCalls;
|
|
u32 Branch;
|
|
u32 Moves;
|
|
u8 *Patch;
|
|
u32 PatchLength;
|
|
char *Name;
|
|
u32 Group;
|
|
u32 Found;
|
|
} FuncPattern;
|
|
|
|
typedef struct PatchCache
|
|
{
|
|
u32 Offset;
|
|
u32 PatchID;
|
|
|
|
} PatchCache;
|
|
|
|
void PatchGCIPL( void );
|
|
void DoPatches( char *ptr, u32 size, u32 SectionOffset );
|
|
void DoCardPatches( char *ptr, u32 size, u32 SectionOffset );
|
|
void DoPatchesLoader( char *ptr, u32 size );
|
|
|
|
#endif |