mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-07 14:24:12 +08:00
添加一个空的读取hookpoint的函数
This commit is contained in:
parent
01c378e650
commit
82f3bee823
@ -496,11 +496,11 @@ cheat_error_t apply_cheat( int mode, u32 szrom, hookpoint_analyzer *analyzer, u1
|
||||
// find hook point
|
||||
CodeLocation hookpoint[MAX_HOOKPOINT];
|
||||
memset( hookpoint, 0, sizeof(hookpoint) );
|
||||
int n_hookpoint;
|
||||
if( analyzer!=NULL && analyzer->provider != NULL ){
|
||||
int n_hookpoint = 0;
|
||||
if( analyzer!=NULL && analyzer->provider != NULL )
|
||||
n_hookpoint = analyzer->provider( analyzer->caller_data, hookpoint );
|
||||
}
|
||||
else n_hookpoint = rom_search_hookpoint( romdata, INSTR_LEN(realend) - 3, hookpoint ); // hook point need at least 3 instructions
|
||||
if( n_hookpoint == 0 )
|
||||
n_hookpoint = rom_search_hookpoint( romdata, INSTR_LEN(realend) - 3, hookpoint ); // hook point need at least 3 instructions
|
||||
if( n_hookpoint == 0 ) return CCHT_NO_IRQ;
|
||||
|
||||
// find free space to put new code
|
||||
|
@ -415,6 +415,11 @@ static u32 fixRomPadding(u32 romFileSize)
|
||||
return romSize;
|
||||
}
|
||||
|
||||
static u32 read_hookpoint_file( const void *path, u32 hookpoint[MAX_HOOKPOINT] )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
||||
{
|
||||
Result res;
|
||||
@ -439,6 +444,7 @@ static Result loadGbaRom(const char *const path, u32 *const romSizeOut)
|
||||
gamecode[4] = '\0';
|
||||
acl_open_lib( "gba.acl" );
|
||||
acl_select_game( gamecode, 0, NULL );
|
||||
hookpoint_analyzer ha = {read_hookpoint_file, path};
|
||||
apply_cheat( g_oafConfig.cheatMode, fileSize, NULL, g_oafConfig.cheatKeys, CHEAT_INUSE_ADDR, &fileSize );
|
||||
acl_close_lib();
|
||||
fini_current_cheat();
|
||||
|
Loading…
x
Reference in New Issue
Block a user