News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix  (Read 3029 times)

Sam123

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Well, I'm not sure if this goes here...
I've seen in Bulbapedia that Pokemon G/S and C has a glitch that makes pokeballs have glitchy catch rates...
Here what it says:
The status conditions of paralysis, burn, and poison, increase the catch rate by 0 as opposed to by 5 as it was intended.

The Love Ball only gains a catch rate of 8× on Pokémon of the same gender and species as the player's Pokémon, rather than on Pokémon of the opposite gender.

The Moon Ball was intended to multiply the catch rate by 4 on Pokemon that evolve with Moon Stone, but was erroneously programmed to apply this effect on Pokémon that evolve with Burn Heal instead. Subsequently, Moon Ball does not have any additional effect and always acts like a Poké Ball.

The Fast Ball only quadruples the catch rate against the first three of all fleeing Pokémon: Magnemite, Grimer, and Tangela.

Really I would like anyone to do it, I don't know/ haven't enought time to do it myself... Any chance any pokemon fan makes a fix patch??  :angel:

IIMarckus

  • Jr. Member
  • **
  • Posts: 68
  • Something terrible has happened here!
    • View Profile
    • IIMarckus’s homepage
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #1 on: October 17, 2014, 10:13:42 pm »
This has been done before… see here for an example.

Sam123

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #2 on: October 18, 2014, 06:01:51 am »
This has been done before… see here for an example.
There's no download link in that page...  :-\

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6706
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #3 on: October 18, 2014, 01:31:07 pm »
Pretty simple to make with little understanding of Z80 and an opcode table.
http://gamehacking.org/faqs/GameBoy_Z80_Opcode_Map.html

Maybe I'm looking at a different version, as the addresses seem off. I'm looking at the English Gold version.
Looking for certain instructions, check a few around to see if it lines up.

LOVE BALL
Quote
The fix to this bug is simple, we just have to change the ret nz instruction before the three sla b to a ret z instruction that does exactly the opposite.
Looking around that area for three SLA Bs (CB 20) in a row. That looks to be $EDAB. Since the instruction right before is the bad one, that means $EDAA should go from $C0 to $C8.

EVOLVE ITEM
Quote
So we'd just change the cp BURN HEAL to cp MOON STONE, whose constant is 08 (Burn heal's constant is 0A).
Find the CP 0A. (opcode FE 0A)
$ED58: 0A -> 08

For the speed one, checking the opcode chart, the bad code starts with INC HL CP #FF. That's opcodes 23 FE FF. That instruction is at $EDCA.
Reading the further post, it seems the right fix is to change CP C : JR NZ .next to CP C : JR Z. The bad instruction is B9 20 ?? (?? as that is branch length, we don't know unless we count the length of the skipped opcodes). Looking at the hex, it turns out the instruction is B9 20 0A. 0A is the branch length. 0A is at $EDD1.
That means it skips the next 10 bytes after the instruction. Indeed that would put us at the following DEC D (15).
We need to go back. The following instruction is a branch length of 0. We go backwards by starting at FF when pointing to the 0A. The CALL instruction should be easy to find (CD ?? ??). Find the CD and then it's one instruction before : 3E 0F. The 3E is at $EDC5. We need to count from the 0A to the 3E.
Starting the count at FF with the cursor at 0A, we move back and count down. We get to F3 when pointing to the 3E.
Therefore the fix is $EDD1: 0A -> F3.
"My watch says 30 chickens" Google, 2018

Sam123

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #4 on: October 18, 2014, 03:23:02 pm »
Pretty simple to make with little understanding of Z80 and an opcode table.
http://gamehacking.org/faqs/GameBoy_Z80_Opcode_Map.html

Maybe I'm looking at a different version, as the addresses seem off. I'm looking at the English Gold version.
Looking for certain instructions, check a few around to see if it lines up.

LOVE BALLLooking around that area for three SLA Bs (CB 20) in a row. That looks to be $EDAB. Since the instruction right before is the bad one, that means $EDAA should go from $C0 to $C8.

EVOLVE ITEMFind the CP 0A. (opcode FE 0A)
$ED58: 0A -> 08

For the speed one, checking the opcode chart, the bad code starts with INC HL CP #FF. That's opcodes 23 FE FF. That instruction is at $EDCA.
Reading the further post, it seems the right fix is to change CP C : JR NZ .next to CP C : JR Z. The bad instruction is B9 20 ?? (?? as that is branch length, we don't know unless we count the length of the skipped opcodes). Looking at the hex, it turns out the instruction is B9 20 0A. 0A is the branch length. 0A is at $EDD1.
That means it skips the next 10 bytes after the instruction. Indeed that would put us at the following DEC D (15).
We need to go back. The following instruction is a branch length of 0. We go backwards by starting at FF when pointing to the 0A. The CALL instruction should be easy to find (CD ?? ??). Find the CD and then it's one instruction before : 3E 0F. The 3E is at $EDC5. We need to count from the 0A to the 3E.
Starting the count at FF with the cursor at 0A, we move back and count down. We get to F3 when pointing to the 3E.
Therefore the fix is $EDD1: 0A -> F3.
Really, I'm soo bad doing those things...  :(
I said this if someone who hasn´t problems doing it would do it, it was only an idea.

IIMarckus

  • Jr. Member
  • **
  • Posts: 68
  • Something terrible has happened here!
    • View Profile
    • IIMarckus’s homepage
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #5 on: October 20, 2014, 03:25:59 pm »
Maybe I'm looking at a different version, as the addresses seem off. I'm looking at the English Gold version.
The addresses are different because the linked thread is based on Crystal, not Gold.

Sam123

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #6 on: October 22, 2014, 07:41:11 am »
So, anyone interested to do an IPS patch for this?  :'(

IIMarckus

  • Jr. Member
  • **
  • Posts: 68
  • Something terrible has happened here!
    • View Profile
    • IIMarckus’s homepage
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #7 on: October 24, 2014, 02:40:59 am »
patch against crystal

With the disassembly it was as simple as applying this diff.

Sam123

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: (Suggestion) Pokemon Gold, Silver and Crystal catch rate errors fix
« Reply #8 on: October 24, 2014, 04:14:26 pm »
patch against crystal

With the disassembly it was as simple as applying this diff.
Oh, thank you so much!  :D
Is this only compatible with the USA version?