Login Register
MoHH2 Legendz

Legends of Medal of honor:Heores 2.. Never forgotten RiP in piece


    You are not connected. Please login or register

    View previous topic View next topic Go down  Message [Page 1 of 1]

    Post: #1on Sat Apr 14, 2012 9:02 pm

    Brian-1337-

    Senior Member


    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... : (




    Last edited by Brian-1337- on Mon Apr 16, 2012 4:09 am; edited 3 times in total

    http://www.facebook.com/Mips.Brian1337

    Post: #2on Sun Apr 15, 2012 11:44 am

    avatar

    sdrawkcab

    Senior Member


    never nice.
    please dont be your last guide ): .
    one question which may seem dumb..
    how do you joker a code for a 32 bit value?
    like if a value is = to 3f733333 active a code.
    rep +


    Post: #3on Sun Apr 15, 2012 7:29 pm

    Brian-1337-

    Senior Member


    sdrawkcab wrote:never nice.
    please dont be your last guide ): .
    one question which may seem dumb..
    how do you joker a code for a 32 bit value?
    like if a value is = to 3f733333 active a code.
    rep +
    Always the same as normal jokering.

    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
    lui t0, $AAAA // 0xAAAA0000 | Upper Half Code Address
    lui t1, $3f73 // 0x3f730000 | Upper Half Code Value
    ori t1, t1, $3333 // 0x3f733333 | Second Half Code Value
    sw t1, $BBBB // 0xAAAABBBB | Second Half Code Address
    jr ra
    nop

    Tips: Use the 'Method 2' if you are using only one button/binary.


    http://www.facebook.com/Mips.Brian1337

    Post: #4on Mon Apr 16, 2012 12:00 am

    avatar

    sdrawkcab

    Senior Member


    [quote="Brian-1337-"]
    sdrawkcab wrote:never nice.
    please dont be your last guide ): .
    one question which may seem dumb..
    how do you joker a code for a 32 bit value?
    like if a value is = to 3f733333 active a code.
    rep +
    Always the same as normal jokering.

    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
    lui t0, $AAAA // 0xAAAA0000 | Upper Half Code Address
    lui t1, $3f73 // 0x3f730000 | Upper Half Code Value
    ori t1, t1, $3333 // 0x3f733333 | Second Half Code Value
    sw t1, $BBBB // 0xAAAABBBB | Second Half Code Address
    jr ra
    nop

    thanks, i meant if the button value was "3f733333" not the codes value but i see what i did wrong now. Razz


    Post: #5on Mon Apr 16, 2012 3:59 am

    Brian-1337-

    Senior Member


    sdrawkcab wrote:thanks, i meant if the button value was "3f733333" not the codes value but i see what i did wrong now. Razz
    lui t0, $AAAA // 0xAAAA0000 | Upper Half Controller Address
    lw t0, $BBBB(t0) // 0xAAAABBBB | Second Half Controller Address
    lui t1, $3f73 // 0x3f730000 | Upper Half Buttons Value
    xori t1, t1, $3333 // 0x3f733333 | Second Half Buttons Value
    and t0, t0, t1
    bne t0, t1, $XXXXXXXX // Branch to jr ra
    nop
    // ~Codes Here~
    jr ra
    nop


    http://www.facebook.com/Mips.Brian1337

    Post: #6

    Sponsored content





    View previous topic View next topic Back to top  Message [Page 1 of 1]

    Permissions in this forum:
    You cannot reply to topics in this forum