+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Hex Editor and SNES Rom limits
Pages: [1]
Author Topic: Hex Editor and SNES Rom limits  (Read 426 times)
MoonlightNeophyte
Guest
« on: January 01, 2008, 04:37:16 pm »

Okay, I was wondering if this actually does anything or may actually be useful? Since I'm new to rom hackng and everything I was playing around with the hex editor program and at first noticed that if I left out or even added an extra byte to a rom it wouldn't even show up on the emulator. So then I tried opening a new hex file ad I copied and pasted the older rom file onto saving it as [name].smc and now I can add more bytes (but nothing actually affecting the game since I'm not sure how to yet, just adding some useless characters) but it still works perfectly.  It just takes up more space on my computer 4MB to 8MB after awhile, I don't know why t didn't change automatically though.

See here:

Click

In the Tenchi Muyo rpg I could add some more text but thee text nded up getting bungled up together if  added more than a line.

But anyway was wondering if anyone could add this Music Soundtrack Test Patch (to the Sailor Moon RPG game) without overwriting other parts of the game as a test to see if it works.All the stuff I've been reading says it's impossible to add to a rom , only so I was curious.
« Last Edit: January 02, 2008, 12:01:32 pm by RedComet »
Ryusui
Guest
« Reply #1 on: January 01, 2008, 11:23:47 pm »

It's not impossible to increase the size of a ROM. Just difficult in the vast majority of cases.

Most game consoles can't address the entire ROM at one time, so the ROM is broken up into "banks" which map parts of the ROM to certain addresses. In other words, a game console sees a ROM differently from a hex editor: instead of one contiguous block from beginning to end, it uses the same address to refer to different bytes in different chunks of the ROM. The bank byte determines just which chunk gets looked at.

Expanding a ROM is a simple matter, but getting the game to recognize the extra space is the hard part. For instance, if you expanded a ROM so you have more space to insert a translated script, you wouldn't actually be able to tell the game to look in the extra space unless the pointers also include a bank byte.

On a side note, 32Mb is an ironclad upper limit for SNES games, except for a handful which used special mapper tricks to cheat their way into extra space. Tricks you won't be able to duplicate.
RedComet
Guest
« Reply #2 on: January 02, 2008, 08:44:33 am »

Could you edit your post to link to the picture instead? Thanks. :police:
KingMike
Guest
« Reply #3 on: January 02, 2008, 11:28:32 am »

Quote from: RedComet on January 02, 2008, 08:44:33 am
Could you edit your post to link to the picture instead? Thanks. :police:
Use Quote to see the original post, copy and paste the link. But it's not much to see, just a screen of shot of SNES9X file open window with a 70.48 megbit ROM selected.
While leads to the other problem.  You're probably inserting text in "insert" mode, which moves all data afterwards to the right. Many games (including just about all cartridge-based console ROMs) expect code and data to start at specific addresses. You have to use "overwrite" mode (try pressing the Ins key), which replaces older text. Do not make the new text longer than the original, until you read about pointers.
(most ROM hacking-specific hex editors only support overwrite mode because of the problem explained about).
RedComet
Guest
« Reply #4 on: January 02, 2008, 12:02:27 pm »

Quote from: KingMike on January 02, 2008, 11:28:32 am
Quote from: RedComet on January 02, 2008, 08:44:33 am
Could you edit your post to link to the picture instead? Thanks. :police:
Use Quote to see the original post, copy and paste the link. But it's not much to see, just a screen of shot of SNES9X file open window with a 70.48 megbit ROM selected.

What I meant was link to the image instead of embedding it in the post and breaking the page. Tongue Anyway, I used my mod hammer to fix it.
BigNailCow
Guest
« Reply #5 on: January 03, 2008, 03:40:18 am »

This is sort of off topic, but I'm wondering: how do game editors compensate for the fact that any extra content would need to expand the ROM?  Does it keep a list of all pointers and updates them when you save, or what?  I'm grappling with the same issue, and am about to embark on a big thing like that, so I'd appreciate if there was an easier way.  I'm also considering expanding the ROM to its maximum size and shifting all the banks to sparse sections of the ROM, leaving large gaps for any new "content" areas so that it wouldn't have to be shifted again.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC