Prince of PersiaFile formats
SMC vs SFC: SNES ROM File Extensions and the 512-Byte Copier Header
Two letters in a file name rarely matter, but for Super Nintendo ROM images the real difference is 512 bytes at the start of the file. This page separates the extension from the header.
SMC vs SFC: one console, several file extensions
Super Nintendo cartridge dumps travel as plain files, and the file name usually ends in one of four extensions: .sfc, .smc, .swc or .fig. The SNES development wiki at nesdev.org calls .sfc the most common and .smc the next most common, with .fig and .swc less frequent. People often assume the extension tells them how a file is built. It does not. The extensions are named after copier devices, the hardware that was used in the early 1990s to read cartridges into a computer, and the name carried over to the files whether or not the file kept the layout the device wrote.
That is the heart of the SMC vs SFC question. By convention, .sfc is the name used for a file without a copier header, and the letters stand for Super Famicom, the Japanese name of the console. The suffix .smc is associated with the Super Magicom copier. In practice the convention is loose: the same wiki notes that the presence of a header is not correlated with the file name suffix, so a .smc file may be headerless and an .sfc file may be headered. The extensions .swc and .fig likewise come from the Super Wild Card and its kin, and the same caution applies.
What the copier header is
A copier header is a block of 512 bytes placed at the beginning of a ROM image. The nesdev wiki describes it as metadata added by the copier device that dumped the cartridge. It is separate from the ROM header, which belongs to the game, and it is of little use outside the copier it was made for. A headered file and a headerless file are otherwise identical: the game data follows the 512 bytes without change.
The format of those 512 bytes was not one standard. A discussion on the nesdev forum counts more than twenty differing and incompatible header formats in the files that circulate. The layout of the Super Wild Card header is documented, and a file with a header of that family carries the byte values 0xAA and 0xBB at positions 8 and 9 of the file. That is a signature check for one family, not for every header.
How to tell whether a ROM file has a header
For SMC vs SFC purposes the extension is no use, so the simplest check is arithmetic and needs no special tool. The SNES wiki explains that a ROM image consists of whole banks, of 32 kilobytes for the LoROM memory map and 64 kilobytes for HiROM, so a headerless image is a multiple of 1024 bytes in size. A headered image is 512 bytes larger. If the file size modulo 1024 equals 512, a header is present.
The method can fail. The wiki’s forum threads point out that some public-domain and homebrew images have sizes that break the rule, so the size test is a strong hint but not a proof. A second method is to look for the internal ROM header where it should be. The internal header sits at $007FC0 for LoROM, $00FFC0 for HiROM and $40FFC0 for ExHiROM, and if nothing sensible is found there, looking again 512 bytes further in tells whether a copier header pushed it back. The file extension never needs to be consulted.
Why emulators and patching tools care about the header
Every address inside a ROM assumes a headerless image. The checksum stored in the internal header is calculated over the game data alone, so it does not include the 512 bytes. The SNES wiki calls the copier header generally useless outside its copier and says modern practice prefers unheadered files. Other sources say copier headers can cause compatibility problems with some emulators and flash carts, and that tools strip them so that address calculations come out right.
Patching tools are the second place where the difference shows. A patch, such as the translations and fixes that fans publish, records where in the file the changes go. If the file has 512 extra bytes at the start, every position is shifted. Patch authors therefore say which layout the patch was made for, and some tools add or remove the header themselves before applying it. Reading the documentation of the patch is the way to find out, since this guide cannot tell which layout a particular patch expects.
How a header is removed or added
Because the header is a prefix, removing it means writing a copy of the file that starts at the 513th byte. Adding one means putting 512 bytes in front, and the contents of those bytes decide whether the receiving tool accepts it. Small utilities exist for this job, such as the super-beheader project on GitHub, which strips copier headers from ROM files, and several emulator front ends and ROM managers have the same function built in. The work should be done on a copy, and a ROM database or the patch author’s notes will say which form is wanted.
Few people ever need to add a header back. The emulators in common use read headerless files, and many also read headered ones by detecting the extra 512 bytes first.
SNES releases of Prince of Persia
The Super Nintendo has releases of both classic games, and a ROM image of either one is a file of the kind described above. The first game’s SNES version was developed by Arsys Software and published by Masaya in Japan and Konami in the United States and Europe, as described on the page for the 1989 original and its ports. The sequel reached the system in 1996 in a port by Titus Software that, according to Wikipedia, is missing features and several levels, including the final one. The page on the sequel covers its versions.
Which of the dumps in circulation have a copier header, and in which form, depends on the individual file, and the sources consulted do not say. The size test above answers it for any given file. This site does not name or link any place to obtain a ROM; the cartridges and their legal status are the subject of the page on ways to play the games.
Where this sits among the other formats
The file-format pages here deal with the containers of the computer versions of the game, and the SNES image is a different kind of file. The overview of game file formats places them side by side, the page about Prince of Persia DAT files covers the containers of the DOS release, and the DAT file opener identifies a file by its first bytes. The same habit applies to ROM images: the first bytes and the total size say more about a file than its name does.
Frequently asked questions
Can a file named .sfc still have a header?
Yes. The extension is only a label that anyone can change by renaming the file, and the sources agree that the presence of a copier header is not tied to the suffix. Checking the file size against the 1024-byte rule, or the bytes inside the file, is the reliable test, not the name.
Does removing the header damage the game data?
The header is metadata added by the copier device, not part of the cartridge contents. A headered file and a headerless file are described as identical apart from the 512 extra bytes at the start. Removing them gives the layout that emulator documentation and ROM databases generally expect.
Why do patches fail on one version of a ROM and work on another?
A patch that records positions inside the file assumes one layout. If the file has an extra 512 bytes at the start, every position is shifted by that amount, so a patch built for the headerless layout lands in the wrong place on a headered file, and the other way round. Patch documentation therefore states which layout it targets.
Is the copier header the same as the internal ROM header?
No. The internal header is part of the game itself, sits at a fixed address that depends on the memory map, and holds the title, map mode, size and checksum. The copier header is a separate block at the very beginning of the file. Tools that look for the internal header must allow for the extra 512 bytes.