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? :| ).
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.
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!
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.
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)