WTF?! - A Newbie's Guide


 So you've decided to hack EarthBound.  I commend you!  It's quite a monumental effort if you do it thoroughly.  That's why this Help File is here.  Every single person who has ever decided to hack EarthBound has come up against certain obstacles to their progress - some have overcome them, others (sadly, the vast majority) simply give up and turn back.  I am one of the few who overcame the obstacles - not all of them, mind you, and I stubbed my toe quite a few times.  But I want to grant you the opportunity to learn what I learned, to enjoy the happiness that came from watching a little video game world unfold as I saw fit, and maybe even screw with your sleep cycles a bit.

 This Help File is intended to be not only a reference guide to hacking EarthBound, but a guide, to help you take your first clumsy steps into the field.  It's said you've got to walk before you can run, so here is a little bit of explanation about some basic concepts and and things that get people confused.  Experienced readers, you can skip on to the later sections (then again, why would you be reading the newbie's guide? :| ).

About ROMS and Hacking in general


ROM?  What the hell's a ROM?
 Simply put, a ROM is a digital copy of a computer chip.  There are ROMS for all sorts of things, console games, computer systems, and the like.  What we're dealing with, though, is the SNES.  So I'm assuming you've found a copy of the EarthBound ROM somewhere out there in cyberspace already.  I can't tell you where one is.  Not because "If I told you I'd have to kill you," but "If I told you, Nintendo would kill us both."
 Most gaming corporations don't look kindly on ROMs, seeing it as free distribution of something that they worked to create - kind of like taking a book, reproducing it, and selling it without the author's permission.  This is more or less a fallacy for three reasons:

1) The hardware is breaking down on these systems and games, and sooner or later there will be no more reason for Nintendo to have a copyright at all - their hard work they're so worried about protecting will be gone forever.
2) Nobody sells ROMs.  Even if anybody did, nobody would be dumb enough to buy one.  Thus, no one is making a profit on the work of the Nintendo corporation.
3) The SNES is no longer in production.  Nintendo themselves are no longer making a profit, and you can find virtually any game you want at a used game store for about $5-$10.  I don't support creating ROMS for game systems that are still being sold by Nintendo, because every Game Boy Advance ROM that is downloaded means one less sold, which means one more worker who gets a pay cut.  But the time of the SNES has passed.

 But, for now, Nintendo still considers ROM trafficking an illegal activity.  If they catch you distributing them, you'll probably just get a letter saying "don't do that or we'll sue."  But the Internet is in a state where it's virtually impossible to stop any particular sort of activity - if you stomp one site, 5 more will sprout up elsewhere.  So just run "EarthBound ROM" through a search engine and see what you find!

So now I've got a ROM, what the hell do I do with it?
 Well, you need to get a couple of things.  First, and most importantly, you need an emulator.  If a SNES ROM is a digital SNES Game Pak, an SNES emulator is a digital SNES Control Deck.  Emulators themselves are not illegal, so go grab one!  I recommend either ZSNES or SNES9X, and both are available at http://www.zophar.net/.
 Second, you need your hacking programs!  Utilities have been made by many people for manipulating the code of all sorts of ROMs.  Some change the text, some manipulate the graphics, some are even specialized for use with specific games - and thus can be very powerful.  What you want is mostly available at the PK Hack website (http://www.starmen.net/pkhack/) but there are other programs you may wish to get, that are again available at http://www.zophar.net/.  Refer to the "Shopping List" below for more information about what programs you need.
 I shouldn't have to tell you this, but you need to keep a separate copy of the original, unchanged EarthBound ROM somewhere on your computer.  You'll need it for creating IPS files, or just as a backup if you really screw things up.

Pointers - Friend and Foe


What is a Pointer anyway?
 Ever read a Choose Your Own Adventure book?  Remember how it said, "If you do this, go to page (whatever)."  That's kind of what a pointer does.  The pointer code is a reference to a specific location in the ROM file.  It's simply the number of bytes of code into the ROM that a specific block of code is.  There are many different uses for pointers, but they all share some basic attributes.  First, they are in hexadecimal form.  That is to say, hexadecimal (or "hex") is a system of numbers also known as Base 16 - it has 16 numbers!  You count it like this:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A...

 Simple, huh?  Well, that's how it works.  To indicate that a number is in hex, you write it like this: 0x12D687 (that's 1234567, for those who are wondering.)  Your Windows calculator can switch back and forth between decimal and hexadecimal notations.  Now, you'll see two different types of pointer addresses in EarthBound; we refer to them simply as Hex, and SNES.  The SNES address format is what EarthBound uses internally (I don't know why it has to use something different, I guess the programmers know something I don't.)  To convert from the actual hex format to the SNES format the game uses, you need to do this:

snes_address = (hex_address + 0xC00000) - 0x200

And to go from the SNES address back to hex, you do this:

hex_address = (snes_address - 0xC00000) + 0x200

 Why do you need to do this?  Well, some programs, like generalized hex editors, will use the hex format when looking for locations in the code, while other programs (the ones specialized for EB) and any internal pointer coding use the SNES format (which, by the way, we would notate as: $D2D487.)

 The last thing to remember is that pointers are written semi-backwards in the game.  If you wanted to make a link to address $C58002, you'd refer to it as 02 80 C5.  Pointer code can be tricky, but once you get the hang of it, it can be a valuable ally to any hacker!
 

