Remove header

Go down

Remove header Empty Remove header

Post by Conn Mon 2 Apr 2018 - 7:53

Most MSU-1 hacks are for non-header roms. Here's a short tutorial what a header is and how to remove it.

Usually if your rom has a smc extension it has a header and sfc extension has none. This however isn't always the case. To verify open your rom in a hex editor like HxD:
https://www.smwcentral.net/?p=section&a=details&id=4625

If your rom has a header, you notice it that the first $200 bytes are almost completely zero:s:

Remove header Image217
Example of a header (marked in blue)

To get rid of it, download the following tool (snes rom utility):
https://www.romhacking.net/utilities/593/

Start it, open the rom
if the rom has a header click on the right side below tasks -> remove header, ok
the program automatically creates "romname_noheader.smc"
Now you simply need to patch this rom with the msu patch and rename it.
Conn
Conn

Remove header Image212

Since : 2013-06-30

Back to top Go down

Remove header Empty Re: Remove header

Post by alcesmire Tue 10 Apr 2018 - 15:54

For *NIX users, you don't need any tools not available already.

Hexdump

Hexdumping the beginning could be done with xxd or hexdump which is available by default on most systems, e.g.
Code:
xxd -l 1024 rom.smc

Strip header

Stripping the first 512 bytes is as easy as
Code:
dd bs=1 skip=512 if=rom.smc of=rom_noheader.smc
or
Code:
tail -c +513 rom.smc > rom_noheader.smc

Add header

To add a header of zeroes to the file you could do something like
Code:
cat <(dd if=/dev/zero bs=1 count=512) rom_noheader.smc > rom.smc
or if your shell doesn't support that kind of in place file descriptors
Code:
dd if=/dev/zero bs=1 count=512 | cat - rom_noheader.smc > rom.smc

Misc

If you for some reason would need it you could also had backed up the existing header, say with
Code:
dd if=rom.smc bs=1 count=512 of=header.bak
and added it back later with
Code:
cat header.bak rom_noheader.smc > rom.smc

Gotta love good old command line tools.

alcesmire
Newcomer

Since : 2018-04-10

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum