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.

Emulation & ROM Hacking

Making a GameShark code that permanently unlocks Mobile Stadium/Center... - Page 1

Making a GameShark code that permanently unlocks Mobile Stadium/Center...

Posted by: Darth Nightmaricus
Date: 2014-12-31 16:54:22
I've been looking for a GameShark code that permanently unlocks the Mobile Stadium and Mobile Center options (and if possible, the second floor of the PokeCom Center and the music changed to that of the PokeCom Center) on the main menu in the American Crystal, as it's impossible to save with the two codes activated - opening the menu causes the game to reset and then display the "not on a Game Boy Color" screen. Is there a GameShark code that can PERMANENTLY unlock these two options on the main menu? If so, what is it?

Re: Making a GameShark code that permanently unlocks Mobile Stadium/Center...

Posted by: Torchickens
Date: 2014-12-31 17:49:20
Good question. I will look into it. Changing the music would be a cool thing to do. What code did you use, is it 010576CF? I can't check what that does at the moment, sadly but I might be able to later.

Re: Making a GameShark code that permanently unlocks Mobile Stadium/Center...

Posted by: pokechu22
Date: 2015-01-02 15:09:52

Good question. I will look into it. Changing the music would be a cool thing to do. What code did you use, is it 010576CF? I can't check what that does at the moment, sadly but I might be able to later.


That is certainly the correct code (though I would advise using [tt]910576CF[/tt] instead, as it seems crystal needs that).  It's also the code causing the crashing - that code alone causes the crash without a music code.




I had an alternate idea: Rather than gameshark, patch the rom with a GameGenie code.  Since it seems like it is unavoidable to skip the pause menu using that address, I can instead modify where it gets the menu info from. 

According to the crystal disassembly, the function that does this is located at 1ea6.  (I still don't know gbz80, but I could find that with a search for the address CF76).  Opening up that address with VBA and I see 1EC3 represents the specific instruction I want - [tt]LD A,(CF76h)[/tt] (represented by hex [tt]FA76CF[/tt]).  Changing this to [tt]LD A,(004Ah)[/tt] gives me the required effect - that location is, at least in my rom, a constant value of 0x05.  This would be done with the following gamegenie codes, which change bytes [tt]$1EC4[/tt] from [tt]76[/tt] to [tt]4A[/tt] and [tt]$1EC5[/tt] from [tt]CF[/tt] to [tt]00[/tt]:



4AE-C4E
00E-C5E


These work, but it seems silly to do it like this.  So instead, let's do it more directly.  We'll change [tt]LD A,(CF76h)[/tt] to [tt]LD A,05h[/tt] [tt]NOP[/tt].  That, in hex, is 3E05 00.  Thus, the following three codes:


3EE-C3E
05E-C4E
00E-C5E


Code 1 changes [tt]$1EC3[/tt] from [tt]FA[/tt] to [tt]3E[/tt].  Code 2 changes [tt]$1EC4[/tt] from [tt]7C[/tt] to [tt]05[/tt] (if you wish to supply a different value, you'd modify this code).  Code 3 changes [tt]$1EC5[/tt] from [tt]CF[/tt] to [tt]00[/tt].

Note that these codes don't have the third set of digits used to validate banks.  This is unneeded since it's in the nonchanging part of the rom, but it might be incompatible with old versions of the gamegenie.

So here's the final set of GameGenie codes that can do this:



3EE-C3E
05E-C4E
00E-C5E


EDIT: On further testing, these codes don't stop the crashing.  I thought that they worked, but I guess they don't.

Re: Making a GameShark code that permanently unlocks Mobile Stadium/Center...

Posted by: Darth Nightmaricus
Date: 2015-01-03 13:31:37
But those codes STILL cause it to crash and then display the Game Boy Color message every time I open the start menu. I need to be able to save to keep the effects ON, but it crashes with the code on.