42 lines
1.4 KiB
C

#ifndef _CHEAT_H_
#define _CHEAT_H_
#include "types.h"
#include "arm11/acl.h"
typedef int cheat_error_t;
#define CCHT_OK 0
#define CCHT_NO_SPACE 1
#define CCHT_NO_IRQ 2
#define CCHT_NO_CHEAT 3
#define CCHT_NO_MEM 4
#define CCHT_NOT_INIT 5
#define CCHT_INVALID 6
#define CHEAT_MODE_DISABLED 0
#define CHEAT_MODE_FULLTIME 1
#define CHEAT_MODE_ENABYKEY 2
#define CHEAT_MODE_KEYONOFF 3
#define CHEAT_MODE_SIZE 4
#define MAKE_ENTID(hole, key) (((key)+1)<<16|((hole)+1))
#define ENT_USING(entid) ((entid) > 0xffff)
cheat_error_t init_current_cheat( u32 id, u16 len );
cheat_error_t put_current_cheat( acl_entryid_t entry_id );
cheat_error_t info_current_cheat( u32 *id, u32 *len );
cheat_error_t get_current_cheat( u32 index, acl_entryid_t *id );
cheat_error_t include_current_cheat( acl_entryid_t entry_id );
cheat_error_t overwrite_current_cheat( acl_entryid_t entry_id, u16 new_value );
cheat_error_t fini_current_cheat();
cheat_error_t push_current_cheat( const char *filename, int is_using );
cheat_error_t pop_current_cheat( const char *filename, u32 chtid );
cheat_error_t chtid_current_cheat( const char *filename, u32 *pointer_id );
cheat_error_t chtlst_current_cheat( const char *filename, u8 pointer_data[256] );
cheat_error_t apply_cheat( int mode, u32 szrom, u16 bindkey, u32 varaddr, u32 *outsize );
#endif//_CHEAT_H_