Go Back   The PokéCommunity Forums > ROM Hacking > Research & Development
Reload this Page Development I'm Fixin' It: The Roaming Legendaries IV Glitch

Notices
For all updates, view the main page.

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!
Research & Development programs in this forum are subject to moderator approval before they are displayed.



Reply
 
Thread Tools
  #1    
Old April 12th, 2010 (08:02 AM). Edited October 23rd, 2010 by HackMew.
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314

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.
__________________
Reply With Quote
  #2    
Old April 12th, 2010 (09:04 AM).
giradialkia's Avatar
giradialkia giradialkia is offline
Crystal Tier
 
Join Date: Apr 2009
Location: Ireland
Age: 21
Gender: Male
Nature: Timid
Posts: 1,563
Although it's a bit random, that's an impressive find- good job, HackMew
__________________

This one's called 'Blue', and it's very Pokémon themed, so have a listen! Check out the links below for more stuff, if you like this!



This is the Doctor
This is my Soundcloud
This is my bandcamp

My Pokémon Y character is the same as my username. If you see me as a Passerby let me know! I tend to get a lot of Passerby requests and I often wonder if it's people from this site.
Reply With Quote
  #3    
Old April 12th, 2010 (09:24 AM).
HackMew's Avatar
HackMew HackMew is offline
Mewtwo Strikes Back
Crystal Tier
 
Join Date: Jun 2006
Posts: 1,314
Quote originally posted by giradialkia:
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    
Old April 13th, 2010 (04:17 AM). Edited April 13th, 2010 by Tropical Sunlight.
Tropical Sunlight's Avatar
Tropical Sunlight Tropical Sunlight is offline
The Faltine
 
Join Date: Mar 2008
Location: Slovenia
Age: 19
Gender: Male
Posts: 3,578
Send a message via Windows Live Messenger to Tropical Sunlight
It's epic.

EDIT: Ah I'm so dumb! :D
__________________
Reply With Quote
  #5    
Old April 13th, 2010 (04:20 AM). Edited April 13th, 2010 by hashtag.
hashtag's Avatar
hashtag hashtag is offline
the man in black
Crystal Tier
 
Join Date: Nov 2008
Location: Salisbury, England
Age: 20
Gender: Male
Posts: 6,677
Um, what? IV = Individual Value. :<
__________________
#
Reply With Quote
  #6    
Old April 13th, 2010 (04:22 AM).
tinix's Avatar
tinix tinix is offline
PearlShipper & C Programmer
 
Join Date: Feb 2010
Location: Bratislava, Slovakia
Age: 18
Gender: Male
Posts: 86
Quote originally posted by Tropical Sunlight:
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
Reply With Quote
  #7    
Old January 9th, 2013 (10:02 PM).
Salamencite Salamencite is offline
 
Join Date: Nov 2012
Gender: Male
Posts: 1
Could you make a video/walkthrough demonstrating how to do this? Your tech level is far superior to mine...
Reply With Quote
  #8    
