From 4fd456e1583a4c8686c8de87c2aeb1eb78125be1 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 5 May 2021 02:20:00 +0200 Subject: 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. --- cpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpu.c') diff --git a/cpu.c b/cpu.c index badb9c2..5df8bb8 100644 --- a/cpu.c +++ b/cpu.c @@ -1679,6 +1679,10 @@ arm_loop: collapse_flags(); cycles_per_instruction = global_cycles_per_instruction; + /* Process cheats if we are about to execute the cheat hook */ + if (pc == cheat_master_hook) + process_cheats(); + old_pc = pc; /* Execute ARM instruction */ @@ -3294,6 +3298,10 @@ thumb_loop: collapse_flags(); + /* Process cheats if we are about to execute the cheat hook */ + if (pc == cheat_master_hook) + process_cheats(); + old_pc = pc; /* Execute THUMB instruction */ -- cgit v1.2.3