2023-03-06 18:06:55 +08:00

38 lines
1.1 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 3
#define MAKE_ENTID(hole, key) ((key+1)<<16|(hole+1))
cheat_error_t init_current_cheat( u32 id, u16 len );
cheat_error_t put_current_cheat( acl_entryid_t entry_id );
cheat_error_t get_current_cheat( u32 *id, u32 *len, void **entry_array );
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, int szrom );
#endif//_CHEAT_H_