f808bbc8e0
-updated to version 2.5- *Fixed a bug in DM that could cause a fatal read error when using devices with under 8GB size *Added a PADHOOK pattern for Batman:Vengeance *Added a screenshot feature This feature can be enabled/disabled via the DM(L) config Press R+Z on the fourth controller to take a screenshot any time! Screenshots will be saved to device:/screenshots in the YPbPr format, you can use my tool to convert them. git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@33 be6c1b03-d731-4111-a574-e37d80d43941
84 lines
1.4 KiB
C
84 lines
1.4 KiB
C
#ifndef _PATCHES_
|
|
#define _PATCHES_
|
|
|
|
#include "string.h"
|
|
#include "global.h"
|
|
#include "alloc.h"
|
|
#include "ff.h"
|
|
#include "vsprintf.h"
|
|
#include "HW.h"
|
|
#include "dol.h"
|
|
#include "Config.h"
|
|
|
|
#define MAX_FB 3
|
|
|
|
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;
|
|
|
|
typedef struct _gx_rmodeobj {
|
|
u32 viTVMode;
|
|
u16 fbWidth;
|
|
u16 efbHeight;
|
|
u16 xfbHeight;
|
|
u16 viXOrigin;
|
|
u16 viYOrigin;
|
|
u16 viWidth;
|
|
u16 viHeight;
|
|
u32 xfbMode;
|
|
u8 field_rendering;
|
|
u8 aa;
|
|
u8 sample_pattern[12][2];
|
|
u8 vfilter[7];
|
|
} GXRModeObj;
|
|
|
|
|
|
#define VI_NTSC 0
|
|
#define VI_PAL 1
|
|
#define VI_MPAL 2
|
|
#define VI_DEBUG 3
|
|
#define VI_DEBUG_PAL 4
|
|
#define VI_EUR60 5
|
|
|
|
#define GXPal528IntDf 0
|
|
#define GXEurgb60Hz480IntDf 1
|
|
#define GXMpal480IntDf 2
|
|
#define GXNtsc480IntDf 3
|
|
#define GXNtsc480Int 4
|
|
|
|
void SMenuAddFramebuffer( void );
|
|
void ScreenShot( void );
|
|
void DoPatches( char *ptr, u32 size, u32 SectionOffset );
|
|
void DoCardPatches( char *ptr, u32 size, u32 SectionOffset );
|
|
void DoPatchesLoader( char *ptr, u32 size );
|
|
|
|
#endif |