The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking > Research & Development
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
New threads in this forum are to be approved by a moderator before they are displayed. The thread revival limit does not apply here.



Reply
Thread Tools
  #1  
Unread April 12th, 2010, 04:02 PM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006

Brief Intro


Almost all 3rd generation games have a glitch which will result in extremely low IVs for all roaming legendaries: Latios in Ruby, Latias in Sapphire and Entei/Raikou/Suicune in FR/LG. If you paid attention, I said almost all games; that's because the glitch got indeed fixed in Emerald.

Description


The glitched IVs are the result of a buggy code: only 8 out of 30 bits will be saved into the wild data upon meeting the Pokémon. This means only the HP IV will be stored correctly along with the first 3 bits of the Attack IV. Everything else will be set to 0.

While the IVs are stored the wrong way, the IVs are still stored correctly into a special, reserved RAM area. So, with a bit of effort and patience, one could theoretically recover the proper IVs and manually fix his/her roaming Pokémon.

I'm not even going to post the original routine because it's pretty long and... useless, anyway. I'll just show you the fixed one directly (using FR US v1.0 as example):

Code:
08040a92 6821 ldr r1, [r4, #0x0] 08040a94 6069 str r1, [r5, #0x4] 08040a96 e020 b $08040ada
Using a hex editor, simply replace 21 78 1F 24 0A 1C with 21 68 69 60 20 E0. The offsets are below.

The Offsets


  • FireRed/LeafGreen US v1.0

    Code:
    0x40A92
  • Ruby/Sapphire US v1.0

    Code:
    0x3D89A

This research document is Copyright © 2010 by HackMew.
You are not allowed to copy, modify or distribute it without permission.
__________________

Last edited by HackMew; October 23rd, 2010 at 08:49 AM.
Reply With Quote
  This is the last staff post in this thread.   #2  
Unread April 12th, 2010, 05:04 PM
giradialkia's Avatar
giradialkia
 
Join Date: Apr 2009
Location: Ireland
Age: 19
Gender: Male
Nature: Timid
Send a message via Windows Live Messenger to giradialkia
Although it's a bit random, that's an impressive find- good job, HackMew
__________________
Currently, I'm on a Demoted Leave of Absence, which means
for a little while,I am not the Emulation moderator.
This means I won't be able to see threads you submit, and.. well, do other things that a moderator can do.
I can, however, direct you to someone who can help, so feel free to message me in that regard.

Reply With Quote
  #3  
Unread April 12th, 2010, 05:24 PM
HackMew's Avatar
HackMew
Mewtwo Strikes Back
 
Join Date: Jun 2006
Quote:
Originally Posted by giradialkia View Post
Although it's a bit random, that's an impressive find- good job, HackMew :)
Well, thanks but I wasn't the first to discover the glitch. However, I was the first to find a fix, apparently :)
__________________
Reply With Quote
  #4  
Unread April 13th, 2010, 12:17 PM
Tropical Sunlight's Avatar
Tropical Sunlight
Stromboldt
 
Join Date: Mar 2008
Location: Slovenia
Age: 17
Gender: Male
Send a message via Windows Live Messenger to Tropical Sunlight
It's epic.

EDIT: Ah I'm so dumb! :D
__________________
Sometimes I feel like I want my own dimension.

Last edited by Tropical Sunlight; April 13th, 2010 at 12:24 PM.
Reply With Quote
  #5  
Unread April 13th, 2010, 12:20 PM
Manipulation's Avatar
Manipulation
it's a mad world
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 18
Gender: Male
Um, what? IV = Individual Value. :<
__________________
Pokémon Sienna: Experience the thrill again
"i'm a man of simple tastes; no whiskey or caviar"





Last edited by Manipulation; April 13th, 2010 at 03:15 PM.
Reply With Quote
  #6  
Unread April 13th, 2010, 12:22 PM
tinix's Avatar
tinix
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 16
Gender: Male
Quote:
Originally Posted by Tropical Sunlight View Post
IV in Roman numbers would mean 4, when the glitch fix you posted in for Generation 3...

It's still epic.
He doesnt meant IV as generation 4 but as Individual Values or IV's
__________________
Pokémon games i own:
Pokémon Diamond
Pokémon Platinum
Pokémon Ranger: Shadows of Almia
Pokémon HeartGold Version

75% of Pokemon gamers use cheats and specially made codes to make their pokemon battle-worthy. If you are one of the 25% percent that level their Pokemon up legally, put this in your signature.
-Started by SkittyLover77


Reply With Quote
  #7  
Unread January 10th, 2013, 06:02 AM
Salamencite
Unhatched Egg
 
Join Date: Nov 2012
Gender: Male
Could you make a video/walkthrough demonstrating how to do this? Your tech level is far superior to mine...
Reply With Quote
  #8  
Unread January 10th, 2013, 10:29 PM
shiny quagsire's Avatar
shiny quagsire
I'm pixular!
 
Join Date: May 2009
Location: In a House, duh!
Age: 15
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Salamencite View Post
Could you make a video/walkthrough demonstrating how to do this? Your tech level is far superior to mine...
I swear, if people would just read it through a few times instead of giving up after not reading the whole thing, you'd find your answers:

Quote:
Using a hex editor, simply replace 21 78 1F 24 0A 1C with 21 68 69 60 20 E0. The offsets are below.
...
Quote:
  • FireRed/LeafGreen US v1.0

    Code:
    0x40A92
  • Ruby/Sapphire US v1.0

    Code:
    0x3D89A
__________________



Reply With Quote
  #9  
Unread January 27th, 2013, 10:27 PM
Jim Boob's Avatar
Jim Boob
Freelance Mapper
 
Join Date: Jan 2013
Gender: Male
Send a message via Skype™ to Jim Boob
This is a nice find, good job!
__________________
Happy to help mapping & scripting.
My Maps -
Deviant art
Reply With Quote
Reply
Quick Reply

Sponsored Links


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC. The time now is 12:15 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.