Mario kart Wii addresses change each race?

Started by toonlink444, March 11, 2011, 12:07:03 AM

Previous topic - Next topic

toonlink444

I made really cool code that allows you to keep star power. It took me 30 minutes to find the timer and a good hour to find the countdown. The timer was divided into segments so I had to change 9 instrutions. The code worked great. And I figured sence it's in ASM it didn't need pointers(correct me if i'm wrong) but at the start of the next race it wouldn't work. I went back to my testing track and it didn't work there. When looking at the mem viewer with the the same address the values were different. I had this same issue with my flat code.(besides I couldn't find the flat value just the flat graphic) and it's made me wonder, are codes that invole values that stay the same each race change address each race to. If so that means a lot of my ideas will be usless unless I need a pointer.(which I DON'T want to do) Is this a legit claim. If I'm wrong can someone tell me how to solve this without pointers.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

Patedj

I'm writing this because I think this might help a little, I do think you know this already though. dcx2 tell me if I'm wrong.
If you see data changing then it would be using lower registers for they are volatile. The higher registers are non-volatile.
+
usually when you're in a function with lots of branches, you'll see that there are certain places that use more non-volatile registers. These are usually the ones that concern constants: the then part of the if code: this is where I would try to change the values for the flat code. At least this is what I would expect to see. They wouldn't change addresses. Other addresses would branch to these ones.
You can pm me, I've got time for your troubles.

dcx2

Can you post the code that you wrote?  And any notes that you kept while making the code?  Also, the Copy Function for the disassembly where you're modifying the ASM.

If you change the ASM, the code should work for all levels, unless the ASM moves, or different levels use different ASM to count the timer (Ghost Squad, for instance, had different ASM for just about every timer, which is why I have like 30 timer codes for that game)

Whenever you find a timer, you should find an instruction nearby that subtracts 1 from the timer.

toonlink444

Ummm I errrrr closed gecko dotNet so I will have to find it again. But here's the code
  C2572A54 00000005
  38030000 38030000
  38030000 38030000
  38030000 38030000
  38030000 38030000
  38030000 00000000
  E0000000 80008000
But I think I can shorten it to
C2572A54 00000005
38030000 00000000
E0000000 80008000
I'll get back tomarrow with the function.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

dcx2

#4
A few things

1) You don't need a C2 code if you're only changing one instruction.

2) Your instruction, addi r0,r3,0...while it works, I personally prefer mr r0,r3

3) Your shorter C2 code says it has 5 lines, but it really only has 1

4) You don't need a terminator for C2 codes, only if codes or codes that change ba/po.

---

One important thing to do; if you think you found a timer, get the power-up and then try poking it to a REALLY big value and seeing if the power-up lasts longer than normal.  You can also try poking it to a really small value and seeing if your power-up lasts shorter than normal.

EDIT:

So I went ahead and looked for this timer, too.  80572A54 is not the address you want...but it's very close.  One of the problems is that there are a *lot* of timers running in this game, so you have to be sure you found the right one.

What I ended up doing was getting it down to a few results, and then setting write breakpoints on those results and modifying the ASM so that the timers wouldn't count down anymore.  Gecko.NET stores a history of all ASM edits made via the Disassembly tab.  After hitting all the timers and verifying that the powerup lasted forever, I used the history to turn the edits off one at a time, and when I lost the power-up I knew that I had just restored the power-up's timer.

Bully@Wiiplaza

you got mkwii, dcx2? Didn´t know that, would be cool to see some more codes by you... doesn´t matter which game :eek:
(You´re still busy I read, but things will change in a few weeks, hopefully)

Btw. it´s normal for mkwii that adresses are moving every new race, but ASM and mostly pointers aswell, can handle it!
Not every ASM Code works online aswell (good and bad thing) but it does always work for the CPU Enemies and the player (if not using any branches).
My Wii hacking site...
http://bullywiihacks.com/

My youtube account with a lot of hacking videos...
http://www.youtube.com/user/BullyWiiPlaza

~Bully

dcx2

Yes, I have MKWii, although due to the online nature there's a reason I never made codes for it.

That said, toonlink is trying to learn, and these are the sorts of exercises that are best for beginners, so I was willing to bust it out to give him some help.

toonlink444

I did it. Then I froze the game activating the p2 star item in :D. I will make a button activator and you guys can test it. ;D
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

toonlink444

Here it is :cool:
28341462 FFFB0004
48000000 809BD118
DE000000 80008180
58010000 00000008
DE000000 80008180
4A100000 0000008C
30000000 00000014
14000000 00000009
14000004 00000001
E0000000 80008000
28341462 FFFE0001
04572EC4 3803FFFF
E0000000 80008000
28341462 FFFD0002
04572EC4 7C601B78
E0000000 80008000

Press the down on the d-pad to get the star. Right to make it last forever and left to end it.
Give me some feedback.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

strakn

I believe the first and second full terminators can be removed if you add 1 to the second and third button activator addresses. Adding the 1 will make the code first apply and end if (making the full terminator unneccesary).

toonlink444

The last two button activators are changing the assessmbly So the terminator is needed.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/

dcx2

You got it right.  ^_^

I would recommend a combination more complex than just one button.  It makes it harder to activate at the wrong time.

Also, you should credit Volderbeek's Always Have Item code for the part that gives you star power.

strakn's right, you can add 1 to the if codes to make them endif + if.  Then you don't need the terminator.  Terminators do two things: end all if codes, and reset ba/po.  Nothing to do with changing ASM.  Since you didn't change ba/po, you can use regular endifs.

28341462 FFFB0004
48000000 809BD118
DE000000 80008180
58010000 00000008
DE000000 80008180
4A100000 0000008C
30000000 00000014
14000000 00000009
14000004 00000001
28341463 FFFE0001
04572EC4 3803FFFF
28341463 FFFD0002
04572EC4 7C601B78
E0000000 80008000

Nutmeg

Hate to rain on your parade... sorry. D:

http://volderbeek.freeforums.org/infinite-star-power-new-version-t41.html

Check the first line of the NTSC-US address...  again, sorry D:
I'm inbetween your legs... that's not awkward.

toonlink444

#13
Just tested and it is very nice. But with mine you don't need to find a different star to reactivate it if you deactivated it. Plus mine affacts the timer so it will never end. His just makes it stay on. I think I post this as a varient. And cool I got that right. I'm starting to know more. ;D
Edit: P.S His is with GC controler. And I fully thank Volderbeek for his awsome code.
In the begining there was nothing. Then it exploded
New blog!! Check it out for hacking Smash Bros Brawl!! http://letshackblank.blogspot.com/