Tags

  • 世说新语 (167)
  • English (147)
  • 道德经 (87)
  • 李白 (33)
  • 苏轼 (25)
  • 杜甫 (21)
  • Gaming (14)
  • 白居易 (12)
  • 辛弃疾 (11)
  • 杜牧 (10)
  • 李煜 (10)
  • 刘义庆 (10)
  • 陆游 (9)
  • 王安石 (9)
  • 欧阳修 (9)
  • 晏几道 (9)
  • 战国策 (9)
  • 司马迁 (9)
  • 王维 (8)
  • 李清照 (8)
  • 李商隐 (8)
  • 摘抄 (8)
  • 刘禹锡 (7)
  • 王昌龄 (6)
  • 韦庄 (5)
  • 秦观 (5)
  • 柳永 (5)
  • 孟子 (5)
  • 温庭筠 (4)
  • 晏殊 (4)
  • 庄子 (4)
  • 左传 (4)
  • 孟浩然 (4)
  • 韩愈 (3)
  • 陶渊明 (3)
  • 论语 (3)
  • 范仲淹 (3)
  • 王勃 (3)
  • 张九龄 (3)
  • 岑参 (3)
  • 冯延巳 (3)
  • Typography (3)
  • 黄巢 (2)
  • 随笔 (2)
  • 贺铸 (2)
  • 贺知章 (2)
  • 词语 (2)
  • 祖咏 (2)
  • 王国维 (2)
  • 王之涣 (2)
  • 林逋 (2)
  • 曹操 (2)
  • 张若虚 (2)
  • 张先 (2)
  • 宋玉 (2)
  • 孟郊 (2)
  • 墨子 (2)
  • 卢纶 (2)
  • 刘长卿 (2)
  • 乐府诗集 (2)
  • Others (2)
  • 黄庭坚 (1)
  • 高适 (1)
  • 骆宾王 (1)
  • 韩非子 (1)
  • 韦应物 (1)
  • 陶弘景 (1)
  • 陈寿 (1)
  • 陈子昂 (1)
  • 陈与义 (1)
  • 金昌绪 (1)
  • 郦道元 (1)
  • 贾谊 (1)
  • 贾岛 (1)
  • 诸葛亮 (1)
  • 诗经 (1)
  • 褚少孙 (1)
  • 虞世南 (1)
  • 蒋捷 (1)
  • 荀子 (1)
  • 花蕊夫人 (1)
  • 罗隐 (1)
  • 王观 (1)
  • 王翰 (1)
  • 王羲之 (1)
  • 王绩 (1)
  • 王禹偁 (1)
  • 王湾 (1)
  • 王实甫 (1)
  • 潘阆 (1)
  • 海子 (1)
  • 柳宗元 (1)
  • 杨慎 (1)
  • 杜秋娘 (1)
  • 李颀 (1)
  • 李贺 (1)
  • 李绅 (1)
  • 李璟 (1)
  • 李斯 (1)
  • 李密 (1)
  • 李之仪 (1)
  • 朱庆馀 (1)
  • 曹植 (1)
  • 晏子春秋 (1)
  • 成语 (1)
  • 徐凝 (1)
  • 归有光 (1)
  • 张籍 (1)
  • 张祜 (1)
  • 张溥 (1)
  • 张旭 (1)
  • 张志和 (1)
  • 张岱 (1)
  • 常建 (1)
  • 崔颢 (1)
  • 崔护 (1)
  • 岳飞 (1)
  • 屈原 (1)
  • 宋祁 (1)
  • 宋濂 (1)
  • 孙洙 (1)
  • 孙子 (1)
  • 姜夔 (1)
  • 国语 (1)
  • 周邦彦 (1)
  • 周敦颐 (1)
  • 吴均 (1)
  • 南北朝 (1)
  • 儒家 (1)
  • 佚名 (1)
  • 余秀华 (1)
  • RandomQuestions (1)
  • Ethics (1)
  • Home

    iNES file format

    Published Jul 09, 2020 [  Gaming  ]

    The iNES file format was originally defined by Marat Fayzullin for use in his iNES emulator. The format has since been used by most emulators and is the most common format for ROM images. INES format files should have the file extension *.nes. The format provides a 16 byte header at the start of the file which contains important information.

    Start Byte Length (Bytes) Contents
    0 3 Should contain the string ‘NES’ to identify the file as an iNES file
    3 1 Should contain the value $1A, also used to identify the file format
    4 1 Number of 16 KB RPG-ROM banks. The RPG-ROM (Program ROM) is the area of ROM used to store the program code.
    5 1 Number of 8 KB CHR-ROM / VROM banks. The names CHR-ROM (Character ROM) and VROM are used synonymously to refer to the area of ROM used to store graphics information, the pattern tables.
    6 1 ROM Control Byte 1:
    - Bit 0 - Indicates the type of mirroring use by the game where 0 indicate horizontal mirroring, 1 indicates vertical mirroring.
    - Bit 1 - Indicates the presence of battery-backed RAM at memory locations $6000-$7FFF.
    - Bit 2 - Indicates the presence of a 512-byte trainer at memory locations $7000-$71FF.
    - Bit 3 - If this bit is set it overrides bit 0 to indicate four-screen mirroring should be used.
    - Bit 4-7 - Four lower bits of the mapper number.
    7 1 ROM Control Byte 2:
    - Bit 0-3 - Reserved for future usage and should all be 0.
    - Bit 4-7 - Four upper bits of the mapper number.
    8 1 Number of 8 KB RAM banks. For compatibility with previous versions of the iNES format, assume 1 page of RAM when this is 0
    9 7 Reserved for future usage and should all be 0.

    Following the header is the 512-byte trainer, if one is present, otherwise the ROM banks begin here, starting with PRG-ROM then CHR-ROM. The format allows for up to 256 different memory mappers. Each mapper is assigned a specific number and the mapper number can be obtained by shifting bits 4-7 of control bytes 2 to the left by 4 bits and then adding the bits 4-7 of control byte 1.