summaryrefslogtreecommitdiff
path: root/arm/arm_emit.h
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-05-05 02:20:00 +0200
committerDavid G. F2021-05-05 21:15:27 +0200
commit4fd456e1583a4c8686c8de87c2aeb1eb78125be1 (patch)
treea808a15f40df0f09226fc8e4a620b0f546b48729 /arm/arm_emit.h
parent52088a4d10af9a8c0e95b0eb168d4dfd0a13639f (diff)
downloadpicogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.tar.gz
picogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.tar.bz2
picogpsp-4fd456e1583a4c8686c8de87c2aeb1eb78125be1.zip
Adding Code Breaker cheat support
This works on both interpreter and dynarec. Tested in MIPS, ARM and x86, still needs some more testing, some edge cases can be buggy.
Diffstat (limited to 'arm/arm_emit.h')
-rw-r--r--arm/arm_emit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arm/arm_emit.h b/arm/arm_emit.h
index 1432617..4368a80 100644
--- a/arm/arm_emit.h
+++ b/arm/arm_emit.h
@@ -31,6 +31,8 @@ u32 prepare_store_reg(u32 scratch_reg, u32 reg_index);
void generate_load_reg(u32 ireg, u32 reg_index);
void complete_store_reg(u32 scratch_reg, u32 reg_index);
void complete_store_reg_pc_no_flags(u32 scratch_reg, u32 reg_index);
+void thumb_cheat_hook();
+void arm_cheat_hook();
u32 arm_update_gba_arm(u32 pc);
u32 arm_update_gba_thumb(u32 pc);
@@ -1876,6 +1878,12 @@ u32 execute_store_cpsr_body(u32 _cpsr, u32 store_mask, u32 address)
generate_indirect_branch_cycle_update(dual_thumb); \
} \
+#define thumb_process_cheats() \
+ generate_function_call(thumb_cheat_hook);
+
+#define arm_process_cheats() \
+ generate_function_call(arm_cheat_hook);
+
#define thumb_swi() \
generate_swi_hle_handler(opcode & 0xFF, thumb); \
generate_function_call(execute_swi_thumb); \