Please add more Codetypes to the cheat engine so that it is universal with other cfw cheat codetypes
[/LIST]
Code:
Code Type 9: Perform Arithmetic
Code type 9 allows performing arithmetic on registers.
Register Arithmetic Encoding
9TCRS0s0
[LIST]
[*]T: width of arithmetic operation (1, 2, 4, or 8 bytes)
[*]C: Arithmetic operation to apply, see below.
[*]R: Register to store result in.
[*]S: Register to use as left-hand operand.
[*]s: Register to use as right-hand operand.
[/LIST]
Immediate Value Arithmetic Encoding
9TCRS100 VVVVVVVV (VVVVVVVV)
[LIST]
[*]T: width of arithmetic operation (1, 2, 4, or 8 bytes)
[*]C: Arithmetic operation to apply, see below.
[*]R: Register to store result in.
[*]S: Register to use as left-hand operand.
[*]V: Value to use as right-hand operand.
[/LIST]
Arithmetic Types
[LIST]
[*]0: Addition
[*]1: Subtraction
[*]2: Multiplication
[*]3: Left Shift
[*]4: Right Shift
[*]5: Logical And
[*]6: Logical Or
[*]7: Logical Not (discards right-hand operand)
[*]8: Logical Xor
[*]9: None/Move (discards right-hand operand)
[/LIST]
Code Type 10: Store Register to Memory Address
Code type 10 allows writing a register to memory.
Encoding
ATSRIOxa (aaaaaaaa)
[LIST]
[*]T: width of memory write (1, 2, 4, or 8 bytes)
[*]S: Register to write to memory.
[*]R: Register to use as base address.
[*]I: Increment register flag (0 = do not increment R, 1 = increment R by T).
[*]O: Offset type, see below.
[*]x: Register used as offset when O is 1, Memory type when O is 3, 4 or 5.
[*]a: Value used as offset when O is 2, 4 or 5.
[/LIST]
Offset Types
[LIST]
[*]0: No Offset
[*]1: Use Offset Register
[*]2: Use Fixed Offset
[*]3: Memory Region + Base Register
[*]4: Memory Region + Relative Address (ignore address register)
[*]5: Memory Region + Relative Address + Offset Register
[/LIST]
Code Type 11: Reserved
Code Type 11 is currently reserved for future use.
Code Type 12-15: Extended-Width Instruction
Code Types 12-15 signal to the VM to treat the upper two nybbles of the first dword as instruction type, instead of just the upper nybble.
This reserves an additional 64 opcodes for future use.
Code Type 0xC0: Begin Register Conditional Block
Code type 0xC0 performs a comparison of the contents of a register and another value. This code support multiple operand types, see below.
If the condition is not met, all instructions until the appropriate conditional block terminator are skipped.
Encoding
C0TcSX##
C0TcS0Ma aaaaaaaa
C0TcS1Mr
C0TcS2Ra aaaaaaaa
C0TcS3Rr
C0TcS400 VVVVVVVV (VVVVVVVV)
C0TcS5X0
[LIST]
[*]T: width of memory write (1, 2, 4, or 8 bytes)
[*]c: Condition to use, see below.
[*]S: Source Register
[*]X: Operand Type, see below.
[*]M: Memory Type (operand types 0 and 1)
[*]R: Address Register (operand types 2 and 3)
[*]a: Relative Address (operand types 0 and 2)
[*]r: Offset Register (operand types 1 and 3)
[*]X: Other Register (used for operand type 5)
[*]V: Value to compare to (operand type 4)
[/LIST]
Operand Type
[LIST]
[*]0: Memory Base + Relative Offset
[*]1: Memory Base + Offset Register
[*]2: Register + Relative Offset
[*]3: Register + Offset Register
[*]4: Static Value
[*]5: Other Register
[/LIST]
Conditions
[LIST]
[*]1: >
[*]2: >=
[*]3: <
[*]4: <=
[*]5: ==
[*]6: !=
[*]