User:Zzo38/DotFami

From NESdev Wiki
< User:Zzo38
Revision as of 21:16, 3 August 2012 by Zzo38 (talk | contribs) (Created page with "This is a draft for <tt>.fami</tt> format of NES/Famicom ROM image files. This format allows title text, debugging information, custom mapper, and a few more. (N.B. Do not de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This is a draft for .fami format of NES/Famicom ROM image files. This format allows title text, debugging information, custom mapper, and a few more.

(N.B. Do not delete or move this file until the draft is completed.)

File Order

  • Header
  • ROM banks
  • Mapper codes
  • Symbol data
  • Descriptive text

(Note: Sixteen bit numbers throughout the file are small-endian form.)

Header

  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|'F'|'A'|'M'|'I'|bnk|cpu| * | * |textLen|mapLen |symLen | * | * |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  • The first four bytes of the header must be the ASCII codes for "FAMI".
  • bnk: Number of 8K banks. (There is a special meaning if this is zero; see below.)
  • cpu: CPU mode flag:
    • bit0: Set if decimal mode should work.
    • bit1: Set if the 2A03 APU noise Mode flag should be ignored.
    • bit2-bit3: CPU clock speed multiplier: 00 = half speed, 01 = normal speed, 10 = double speed, 11 = quadruple speed.
    • bit4-bit5: TV system: 00 = perfect mode (RGB palette, NTSC timing, 32x30 tiles fully visible, no color artifacts), 01 = NTSC, 10 = PAL, 11 = work with NTSC or PAL.
    • bit6: Set if RAM should be initialized with random values instead of zero.
    • bit7: Set if mapper should be initialized with random values instead of zero.
  • *: Reserved bytes; set to zero.
  • textLen: Length of descriptive text.
  • mapLen: Length of mapper codes.
  • symLen: Length of symbol data.