1. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    Is there a way to do logical AND IF statements similar to the Cafe 09 codetype? And is there an equivalent to the Cafe D0000000 DEADCAFE line to end IF statements?
    @CosmoCortney
    @BullyWiiPlaza
     
  2. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3
    Member

    Joined:
    Aug 2, 2014
    Messages:
    1,932
    Country:
    Germany
    Doesn't it do exactly that?
     
  3. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    Well there isn't a logical AND IF statement that I can find in the documentation or an equivalent to D0000000 DEADCAFE to end if statements. Sorry if I'm asking a stupid question :S
     
  4. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3
    Member

    Joined:
    Aug 2, 2014
    Messages:
    1,932
    Country:
    Germany
    Code:
    32bit:
    09020000 LLLLLLLL
    VVVVVVVV 00000000
          . . .
    D0000000 DEADCAFE
    
    This checks if the 32bit value at LLLLLLLL has the same true bits as VVVVVVVV. If the condition is true the next code/s (represented by . . . ) is/are executed.
     
    HackingNewbie likes this.
  5. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    I mean with gecko codes for the wii
     
  6. DarkFlare69

    DarkFlare69 GBAtemp Guru
    Member

    Joined:
    Dec 8, 2014
    Messages:
    5,135
    Country:
    United States
    You could use assembly
     
  7. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3
    Member

    Joined:
    Aug 2, 2014
    Messages:
    1,932
    Country:
    Germany
    Ohhh, okay.
    Code:
    16 bits (endif, then) If equal
    28______ MMMMXXXX
    
    Adding 1 to ______ will make this code first apply an Endif.
    (It will still use ______ for address calculation; without the added 1)
    
    If 16 bits at ([ba+______] & not(MMMM))==XXXX,
    then codes are executed (else code execution set to false)
    
    
    To use po instead of ba, change the codetype from 28 to 38.
    For values of ______ >= 0x01000000, add one to the codetype.
    You use a mask for MMMM which will do an AND.
     
    Last edited by BullyWiiPlaza, Mar 8, 2017
    HackingNewbie likes this.
  8. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    What would the mask be?
    EDIT: all the values of all the buttons not wanted added together?
     
  9. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3
    Member

    Joined:
    Aug 2, 2014
    Messages:
    1,932
    Country:
    Germany
    Yes. But you should do
    Code:
    0x10000 - the value you want
     
    HackingNewbie likes this.
  10. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    Thank you so much for putting up with my silly questions I really appreciate it. Just one more question:
    can
    Code:
    E0000000 00000000
    
    Be used to end IF statements so the next piece of code isn't in the IF statement?
     
  11. BullyWiiPlaza

    BullyWiiPlaza Nintendo Hacking <3
    Member

    Joined:
    Aug 2, 2014
    Messages:
    1,932
    Country:
    Germany
    Yes, I always used:
    Code:
    E0000000 80008000
     
    Last edited by BullyWiiPlaza, Mar 8, 2017
    HackingNewbie likes this.
  12. HackingNewbie

    OP HackingNewbie GBAtemp Advanced Fan
    Member

    Joined:
    Dec 29, 2016
    Messages:
    536
    Country:
    United Kingdom
    Okay, that'll be all for my nooby questions :)
     
    BullyWiiPlaza likes this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Statement, Logical, Gecko