IPS?  What the hell?

 A .ips patch file is a way of recording the differences between two files.  How we use this in hacking is we take an IPS generator program, and select with it the unchanged ROM and a changed ROM.  The file generated is then a list of all the changes that need to be made to an unchanged ROM to make it exactly like your changed ROM.  You distribute this patch on the web (DON'T try to distribute your ROM.  It's a waste of time.), and other players will use their IPS program to generate a copy of your changed ROM.  There are a couple of ways to do this.

1) Use a patch program with the apply function.  Just make a new copy of the original EB ROM, and use the patch program's apply function with the IPS patch you want to use and the new copy of the ROM.
2) Some newer emulators have an auto-patch function.  Just put an unchanged ROM and an IPS file in the same folder and play the ROM.  They have to have the same name, so if it's "hint_man.ips" your ROM should be "hint_man.smc." The emulator itself uses the patch file and the original ROM file together (but makes no changes to either.)  This is useful when you have a limited amount of disk space, but I still prefer method 1.

A shopping list.  Trust me, these will help!


 Essentials -
 *ROM File - Find it yourself.  (This will end in a .smc, a .snes, a .fig, or something along these lines (of course, it'll be .zipped up for distribution on the web...)
 *Emulator - I recommend ZSNES or SNES9X.  (www.zophar.net)

 EB Programs - (www.starmen.net/pkhack/)
 *CGPED            - Compressed Graphics Editor, used for creating new enemy images (Advanced)
 *EB Door Editor   - Used for changing the door data.  (shrug)
 *EB Sprite Editor - Edits graphics like character sprites.  (Simple)
 *EB Text Editor   - The name says it all.  (Ow, my brain is bleeding! Advanced)
 *EB Rom Expander  - Increases the size of the ROM for more text space (Monkey butt easy)
 *EB Rom Fixer     - Fixes the header label of a ROM to make it work right.  (Monkey butt easy)
 *PK Hack          - Edits enemies, items, and names of various things. (Average)

 Other Programs - (www.zophar.net)
 *Thingy           - Generalized hex editor for text edits - stick with EBTE for main work though. (Average)
 *Snestool         - Does lots of stuff, but you need it for IPS creation and application.  (Simple)
 *Tile Layer Pro   - Generalized image editor.  A bit better than EBSE in some respects, worse in others. (Average)

Hey, my program won't work!

Check the documentation.  More likely than not, it will include some troubleshooting section.  For a lot of the specialized editors, you should try running the EB Rom Fixer on your ROM to clean up its header - that may be your problem.  Also, you may be missing some .dlls or runtime files that a program needs.  Keep in mind that some newer versions of Windows (2000 and ME in particular) have deep psychological issues with these programs, but from what I've heard they work fine in XP (Well, as fine as anything can run in a Windows environment.  :)  ).  Also, if something won't work, tell us ABOUT it.  Some people like to come and post things like "my porgram wont work fix ti fix it fix it lolololol!~!!~!111" on the PK Hack forum.  Don't do that.  We can't help you if you don't tell us what it is; besides, it's annoying as hell.  We know a lot of people have issues with the EB Sprite Editor, and the CGPED is essentially a beta-stage program, so check ALL documentation you can find for answers.  And while we're on the topic, try to use normal English.  Punctuation, correct capitalization, no stupid abbreviations (yes, it's okay to type for instead of 4!), spaces...  We're not linguistic perfectionists but we like to be able to read things without having to stab ourselves in the eyes.  Or maybe that's just me...
 

Let me introduce you to some of my friends.

    There are a those of us out in the net who know what we're talking about when it comes to EarthBound hacking.  Let me introduce them.

I am Tomato, thy god. Tomato - Tomato is the leader of the EB hacking community, more or less.  One of the webmasters of www.starmen.net, he has created a plethora of hacking programs and decoded a ton of stuff on the game.  Ph33r his l33tness.

Hi there, I'm Spaanoft. Spaanoft - Spaanoft worked with Tomato in the creation of PK Hack.  He's a smart guy - learn from him.

'sup? BlueAntoid - Hi, that's me!  I'm the guy who wrote this.  I also developed the first complete full hack of EarthBound and a text help file.

Hiya. ROFISH - ROFISH here created an Enemy Battle Animation Editor, as well as the PK FAQ help webpage.

Hi, I'm GuyInSummers.  BlueAntoid is my lord and master! GuyInSummers - GIS is a rival of sorts of mine.  He's been working on a few hacks for a while, and he made a Control Code helper program.

Drink C.C. Lemon or die! Freiza - Freiza has helped find many control codes as well as made a Store Editor.  He's easily recognized by his pec-flexing Bob Saget.

The Falc has flown the coop. Falcon24 - Falc, among other things, has documented all of the teleportation codes in the game!

Uh, I don't know what to say. Adereth_2000 - Adereth is probably best known for his upcoming hack, "SaturnBound."

flynman has developed an EarthBound Door Editor, and has been instrumental in discovering a variety information.

There are many other people in the PK Hack universe!  Collect them all!  BTW, if anybody has earned a PK Hack badge and isn't listed here, please tell me!