Tutorial: How To Make An Invincible Code

Started by GMO, February 17, 2010, 04:07:43 AM

Previous topic - Next topic

GMO

http://www.mediafire.com/?zvt5bhjhuuk

QuoteIt’s not an ordinary health code, but again it’s also not a health code either.
The way it works as a health code is when you get hit or damaged you begin to flash
for a brief period of time.  That flash is Temporary Invisibility and it has a cool down/ countdown
It allows you to run through enemies and not get hurt.

I hope you guys and ladies enjoy it
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E

dcx2

Nice!  That's one way to do "infinite health".

When you were searching for the timer, did you use the Next button?  I have noticed that the Next button on WiiRdGUI sometimes appears to run two frames instead of just one.  To get single-frames accurately I need to break on an instruction that's executed once per frame.  But there's a weird bug; if I breakpoint, do a Code Search, then the next time I hit the breakpoint the game won't actually execute anything and I don't see a frame go by.  I have to hit breakpoint again.

Did you use less-than's, or different-by's?  Once I stopped using Next and started using Breakpoints to single-frame, I found it was much easier to find timers by using unknown search and then different by 1.  This is especially useful for searching mem2 for timers, but it doesn't work if a float is being used for a timer (I think Tales of Symphonia used a float for a can't-use-items timer?)

What you're taking advantage of is called "spatial locality".  Similar things are likely to be placed close to each other in memory.  For instance, Mega Man's health, ammo, and timers are all close to each other.  I've often used spatial locality to find things; when looking for a timer in Ghost Squad related to the menu, I would go back and forth highlighting two different options and search for unknowns that are changing back and forth.  Once I found the "current menu item" variable, I watched around it in Memory Viewer and the timer jumped right out at me.

Your code requires you to get hit the first time, yes?  There's probably a flag bit somewhere that indicates "invincibility", and if this flag is set then it prevents health from disappearing, decrements the timer, etc.  Or maybe it checks boundary conditions; the timer might be zero/maxed, and being set to a non-zero/non-maxed value is the "flag" that indicates invincibility.  If you found the condition that "sets" invincibility, you could set it yourself and skip having to be hit by an enemy.

GMO

#2
I rarely use the next button unless I'm looking for a countdown for a racing game. If you do a break point and you know you found the address you can search it (I usually do a Break on Write) eg; Castlevania ReBirth.

I found the code, but it was different on each stage ( and yes 95% of the time you are required to get hit to activate the code)
00E67BDF 3A , Invincible (Stage 1)

8009FE60:  901F01FC   stw   r0,508(r31)
8009FE64:  801F020C   lwz   r0,524(r31)
8009FE68:  28000002   cmplwi   r0,2
8009FE6C:  40820034   bne-   0x8009fea0
8009FE70:  808DACE0   lwz   r4,-21280(r13)
8009FE74:  80640034   lwz   r3,52(r4)
8009FE78:  2C030000   cmpwi   r3,0
8009FE7C:  4182000C   beq-   0x8009fe88
8009FE80:  3803FFFF   subi   r0,r3,1
8009FE84:  90040034   stw   r0,52(r4)
8009FE88:  806DACE0   lwz   r3,-21280(r13)
8009FE8C:  80030034   lwz   r0,52(r3)
8009FE90:  2C000000   cmpwi   r0,0
8009FE94:  4082000C   bne-   0x8009fea0
8009FE98:  38000001   li   r0,1
8009FE9C:  901F020C   stw   r0,524(r31)

I stopped the operation 8009FE60 60000000 nop
and the code worked through all the stages.

I do not use Less than or different by's.  I spent the majority of the last 3 years looking at memory viewers and dissemblers. I think I am just lucky or have a good eye for changes

Yes,it does require you to get hit.  Most likely if I do a break on read I could trace it to where I don't have to be hit.
Why can't we have this type of input on all games? I bet if we did a lot more people would be hacking. My goal is to really start to get people involved, and if i can make it simple for them the better.
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E

Romaap


dcx2

Hey GMO, I just wanted to give you good news.  Your tutorial gave me an idea to make an invincibility code for Super Mario Galaxy.  ;D  It is DEFINITELY superior to infinite health codes that still suffer from stun.

http://wiird.l0nk.org/forum/index.php/topic,39.msg44045.html#msg44045

GMO

Awesome! I'm glad that I have inspired at least one person.
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E

elmoreas

More good news here, I GOT MY FIRST CODE TO WORK!!! Thanks GMO!

Sincerely,
Elmoreas
"I am new but I am learning"
"I help others not to help myself but just to help others"
"I may need help now but I may be able to help you in the future so rember the Golden Rule"

GMO

Awesome! What game did you try it on? Super Mario Bros.
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E

elmoreas

Yeah thats what game you told me to start on in your PM so I thought it best that I should use it for your tutorials. It basically makes mario look like he  has star on all the time, which is a really cool side effect. I still have about 40 pages left to read but that is down from 120 so I am making tons of progress on the research part. I should be ready to tackle some more tutorials soon and then start hacking on my own soon, maybe a couple months. (Thats soon to me at least cause I take everything slow and do it right the first time) Anyways thanks for the tutorial and for the PMs they have all been of great help. I am really looking forward to the day I can contribute to the community. Talk to you later, my friend. Have a good day.

Sincerely,
Elmoreas
"I am new but I am learning"
"I help others not to help myself but just to help others"
"I may need help now but I may be able to help you in the future so rember the Golden Rule"

GMO

Quote from: elmoreas on February 19, 2010, 01:54:39 PM
Yeah thats what game you told me to start on in your PM so I thought it best that I should use it for your tutorials. It basically makes mario look like he  has star on all the time, which is a really cool side effect. I still have about 40 pages left to read but that is down from 120 so I am making tons of progress on the research part. I should be ready to tackle some more tutorials soon and then start hacking on my own soon, maybe a couple months. (Thats soon to me at least cause I take everything slow and do it right the first time) Anyways thanks for the tutorial and for the PMs they have all been of great help. I am really looking forward to the day I can contribute to the community. Talk to you later, my friend. Have a good day.

Sincerely,
Elmoreas

Unlimited Star Power, Very nice.
http://gamemasterzer0.blogspot.com
For Codes, Guides, & Support Codemasters-Project
USB Gecko Facebook Page - My Wii's 4.1 U | 4.0 E