Old January 10th, 2013 (02:29 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
Double Agent for Team Johto
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 691
Quote originally posted by Salamencite:
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    
Old January 27th, 2013 (02:27 PM).
Jim Boob's Avatar
Jim Boob Jim Boob is offline
Freelance Mapper
 
Join Date: Jan 2013
Gender: Male
Posts: 30
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
  #10    
Old 4 Weeks Ago (09:39 PM).
S-MAN's Avatar
S-MAN S-MAN is offline
 
Join Date: Jul 2015
Gender: Male
Nature: Rash
Posts: 26
Hello everyone I just want to have a small discussion on this topic pertaining to R/S/FR/LG.
This affects the roaming Pokemon of these games having most of their stats having 0 IVs sparring only HP stats and a dwarf-sized attack stat.
From my understanding, the IVs are predetermined so-to-speak from the beginning of the game; correct me if I am wrong.

What I want to know is after the fact of your roaming Pokemon already being caught, is the data pertaining to its correct IVs that have not been copied over correctly when you encounter/capture it, still accessible?

Reason being, it may sound like an oxymoron on trying to be legitimate yet seeking justice in their own hands, I think it would be a great idea to create a tool that utilized the player's game and correct the Pokemon that has already been caught to match what rightfully belongs to them.

Here is a thread from a few years ago that has touched base on the idea but it hasn't seen enough light to the extent of its usefulness:
Development: I'm Fixin' It: The Roaming Legendaries IV Glitch

Perhaps someone or a group of you would be interested in taking up this idea and making it really happen? Would other people find this useful?

The simplest fix I can imagine is based on the version, country, color and roaming Pokemon of the game that you possess, the tool would look up the correct area where the data is stored and translate it to reveal the stats as clear as day to the user. This wouldn't even require you having to fix the stats yourself. A player could be left with the rest of the work via hex-editor or some other gibberish. This tool would really help those who already caught their roaming Pokemon who wants them to be normal.

If you wanna get fancy, you can have the tool follow specific rules where it would look up and fix the roaming Pokemon directly. But just being able to see the stats needed is good enough. Thoughts? Any objections? Could I be wrong about that information still being available after the Pokemon is caught and determined to be poop? The funny scenario would be to find out your weak roaming Pokemon was actually supposed to be that way. Bwahaha..

Which of your Pokemon are you wanting to fix?
I wonder if Nintendo only allows the weak and mistreated roaming Pokemon from R/S/FR/LG to be transferred to the Pokemon Bank? Food for thought..
I appreciate anybody taking the time for not just reading but LOOKING at all this.
Reply With Quote
  #11    
Old 4 Weeks Ago (10:33 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is online now
Moderator, CS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,818
Quote originally posted by S-MAN:
Hello everyone I just want to have a small discussion on this topic pertaining to R/S/FR/LG.
This affects the roaming Pokemon of these games having most of their stats having 0 IVs sparring only HP stats and a dwarf-sized attack stat.
From my understanding, the IVs are predetermined so-to-speak from the beginning of the game; correct me if I am wrong.

What I want to know is after the fact of your roaming Pokemon already being caught, is the data pertaining to its correct IVs that have not been copied over correctly when you encounter/capture it, still accessible?

Reason being, it may sound like an oxymoron on trying to be legitimate yet seeking justice in their own hands, I think it would be a great idea to create a tool that utilized the player's game and correct the Pokemon that has already been caught to match what rightfully belongs to them.

Here is a thread from a few years ago that has touched base on the idea but it hasn't seen enough light to the extent of its usefulness:
Development: I'm Fixin' It: The Roaming Legendaries IV Glitch

Perhaps someone or a group of you would be interested in taking up this idea and making it really happen? Would other people find this useful?

The simplest fix I can imagine is based on the version, country, color and roaming Pokemon of the game that you possess, the tool would look up the correct area where the data is stored and translate it to reveal the stats as clear as day to the user. This wouldn't even require you having to fix the stats yourself. A player could be left with the rest of the work via hex-editor or some other gibberish. This tool would really help those who already caught their roaming Pokemon who wants them to be normal.

If you wanna get fancy, you can have the tool follow specific rules where it would look up and fix the roaming Pokemon directly. But just being able to see the stats needed is good enough. Thoughts? Any objections? Could I be wrong about that information still being available after the Pokemon is caught and determined to be poop? The funny scenario would be to find out your weak roaming Pokemon was actually supposed to be that way. Bwahaha..

Which of your Pokemon are you wanting to fix?
I wonder if Nintendo only allows the weak and mistreated roaming Pokemon from R/S/FR/LG to be transferred to the Pokemon Bank? Food for thought..
I appreciate anybody taking the time for not just reading but LOOKING at all this.
I've gone ahead and merged your post with this thread as it directly relates to the content of this thread, and the thread revival rule does not apply in Research & Development, so an entire new thread isn't necessary, and future people looking for similar information won't have to find multiple threads.
__________________
Reply With Quote
  #12    
Old 4 Weeks Ago (03:27 PM).
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Posts: 512
Quote originally posted by S-MAN:
Spoiler:
Hello everyone I just want to have a small discussion on this topic pertaining to R/S/FR/LG.
This affects the roaming Pokemon of these games having most of their stats having 0 IVs sparring only HP stats and a dwarf-sized attack stat.
From my understanding, the IVs are predetermined so-to-speak from the beginning of the game; correct me if I am wrong.

What I want to know is after the fact of your roaming Pokemon already being caught, is the data pertaining to its correct IVs that have not been copied over correctly when you encounter/capture it, still accessible?

Reason being, it may sound like an oxymoron on trying to be legitimate yet seeking justice in their own hands, I think it would be a great idea to create a tool that utilized the player's game and correct the Pokemon that has already been caught to match what rightfully belongs to them.

Here is a thread from a few years ago that has touched base on the idea but it hasn't seen enough light to the extent of its usefulness:
Development: I'm Fixin' It: The Roaming Legendaries IV Glitch

Perhaps someone or a group of you would be interested in taking up this idea and making it really happen? Would other people find this useful?

The simplest fix I can imagine is based on the version, country, color and roaming Pokemon of the game that you possess, the tool would look up the correct area where the data is stored and translate it to reveal the stats as clear as day to the user. This wouldn't even require you having to fix the stats yourself. A player could be left with the rest of the work via hex-editor or some other gibberish. This tool would really help those who already caught their roaming Pokemon who wants them to be normal.

If you wanna get fancy, you can have the tool follow specific rules where it would look up and fix the roaming Pokemon directly. But just being able to see the stats needed is good enough. Thoughts? Any objections? Could I be wrong about that information still being available after the Pokemon is caught and determined to be poop? The funny scenario would be to find out your weak roaming Pokemon was actually supposed to be that way. Bwahaha..

Which of your Pokemon are you wanting to fix?
I wonder if Nintendo only allows the weak and mistreated roaming Pokemon from R/S/FR/LG to be transferred to the Pokemon Bank? Food for thought..
I appreciate anybody taking the time for not just reading but LOOKING at all this.
Why would one want to do this? The roaming legendaries are all available multiple times in later games (with the Lati twins even being in Emerald with the correct IVs), and if you're looking to transfer them, it'll be obvious that their IVs (at least in the legendary beasts' case, as the other Lati is available on Southern Island with correct IVs in R/S) were tampered with when looking at which game they originated from along with the IVs. It seems like a lot of work for something that is comparatively minor and doesn't really affect anything anymore. You would have a case if it was still Gen 3 and the availability of these Pokemon were limited, but not really anymore.
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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 -8. The time now is 04:27 AM.