A 'simple' way to stop the code engine from executing codes would be to use the 'Execute custom asm routine' hack I made, and instead of ending it with bx r14, put this :
add r13,r13,10h
pop r4-r11,r14
bx r14
That would make the AR act just like all the codes have been executed, ie. it'll stop processing codes and will give back the hand to the game.
Add the asm pad check before (or put a regular if... code type before the E code type), and put all of that at the very start of your code list.
For exemple (tested and working), this code will prevent the code handler to analyze any further code if you're moving your character (if Up/Down/Left or Right is pressed) :
Code:
023FE074 012FFF31 // Enable code type E hack
A4000130 FF0F00F0 // Pad check : if Up/Down/Left or Right is pressed...
E0000000 00000010 //
E28DD010 E8BD4FF0 // This is the asm routine that stops the code handler
E12FFF1E 00000000 //
D2000000 00000000 // Clears the If... code
023FE074 E3520003 // Disables the code type E hack
This is a 'if key is pressed, stop executing codes' asm routine. One could also make a 'switch' ('press L+R+A to enable the code handler, L+R+B to disable it') by storing the on/off value after the asm routine, ie. no need to find free space (but that means the pad checking routine must be in asm).
For exemple :
Code:
023FE074 012FFF31
E0000000 00000048
E59F0038 E1D000B0
E1DF13B6 E0000001
E3500002 0A000001
E3500001 1A000001
E2200003 E1CF01B8
E1DF01B4 E3500001
0A000001 E28DD010
E8BD4FF0 E12FFF1E
04000130 03030001
D2000000 00000000
With this code/asm routine the code execution is enabled by default, pressing L+R+A enables it, and pressing L+R+B disables it.
And changing 03030001 to 03030000 makes the code execution disabled by default.
Needless to say that all these codes will work whatever the game is, as they all use 'relative' addressing.