Hey code creators !
So, I'm currently working on a new hook system and thanks to that I can finally propose a hook code for the Action Replay.
I'm thinking about a syntax, but I'd like your thoughts on it (ideas & suggestions to improve it) as you'll be those who'll use it.
For now I have this:
Code:
FD0000AB YYYYYYYY - Create a hook at offset to custom code (ZZZZ), YYY is code size in bytes
ZZZZZZZZ ZZZZZZZZ
A - Manual Return (don't allow the assisted bx lr), set 1 to enable
B - Don't Execute Overwritten Instruction Before custom code, set 1 to enable
FD100000 YYYYYYYY - Disable a hook at address YYYYYYYY if exists
Example of code usage
Code:
Zelda OOT
[Inf HP]
D3000000 00352E24 - Offset = 0x00352E24
FD000000 0000000C - New hook at offset, 12 bytes
E1D504B2 E1C504B4 - ldrh r0, [r5, #0x42], strh r0, [r5, #0x44]
E12FFF1E 00000000 - bx lr
D2000000 00000000 - End
Note about the hook system:
- A hook can only be created if the target address isn't already hooked
- All hooks created by a code will be disabled when the code is disabled in the menu (or edited)
- With default parameters (and except for instruction which are PC depending), the overwritten instruction is executed before executing the custom code (ZZZZ)
- A maximum of 91 enabled hooks is available in same time
- No need for a code cave, the code will be placed into CTRPF's memory (so you can do really long code)
If you have questions or needs more options, feel free to ask, I'll see what is possible to do.
Thanks