diff options
Diffstat (limited to 'psp/mips_stub.S')
-rw-r--r-- | psp/mips_stub.S | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/psp/mips_stub.S b/psp/mips_stub.S index 08151db..786dc9e 100644 --- a/psp/mips_stub.S +++ b/psp/mips_stub.S @@ -44,6 +44,7 @@ .global init_emitter .global mips_lookup_pc .global smc_write +.global mips_cheat_hook .global write_io_epilogue .global memory_map_read @@ -256,6 +257,17 @@ mips_update_gba: nop +# Processes cheats whenever we hit the master PC +mips_cheat_hook: + sw $ra, REG_SAVE2($16) + save_registers + cfncall process_cheats, 8 + lw $ra, REG_SAVE2($16) + restore_registers + jr $ra + nop + + # Loads the main context and returns to it. # ARM regs must be saved before branching here return_to_main: @@ -649,6 +661,7 @@ fnptrs: .long set_cpu_mode # 5 .long execute_spsr_restore_body # 6 .long execute_store_cpsr_body # 7 + .long process_cheats # 8 #if !defined(HAVE_MMAP) |