Glitch City Laboratories Archives

Glitch City Laboratories closed on 1 September 2020 (announcement). This is an archived copy of a thread from Glitch City Laboratories Forums.

You can join Glitch City Research Institute to ask questions or discuss current developments.

You may also download the archive of this forum in .tar.gz, .sql.gz, or .sqlite.gz formats.

Video Games Discussion

Something I had discovered a while back about the Gameshark. - Page 1

Something I had discovered a while back about the Gameshark.

Posted by: xtreme713ify
Date: 2014-04-19 18:11:29
One time, I went to gamestop and saw a gameshark for my GBA. I bought, realizing I could MAYBE use it for Pokemon FireRed. So, being 8-years-old, upon starting the Gameshark, I accidently activated the Japanese codes (Pokemon FireRed 1.0), which causes some weird things. The music was either distorted, a pitch lower or both. eventually, the music would just downright halt and play static.

I should ESPECIALLY note that the already creepy Lavender Town turns into a demon orchestra. it literally sounds like demons are singing.

If anyone can tell me the trigger of this, tell me.

Re: Something I had discovered a while back about the Gameshark.

Posted by: Torchickens
Date: 2014-04-19 18:52:36
Entering codes for the wrong region can cause weird results, due to the possibility of the other game using different memory addresses, or it could be down to the programming being updated, like I think one of the Game Boy Advance Pokémon games, maybe Emerald doesn't use 'real' values for its item quantities (or was it item identifiers? I'm sorry, I'll have to check tomorrow).

I don't know the exact reasons the memory addresses change, but for the Game Boy games, which use an entirely different assembly code you could have instructions like EA (YY XX) or "ld (YYXX), a" to put the value of a register into a memory address, in this case 'a', hence an old instruction might no longer work if the memory address was later changed. When a game uses a different memory address, it might be due to the code being shifted about in the ROM but that's just my guess, I don't know if it's true.

Re: Something I had discovered a while back about the Gameshark.

Posted by: xtreme713ify
Date: 2014-04-20 12:32:16
So, in short, the games coding is different in each region? And altering the coding using one region's codes on another will result in different effects? Sorry, I'm still trying to learn computer science.

Re: Something I had discovered a while back about the Gameshark.

Posted by: Torchickens
Date: 2014-04-20 12:41:04

So, in short, the games coding is different in each region? And altering the coding using one region's codes on another will result in different effects? Sorry, I'm still trying to learn computer science.


Yes. Not all games have different memory addresses, though. There are many codes for Japanese Red/Green that also work on Japanese Blue and Japanese Yellow. But between English Red/Blue and English Red/Green, this is mainly not the case, except for addresses like the one that lets you walk through walls when it's 01 (CD38, the WTW GameShark code is 010138CD). Most of the Pokémon Yellow addresses are -1 from Red/Blue's addresses (e.g. to change item 1's identifier in Yellow you do 01xx1DD3 instead of 01xx1ED3).

Re: Something I had discovered a while back about the Gameshark.

Posted by: pokechu22
Date: 2014-04-20 13:05:21


So, in short, the games coding is different in each region? And altering the coding using one region's codes on another will result in different effects? Sorry, I'm still trying to learn computer science.


Yes. Not all games have different memory addresses, though. There are many codes for Japanese Red/Green that also work on Japanese Blue and Japanese Yellow. But between English Red/Blue and English Red/Green, this is mainly not the case, except for addresses like the one that lets you walk through walls when it's 01 (CD38, the WTW GameShark code is 010138CD). Most of the Pokémon Yellow addresses are -1 from Red/Blue's addresses (e.g. to change item 1's identifier in Yellow you do 01xx1DD3 instead of 01xx1ED3).


Just to also be helpful: GS codes are little endian: To set address CDEF to XX, you do 01XXEFCD.  The 01 at the start does something, but I'm not sure what.  The only case I know of where it is changed is crystal, where you use 92 (?). 





So, in short, the games coding is different in each region? And altering the coding using one region's codes on another will result in different effects? Sorry, I'm still trying to learn computer science.


It varies slightly due to changes in the game.  The coding might not change too much, but it will change slightly (fixes and such).  This can result in the locations in the RAM being shifted slightly. 

Re: Something I had discovered a while back about the Gameshark.

Posted by: Zowayix
Date: 2014-04-21 01:46:08

The 01 at the start does something, but I'm not sure what.  The only case I know of where it is changed is crystal, where you use 92 (?).   

The two digits at the start are the RAM bank, based on my limited understanding of No$GB's documentation. As for why it's 92 for Pokemon Crystal but not any other game (that I know of), I'm not sure either. I just looked through some other GBC exclusive games, and Mario Golf interestingly uses 91 for some codes and 01 for others. Mario Tennis seems to use 91 exclusively. Harry Potter and the Philosopher's Stone uses 96 mostly, and some codes are 95 and 91. Keitai Denjuu Telefang can run on old Gameboys just fine, though it uses 91 for a few codes.