diff options
author | David Guillen Fandos | 2021-05-05 02:20:00 +0200 |
---|---|---|
committer | David G. F | 2021-05-05 21:15:27 +0200 |
commit | 4fd456e1583a4c8686c8de87c2aeb1eb78125be1 (patch) | |
tree | a808a15f40df0f09226fc8e4a620b0f546b48729 /psp/mips_emit.h | |
parent | 52088a4d10af9a8c0e95b0eb168d4dfd0a13639f (diff) | |
download | picogpsp-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 'psp/mips_emit.h')
-rw-r--r-- | psp/mips_emit.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/psp/mips_emit.h b/psp/mips_emit.h index 12685e8..174fee5 100644 --- a/psp/mips_emit.h +++ b/psp/mips_emit.h @@ -44,6 +44,7 @@ void mips_indirect_branch_dual(u32 address); u32 execute_read_cpsr(); u32 execute_read_spsr(); void execute_swi(u32 pc); +void mips_cheat_hook(); u32 execute_spsr_restore(u32 address); void execute_store_cpsr(u32 new_cpsr, u32 store_mask); @@ -2422,6 +2423,12 @@ u32 execute_store_cpsr_body(u32 _cpsr, u32 store_mask, u32 address) generate_indirect_branch_cycle_update(dual); \ } \ +#define thumb_process_cheats() \ + generate_function_call(mips_cheat_hook); + +#define arm_process_cheats() \ + generate_function_call(mips_cheat_hook); + #ifdef TRACE_INSTRUCTIONS void trace_instruction(u32 pc) { |