This documentation is extracted from the Atmosphere project. You can find an up to date version here.
Code type 0 allows writing a static value to a memory address.
0TMR00AA AAAAAAAA VVVVVVVV (VVVVVVVV)
Code type 1 performs a comparison of the contents of memory to a static value.
If the condition is not met, all instructions until the appropriate conditional block terminator are skipped.
1TMC00AA AAAAAAAA VVVVVVVV (VVVVVVVV)
Code type 2 marks the end of a conditional block (started by Code Type 1 or Code Type 8).
20000000
Code type 3 allows for iterating in a loop a fixed number of times.
300R0000 VVVVVVVV
310R0000
Code type 4 allows setting a register to a constant value.
400R0000 VVVVVVVV VVVVVVVV
Code type 5 allows loading a value from memory into a register, either using a fixed address or by dereferencing the destination register.
5TMR00AA AAAAAAAA
5TMR10AA AAAAAAAA
Code type 6 allows writing a fixed value to a memory address specified by a register.
6T0RIor0 VVVVVVVV VVVVVVVV
Code type 7 allows performing arithmetic on registers.
However, it has been deprecated by Code type 9, and is only kept for backwards compatibility.
7T0RC000 VVVVVVVV
Code type 8 enters or skips a conditional block based on whether a key combination is pressed.
8kkkkkkk
Note that for multiple button combinations, the bitmasks should be ORd together.
Note: This is the direct output of hidKeysDown()
.
Code type 9 allows performing arithmetic on registers.
9TCRS0s0
9TCRS100 VVVVVVVV (VVVVVVVV)
Code type 10 allows writing a register to memory.
ATSRIOxa (aaaaaaaa)
Code Type 11 is currently reserved for future use.
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 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.
C0TcSX##
C0TcS0Ma aaaaaaaa
C0TcS1Mr
C0TcS2Ra aaaaaaaa
C0TcS3Rr
C0TcS400 VVVVVVVV (VVVVVVVV)
C0TcS5X0
Code type 0xC1 performs saving or restoring of registers.
C10D0Sx0
Code type 0xC2 performs saving or restoring of multiple registers using a bitmask.
C2x0XXXX
Code type 0xC3 reads or writes a static register with a given register.
C3000XXx
Code Type 0xF0 signals to the VM to treat the upper three nybbles of the first dword as instruction type, instead of just the upper nybble.
This reserves an additional 16 opcodes for future use.
Code type 0xFF0 pauses the current process.
FF0?????
Code type 0xFF1 resumes the current process.
FF1?????
Code type 0xFFF writes a debug log to the SD card under the folder /atmosphere/cheat_vm_logs/
.
FFFTIX##
FFFTI0Ma aaaaaaaa
FFFTI1Mr
FFFTI2Ra aaaaaaaa
FFFTI3Rr
FFFTI4X0