SSBB code doesn't work

Started by Drenn, November 25, 2009, 10:12:18 PM

Previous topic - Next topic

Drenn

I don't have USB Gecko (though I may get one) so I have to do everything the hard way. Right now I'm trying to make a code (using a borrowed address, I'll give credit promise) that'll change a value when L is pressed. However, I want to change it back when it's released. So I need to know the default value. I don't know a better way to do this so I tried getting it using this code:

284DE4B0 000000C0
4A000000 90180F20
92210000 000000E0
4A000000 80000000
94010000 0028AE64
E0000000 80008000

I didn't really expect it to work. It's supposed to take the value and put it into the number of lives my player has. I'm wondering what I did wrong in this code, or maybe there's a better way to do it?

Almas

It would be easier to help if you detailed more specifically everything about what you want the code to do. But...

If L is pressed
  Write X at [Y]
If L is not pressed
  Write Y at [GrN]

Using indentation to denote the Then part of Ifs, Y to mean a value and [Y] to mean the place where Y is stored. [GrN] is an arbitrary Gecko Register. Make sure that the other codes that are active do not interfere with this register.

Drenn

#2
Ah, hadn't thought of using grN. I'll see if I can get that working.

Post Merge: November 28, 2009, 04:06:21 PM

OK, for my code I'm trying to do something like this:

if (gr1 == 0)
    gr0 = [yyyyyyyy]
    gr1 = 1
end if

[yyyyyyyy] = gr0

if (pressing L)
    [yyyyyyyy] = -5
end if

How do I check the value of grN? I couldn't find it in Kenobi's code type document...

Romaap


Dark Chaos

I have a question.do i need permission to post a code i edited but made by someone else. :( (i obviously will give full credit to the maker.)

Click here to level up my card!
You're too slow LOL :D

Romaap

No, you are allowed to post it.
But you have to credit the original hacker.

Drenn

Thanks Romaap, however I find that a bit confusing (That must be why I missed it first).

Could someone break this down?
if ([grN] and not(YYYY))==([grM] and not(YYYY))

I'm not exactly an experienced programmer so that's a bit confusing to me...

Romaap

If you leave YYYY zero then it would look like this:
If([grN] == [grM])

I could explain the AND and NOT but I don't think you need it ;)

Drenn

Well I tried using this code

A0000000 01000000
4A000000 90180F20
92110000 000000E0
E2000001 80000000
94110000 000000E0
4A000000 80000000
284DE4B0 FFBF00C0
4A000000 90180F20
140000E0 C0000000
E0000000 80008000

and it froze my wii.  For the first line, I filled the first part with 0s which I'm not sure I was supposed to do, because in the code types guide it said
A0______ NM00YYYY : 16bits If equal 16bits compares if ([grN] and not(YYYY))==([grM] and not(YYYY)). If yes, codes are executed (else code execution set to false).
I wasn't sure what to put for the address because it never mentioned comparing it to anything... anyway I don't know if that's what made it crash. I'll look into it more, if I can pull myself away from the game itself. (Plus some more advanced forms of brawl hacking)