Super Magic Card file format

From NESdev Wiki
Revision as of 19:30, 6 December 2021 by NewRisingSun (talk | contribs)
Jump to navigationJump to search

The Front Fareast Super Magic Card can load games and real-time save states from 3.5" MS-DOS FAT12 floppy disks. It is also known just as the "FFE format" by fwNES and uCON64. Similar to iNES, it contains a 512-byte header describing the game's mapper and size as well as trainer, PRG and CHR data. Unlike iNES, it only supports the mappers that the Super Magic Card itself supports.

Format of the 512-byte header:

+$0   8 bytes   Doctor header
+$8   2 bytes   Signature $AA $BB 
+$A   1 byte    File type, 0=Game, 1=Realtime save state
+$B   501 bytes Unused
-----
+$200

In the case of "Game" files, the 512-byte header is followed by

  • 512 bytes of trainer data if the Doctor Header file's byte $0 bit 6 was set;
  • PRG data, size determined by
    • Doctor header byte $3 times 8192 bytes if Doctor header byte $7=$AA (i.e. a Super Magic Card game);
    • Doctor header byte $0 bit 5 clear=128 KiB, set=256 KiB bytes if Doctor header byte 0 bits 4 or 5 are set (i.e. a Magic Card 4M game);
    • Doctor header byte $1 bits 5-7 otherwise (i.e. a Magic Card 1M or 2M game):
Byte $1 bits 5-7   PRG size
 0,4               128 KiB
 1-3               256 KiB
 5-7               32 KiB
  • CHR data, size determined by
    • Doctor header byte $4 times 8192 bytes if Doctor header byte $7=$AA (i.e. a Super Magic Card game);
    • Doctor header byte $0 bit 4 clear=128 KiB, set=256 KiB bytes if Doctor header byte 0 bits 4 or 5 are set (i.e. a Magic Card 4M game);
    • Doctor header byte $1 bits 5-7 otherwise (i.e. a Magic Card 1M or 2M game):
Byte $1 bits 5-7   CHR size
 0-3               0 KiB
 4-5               32 KiB
 6                 16 KiB
 7                 8 KiB

The SMC Game file format is supported (to varying degrees) by: