This is a little addition to my other guide and might give you guys a little more explanation on things that should be covered so enjoy, and if you have ANYTHING to add please let me know and I will look into it. Also expect a guide on returns and methods for the 'jr ra' command comming in the next while along with a packet injection guide
Nop
Signifies no operation, can be used (not what its designed for) to disable a function as opposed to what imok said. Nops can caused issues with the game if they are located inside an active function. When there are large areas of nop code, outside of a function, generally it's safe to change. This is where most subroutines are stored.
Lui
Load Upper Immediate. Slightly more technical explanation. This will load a 16-bit value specified by the immediate into the upper half of the registers, so the top 16 bits of the register are equal to the immediate.
Lw
The load word operation does something completely different from what imok said, unless I interpretted it wrong. It will load a 32-bits of data from the specified address into a register. For example.
Lets pretend $000A00FF has the value of 0xCC
lui t0, $000a
lw t1, $00FF(t0)
After executing those instructions, t1 would be equal to 0xCC and t0 would still be equal to 0x000A
Ori
This operation performs a bitwise OR on the immediate and the register and stores the result of that OR into a specified register. It can be, but isn't always, used to load data into a register containing no value, or when OR'd with the zero register.
Addiu
I'm sorry but I have to disagree with the part that said it works like an ORI, they can however have similar uses. . Take this for example.
4 OR 4 = 4
4 + 4 = 8
Jr ra
Indeed, jump register, where ra is the reigster its jumping to. Think of it like a normal jump, but the address its jumping to isn't a constant, and can be dynamically loaded. Don't forget, you can change the register to whatever you like, t9 is another common one. Ra is only used because when a jal is executed, it is automatically given the value of the address being jumped from + 8.
Stack Pointer (Register)
Not to be confused with the stack we know which is used to move data from banning areas to safe ones. Useful for preserving registers across function calls.
Bookmarks