# 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 &amp; ROM Hacking

### Big problem with hacking a stock Gold ROM - Page 1

Previous Page

- 1

Next Page

#### Big problem with hacking a stock Gold ROM

Posted by: theparanoiabug97
Date: 2015-06-18 14:03:04
I've started building a Pokemon hack based on GSC today, and at first, everything was running pretty smoothly. I made a new starting town, new wild encounters on route 29, and changed the starters (to Phanpy, Smoochum and Houndour), with G2Map and StartEd. The next thing on my list was to change the text while you're picking your starter to say SMOOCHUM, PHANPY and HOUNDOUR rather than CYNDAQUIL, TOTODILE and CHIKORITA. Since this particular bit of text doesn't show up in the PokeText banks (at least, not that I could find), I downloaded Translhextion and replaced the individual bytes of data. However, when I tried to start the game again, after the "New Game" screen, I got the message in the screenshot. I should note that I made the file 100 or so bytes smaller by changing the names and removing the "the fire/water/grass Pokemon" text for each starter. Now the game is broken, and ever G2Map shows an error. I also tried it with GEST, and no luck. Please tell me why this happened, and how to fix it.
EDIT: I returned the file to its original size by adding some empty 00 bytes with Translhextion. Still no luck.

#### Re: Big problem with hacking a stock Gold ROM

Posted by: GARYM9
Date: 2015-06-19 20:38:44
When you start deleting bytes in the middle of the ROM, you are changing the location of each and every subsequent byte causing fixed pointers to point to different data and subroutines because the data has been shifted left. This can cause data such as mappings, sprites, music, etc. to be misinterpreted as operation codes for the z80 to handle and when this happens, invalid machine codes (such as f4) and other oddities can occur causing crashes amongst other things.
The tools you used change certain areas of the ROM via hex editing without deleting/making the ROM smaller/larger and does so in an efficient manner as those tools were created with high trial and error.
As for fixing it, you will need to copy and paste the old code into the code you have changed.

#### Re: Big problem with hacking a stock Gold ROM

Posted by: theparanoiabug97
Date: 2015-06-20 07:54:56
Thanks for the suggestion. I'll try that and report back.
That being said, how could I recreate what I did without shifting the existent data around?

#### Re: Big problem with hacking a stock Gold ROM

Posted by: pikalax
Date: 2015-06-25 12:22:28
if you don't want to mess with pointers in any bank, you have to change the script so that it's no longer than the original, and then pad the end of the script to make it the same length as the original.
Previous Page

- 1

Next Page