’Cause all games were better on the GBC

You are not logged in.

#1 2012-03-26 23:43:57

Registered: 2010-10-16
Post 55/203

My Hacking Tutorial

I'm working on a youtube series to show people how to ROM Hack just like me.  I'm trying to start from the very beginning and be very specific, because I understand this can be confusing.  I wrote out the first script, please tell me what you think.

Hello this is Adam and welcome to how to hack.  This series will show you how I ROM hack.  I have to warn you, this isn't your run of the mill ROM hacking tutorial where some guy just tells you where to download a bunch of programs and you can be on your way.  What I do is what I consider real ROM hacking.  So pen and paper ready, you will need to pay close attention if you want to understand this stuff.  I know it can be rough at first, and it's not for everyone.  But I'll start with the basics.  ROM hacking takes a lot of patience, so this tutorial will only introduce you to the concept of hexidecimal as well as basic editing and work you up from there.

For this lesson, you will need a hex editor.  I prefer hex workshop, but there's other ones out there like transhextion.  Do not use hexecute, it erased my ROM a few times when it glitched up.  Which reminds me, ALWAYS back up your ROM. I recommend dedicating a google code page for your ROM as well as tortoise SVN to commit changes to it and revert it to older versions in case you make a mistake and believe me, you WILL make mistakes.  It's all part of the process.  I will go over that later so for now just copy/paste the rom. You will also need a Pokemon Red ROM.  The one I use has (U) at the end which indicates that it is for the united states.  Use google to find both of those.  Once you have both of those ready, we can get started.

Ok, load up your hex editor, then use it to open up the ROM.  You'll notice a lot of numbers, and a few letters.  This is hexadecimal, a positional numeral system much like everyday decimal.  We use decimal which means we use ten symbols to make numbers which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 which is base 10.  Once you reach the end, you get to 10 which uses two numbers because you reached the end of the list.  Hexadecimal adds on six new symbols, A, B, C, D, E and F since we are using base 16 now.  The numbers zero to nine are the same in both decimal and hexadecimal, but since we have some extra symbols in hexadecimal, we use A instead of 10.  We keep going until we reach the number after F, which is 10 in hexadecimal and 16 in decimal.  There are a lot of calculators out there that can convert from decimal to hexadecimal, such as the windows calculator when in scientific mode. 

Each pair of symbols identify a byte and use implied zeroes.  Bytes are used for absolutely everything software related.  They are usually identified in binary, which is base 2 and uses 8 symbols.  All of them can only be zero or one since this is base 2.  Each symbol is called a bit, and each byte uses eight of these bits.  When it reaches it's max value it will be 255.  Bytes can be combined to make bigger numbers for the game to identify, but we'll get into that later.  Almost every byte in the ROM is beneficial for the game.  Changing these will create changesinside the game.

Now let's actually analyze some of this data.  Where I'm at now, which is address in hexadecimal 134, is the ROM header. What the header does is provide the basic features.  This header format is used for every gameboy and gameboy color game, and other ROMs use their own versions of headers.  For now we'll stick with Gameboy. 

At 134 you can see in the text panel, POKEMON RED which uses ASCII and not the byte format in the game.  This is obviously the internal name of the game.  For Pokemon Brown, I changed it to Brown.  This allows 16 characters, or 10 in hexadecimal to put your name.  A unique feature for the last byte at 143.  If that is 80, that tells the gameboy that it is a gameboy color rom and to consider color gameboy features.  Of course you can't just turn it on and expect it to be in color, you still have to code that yourself.

Next two bytes starting at 144 indicate the new license which uses a number represented by ASCII.  This indicates the company that made or published the game.  Pokemon Red was published by nintendo, and nintendo uses 01.  This is usually used for newer games, older games use the entry at 014B, which actually uses a hexadecimal identifier rather than 2 ascii numbers.  If the old license code has a value of 33 that means to refer to the new license.  Otherwise, read from this area for the license.  "


#2 2012-03-27 00:33:33

Registered: 2012-02-20
Post 37/76

Re: My Hacking Tutorial

It's not confusing at all.. But I cannot say anything else because, for a start, it's an introduction, isn't it? Explaining dos and donts in using a certain hex editor, explaining hexadecimal, wait.. err, yes it is GOOD. :)



#3 2012-03-27 05:38:01

From: Prague, Czech Republic
Registered: 2011-07-18
Post 6/32

Re: My Hacking Tutorial

Some complaints:
* You're too specific in my opinion with tortoise SVN, try simply recommending "version control software like SVN, Git or Mercurial".  People might have heard those terms before.
* Use "digits" or "numerals" instead of "symbols".
* Rephrase: "When it reaches it's max value it will be 255." → "The maximum value a byte can hold is 255, that is, 256 unique values counting zero, which is 2 to the power of 8." (or something similar)
* "Almost every byte in the ROM is beneficial for the game." I don't quite like beneficial, maybe simply say "has a meaning"?  Not a huge problem.
* "…which uses ASCII and not the byte format in the game." I'm not sure what you want people to think of byte format, but ASCII in my eyes very much is one.  Maybe you should simply say the numbers/bytes represent letters in this case.

By the way, how are you planning to pronounce "10 in hexadecimal"?  "ten" or "one zero"?  I really feel like the second one would be better, but I'm not really used to it either..

Good job, anyway!  Sorry for complaining so much.


#4 2012-03-27 11:47:41

Registered: 2012-03-25
Post 5/82

Re: My Hacking Tutorial

Sanky,what an interesting place to meet ya!nice info


#5 2012-03-27 12:14:29

Registered: 2012-01-13
Post 65/99

Re: My Hacking Tutorial

Sounds great. Will the tutorials just be for Pokemon Red or will you hack Pokemon Gold too? Ether way, I can't wait for you to start.

The Storm is here!
Gotta hack them all, Gotta hack them all, Pokemon.


#6 2012-04-13 23:50:08

Registered: 2012-04-12
Post 14/20

Re: My Hacking Tutorial

Yup, this looks good, especially with a video to help beginners along the way. I'll just give short explenation of what each acronymn means (eg. SVN). Otherwise commentors may start acting like they don't even know google exists! :P


#7 2013-04-17 19:21:44

From: The Netherlands
Registered: 2013-03-29
Post 86/1,190

Re: My Hacking Tutorial

Is it possible, if you place 80 at offset 143 in a Pokémon Red/Blue ROM, to make the ROM also load the SGB palettes for the CGB?

Hacks Gameboy 8-bit music in Pokémon Gen I & II, composes 8-bit music in FamiTracker


Board footer

Powered by FluxBB