Advanced Jokering: 32-bit Masking
Same in Raing3 Code Types 16-bit Masking but this is 32-bit.
Masking - is when your press the button value with other buttons still activate.
Method: 1
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lw t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
lui t1, $AAAA // 0xAAAA0000 | Upper Half Buttons Value
xori t1, t1, $BBBB // 0xAAAABBBB | Second Half Buttons Value
and t0, t0, t1
bne t0, t1, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
Method: 2
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lw t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
lui t1, $AAAA // 0xAAAA0000 | Upper Half Buttons Value
xori t1, t1, $BBBB // 0xAAAABBBB | Second Half Buttons Value
and t0, t0, t1
beq t0, zero, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
MIPS Explain
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
lui t1, $AAAA // Store the 'Upper Half Buttons Value' value into register t1.
0xAAAA0000 = t1
xori t1, t1, $BBBB // Add 'Upper Half Buttons Value' and 'Second Half Buttons Value' then store the value into register t1.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t1)
(This is not really a adding values, this uses binary and not requires Negative Rule.)
Example:
1111000001101100111011001010111 = 0x78367657
0010010001101110110000100100011 = 0x12376123
1101010000000010001011101110100 = 0x6A011774(Result)
and t0, t0, t1 // This also uses binary, also not requires Negative Rule the and store the result into register t0.
Example:
1111000001101100111011001010111 = 0x78367657
0010010001101110110000100100011 = 0x12376123
0010000001101100110000000000011 = 0x10366003(Result)
bne t0, t1, $XXXXXXXX // Branch to jr ra, if the value in t0 and t1 is 'Not Equal'.
beq t0, zero, $XXXXXXXX // Branch to jr ra, if the value in t0 is 'Equal' to zero.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
Advanced Jokering: 16-bit Masking
Method: 1
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lh t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
xori t1, zero, $XXXX // Buttons Value
and t0, t0, t1
bne t0, t1, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
Method: 2
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lh t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
andi t0, t0, $XXXX // Buttons Value
beq t0, zero, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
MIPS Explain: 1
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
xori t1, zero, $XXXX // Store the value into register t1.
0x0000XXXX = t1
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
100000001100100 = 0x4064(Result)
and t0, t0, t1 // Store the result into register t0.
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
001010100010001 = 0x1511(Result)
bne t0, t1, $XXXXXXXX // Branch to jr ra, if the value in t0 and t1 is 'Not Equal'.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
MIPS Explain: 2
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
andi t0, t0, $XXXX // Buttons Value, store the result into register t0.
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
001010100010001 = 0x1511(Result)
beq t0, zero, $XXXXXXXX // Branch to jr ra, if the value in t0 is 'Equal' to zero.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
Credits to Brian-1337-
Maybe my last guide... : (
Same in Raing3 Code Types 16-bit Masking but this is 32-bit.
Masking - is when your press the button value with other buttons still activate.
Method: 1
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lw t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
lui t1, $AAAA // 0xAAAA0000 | Upper Half Buttons Value
xori t1, t1, $BBBB // 0xAAAABBBB | Second Half Buttons Value
and t0, t0, t1
bne t0, t1, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
Method: 2
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lw t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
lui t1, $AAAA // 0xAAAA0000 | Upper Half Buttons Value
xori t1, t1, $BBBB // 0xAAAABBBB | Second Half Buttons Value
and t0, t0, t1
beq t0, zero, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
MIPS Explain
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
lui t1, $AAAA // Store the 'Upper Half Buttons Value' value into register t1.
0xAAAA0000 = t1
xori t1, t1, $BBBB // Add 'Upper Half Buttons Value' and 'Second Half Buttons Value' then store the value into register t1.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t1)
(This is not really a adding values, this uses binary and not requires Negative Rule.)
Example:
1111000001101100111011001010111 = 0x78367657
0010010001101110110000100100011 = 0x12376123
1101010000000010001011101110100 = 0x6A011774(Result)
and t0, t0, t1 // This also uses binary, also not requires Negative Rule the and store the result into register t0.
Example:
1111000001101100111011001010111 = 0x78367657
0010010001101110110000100100011 = 0x12376123
0010000001101100110000000000011 = 0x10366003(Result)
bne t0, t1, $XXXXXXXX // Branch to jr ra, if the value in t0 and t1 is 'Not Equal'.
beq t0, zero, $XXXXXXXX // Branch to jr ra, if the value in t0 is 'Equal' to zero.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
Advanced Jokering: 16-bit Masking
Method: 1
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lh t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
xori t1, zero, $XXXX // Buttons Value
and t0, t0, t1
bne t0, t1, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
Method: 2
lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
lh t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
andi t0, t0, $XXXX // Buttons Value
beq t0, zero, $XXXXXXXX // Branch to jr ra
nop
// ~Codes Here~
jr ra
nop
MIPS Explain: 1
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
xori t1, zero, $XXXX // Store the value into register t1.
0x0000XXXX = t1
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
100000001100100 = 0x4064(Result)
and t0, t0, t1 // Store the result into register t0.
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
001010100010001 = 0x1511(Result)
bne t0, t1, $XXXXXXXX // Branch to jr ra, if the value in t0 and t1 is 'Not Equal'.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
MIPS Explain: 2
lui t0, $AAAA // Store the 'Upper Half Controller Address' value into register t0.
0xAAAA0000 = t0
lw t0, $BBBB(t0) // Add 'Upper Half Controller Address' and 'Second Half Controller Address' then store the value in Controller Address to register t0.
0xAAAA0000 0x0000BBBB = 0xAAAABBBB(t0)
andi t0, t0, $XXXX // Buttons Value, store the result into register t0.
Example:
101010100110001 = 0x5531
001010101010101 = 0x1555
001010100010001 = 0x1511(Result)
beq t0, zero, $XXXXXXXX // Branch to jr ra, if the value in t0 is 'Equal' to zero.
nop // Delay Slot.
// ~Codes Here~ // The Codes will be activate if you press the buttons value even with other buttons.
jr ra // Return to linking commands.
nop // Delay Slot.
Credits to Brian-1337-
Maybe my last guide... : (
Last edited by Brian-1337- on Mon Apr 16, 2012 4:09 am; edited 3 times in total