FDS disk format: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (Removes link to defunct 'price' field (now called 'disk version'). It's not clear how disk rewrite count would be related to disk version.)
 
(14 intermediate revisions by 7 users not shown)
Line 28: Line 28:


At the end of each block, a 16-bit CRC is stored. On loading, the CRC is *not* calculated by the 6502 in the BIOS, but by the RAM adapter, which monitors disc transfers and calculates the CRC. It will automatically send an error code if both CRCs doesn't match.
At the end of each block, a 16-bit CRC is stored. On loading, the CRC is *not* calculated by the 6502 in the BIOS, but by the RAM adapter, which monitors disc transfers and calculates the CRC. It will automatically send an error code if both CRCs doesn't match.
The CRC used is the common [https://reveng.sourceforge.io/crc-catalogue/16.htm#crc.cat.crc-16-kermit CRC-16/KERMIT] algorithm. The '1' bit at the end of the gap is included in the calculation.


=== True disc capacity ===
=== True disc capacity ===
Line 43: Line 45:
! Offset !! Length (bytes) !! Description !! Details
! Offset !! Length (bytes) !! Description !! Details
|-
|-
| 0 (00h) || 1 || Block code || Raw byte: $01
| $00 || 1 || Block code || Raw byte: $01
|-
|-
| 1 (01h) || 14 || Disk verification || Literal ASCII string: <tt>*NINTENDO-HVC*</tt><br />Used by BIOS to verify legitimate disk image
| $01 || 14 || Disk verification || Literal ASCII string: <tt>*NINTENDO-HVC*</tt><br />Used by BIOS to verify legitimate disk image
|-
|-
| 15 (0Fh) || 1 || Manufacturer code || See [[#Manufacturer_codes|Manufacturer codes]]
| $0F || 1 || Licensee code || See [[Licensee codes]]
|-
|-
| 16 (10h) || 3 || Game name || 3-letter ASCII code per game (e.g. ZEL for The Legend of Zelda)
| $10 || 3 || Game name || 3-letter ASCII code per game (e.g. ZEL for ''The Legend of Zelda'')
|-
|-
| 19 (13h) || 1 || Game type || $20 = <tt>" "</tt> &mdash; Normal disk<br />$45 = <tt>"E"</tt> &mdash; Event (e.g. Japanese national [http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1%E3%83%9F%E3%83%AA%E3%83%BC%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF_%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0#.E3.83.87.E3.82.A3.E3.82.B9.E3.82.AF.E3.83.95.E3.82.A1.E3.82.AF.E3.82.B9 DiskFax] tournaments)<br />$52 = <tt>"R"</tt> &mdash; Reduction in price via advertising
| $13 || 1 || Game type || $20 = <tt>" "</tt> &mdash; Normal disk<br />$45 = <tt>"E"</tt> &mdash; Event (e.g. Japanese national [http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1%E3%83%9F%E3%83%AA%E3%83%BC%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF_%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%82%B7%E3%82%B9%E3%83%86%E3%83%A0#.E3.83.87.E3.82.A3.E3.82.B9.E3.82.AF.E3.83.95.E3.82.A1.E3.82.AF.E3.82.B9 DiskFax] tournaments)<br />$4A = <tt>"J"</tt> &mdash; Unknown. May indicate [[Family Computer Network Adapter]]<br />$52 = <tt>"R"</tt> &mdash; Reduction in price via advertising
|-
|-
| 20 (14h) || 1 || Game version/revision number || Starts at $00, increments per revision
| $14 || 1 || Game version || Starts at $00, increments per revision
|-
|-
| 21 (15h) || 1 || Side number || $00 = Side A, $01 = Side B.  Single-sided disks use $00
| $15 || 1 || Side number || $00 = Side A, $01 = Side B.  Single-sided disks use $00
|-
|-
| 22 (16h) || 1 || Disk number || First disk is $00, second is $01, etc.
| $16 || 1 || Disk number || First disk is $00, second is $01, etc.
|-
|-
| 23 (17h) || 1 || Disk type || $00 = FMC ("normal card"), $01 = FSC ("card with shutter").  May correlate with [http://famicomworld.com/workshop/articles/product-codes-fmc-and-fsc/ FMC and FSC product codes]
| $17 || 1 || Disk type (FMC) || $01 for FMC blue-disk releases, and $00 otherwise <ref>[http://famicomworld.com/workshop/articles/product-codes-fmc-and-fsc/ FamicomWorld:] FMC and FSC product codes</ref>
|-
|-
| 24 (18h) || 1 || Unknown || Speculative: (Err.10) Possibly indicates disk #; usually $00<br />Speculative: $00 = yellow disk, $01 = blue or gold disk, $FE = white disk, $FF = blue disk
| $18 || 1 || Unknown || $00 in all known games
|-
|-
| 25 (19h) || 1 || Boot read file code || Refers to the file code/file number to load upon boot/start-up
| $19 || 1 || Boot read file code || Refers to the file code/file number to load upon boot/start-up
|-
|-
| 26 (1Ah) || 5 || Unknown || Raw bytes: $FF $FF $FF $FF $FF
| $1A || 5 || Unknown || Raw bytes: $FF $FF $FF $FF $FF
|-
|-
| 31 (1Fh) || 3 || Manufacturing date || See [[#Date_format|Date format]]
| $1F || 3 || Manufacturing date || See [[#Date_format|Date format]]
|-
|-
| 34 (22h) || 1 || Country code || $49 = Japan
| $22 || 1 || Country code || $49 = Japan
|-
|-
| 35 (23h) || 1 || Unknown || Raw byte: $61.  Speculative: Region code?
| $23 || 1 || Unknown || Raw byte: $61.  Speculative: Region code?
|-
|-
| 36 (24h) || 1 || Unknown || Raw byte: $00.  Speculative: Location/site?
| $24 || 1 || Unknown || Raw byte: $00.  Speculative: Location/site?
|-
|-
| 37 (25h) || 2 || Unknown || Raw bytes: $00 $02
| $25 || 2 || Unknown || Raw bytes: $00 $02
|-
|-
| 39 (27h) || 5 || Unknown || Speculative: some kind of game information representation?
| $27 || 5 || Unknown || Speculative: some kind of game information representation?
|-
|-
| 44 (2Ch) || 3 || "Rewritten disk" date || See [[#Date_format|Date format]].  It's speculated this refers to the date the disk was formatted and rewritten by something like a [http://www.nintendolife.com/news/2014/03/weirdness_this_footage_of_the_famicom_disk_writer_kiosk_is_a_bit_awesome Disk Writer kiosk]. In the case of an original (non-copied) disk, this should be the same as [[#Manufacturing_date|Manufacturing date]]
| $2C || 3 || "Rewritten disk" date || See [[#Date_format|Date format]].  It's speculated this refers to the date the disk was formatted and rewritten by something like a [http://www.nintendolife.com/news/2014/03/weirdness_this_footage_of_the_famicom_disk_writer_kiosk_is_a_bit_awesome Disk Writer kiosk].<br />In the case of an original (non-copied) disk, this should be the same as [[#Manufacturing_date|Manufacturing date]]
|-
|-
| 47 (2Fh) || 1 || Unknown ||
| $2F || 1 || Unknown ||
|-
|-
| 48 (30h) || 1 || Unknown || Raw byte: $80
| $30 || 1 || Unknown || Raw byte: $80
|-
|-
| 49 (31h) || 2 || Disk Writer serial number ||
| $31 || 2 || Disk Writer serial number ||
|-
|-
| 51 (33h) || 1 || Unknown || Raw byte: $07
| $33 || 1 || Unknown || Raw byte: $07
|-
|-
| 52 (34h) || 1 || Disk rewrite count || Value stored in [[wikipedia:Binary-coded_decimal|BCD]] format.  $00 = Original (no copies). Also see [[#Price|Price]]
| $34 || 1 || Disk rewrite count || Value stored in [[wikipedia:Binary-coded_decimal|BCD]] format.  $00 = Original (no copies).
|-
|-
| 53 (35h) || 1 || Actual disk side || $00 = Side A, $01 = Side B
| $35 || 1 || Actual disk side || $00 = Side A, $01 = Side B
|-
|-
| 54 (36h) || 1 || Unknown ||
| $36 || 1 || Disk type (other) || $00 = yellow disk, $FF = blue disk, $FE = prototype, sample, or internal-use (white or pink) disk. Some prototype disks have been observed with value $00, but this may indicate the field was simply not filled in.
|-
|-
| 55 (37h) || 1 || Price || See [[#Price|Price]]
| $37 || 1 || Disk version || Unknown how this differs from game version ($14). Disk version numbers indicate different software revisions. Speculation is that disk version incremented with each disk received from a licensee.
|-
| 56 (38h) || 2 || CRC || (Omitted from .FDS files)
|-
|-
| $38 || 2 || CRC || (Omitted from .FDS files)
|}
|}


Line 106: Line 107:


All files with IDs smaller or equals to the ''boot read file code'' will be loaded when the game is booting.
All files with IDs smaller or equals to the ''boot read file code'' will be loaded when the game is booting.
The FDS also has a trademark security system similar to [http://segaretro.org/TradeMark_Security_System what Sega used on some of its consoles]:
:The 224-byte text at PPU $2800-$28DF must match the data in the BIOS, starting at $ED37.
:This data contains an English licensing message stored in the SMB1/Zelda character encoding. The BIOS ensures that it is present in the nametable and displays it on the screen for several seconds after the boot files are loaded.
:Traditionally, the first file on a disk is a nametable type file loaded into $2800, which is named <code>KYODAKU-</code> (きょだく or [[wiktionary:許|許]][[wiktionary:諾|諾]] means approval). It must be one of the boot files, or the license message test will fail (error 20) before it proceeds to run the program.
:The license screen test and display can be bypassed by using a boot file to enable NMIs, which will interrupt the boot loading process early.<ref>[//forums.nesdev.org/viewtopic.php?p=194826#p194826 Forum post]: Skipping FDS license screen?</ref>


==== Date format ====
==== Date format ====


All bytes are stored in BCD format, in order of year, month, and day. To accurately calculate they year, add 1925 to the BCD value.  For example, values of $63 $11 $28 would represent November ($11) 28th ($28), 1988 ($63 + 1925).  The "magic year" of 1925 comes from the Japanese [[wikipedia:Sh%C5%8Dwa_period|Shōwa period]], despite the era only lasting from 1925 until 1989. Titles manufactured or updated later than 1989 are considered legitimate (e.g. $83 + 1925 = 2008).
All bytes are stored in BCD format, in order of year, month, and day. The year is usually represented as the 1-indexed number of years since the start of the current [[wikipedia:Japanese_calendar|Japanese calendar]] era, either the Shōwa era (1926) or Heisei era (1989). Values observed are $61-63 for 1986-1988 and $01-03 for 1989-1991. Disk Writer kiosks continued to use Shōwa era dates beyond the end of the Shōwa era, so disks written by the service up to its discontinuation in 2003 may have year values as high as $78.


==== Price ====
A small number of games used the last two digits of the current year instead of a Japanese calendar date. Values observed are $85-$86 for 1985-1986.


When the '''Disk rewrite count''' field is $00, the '''Price''' field represents the cost of a "new/original" disk.  In this situation, a value of $01 means 3400円 (3400 yen), and a value of $03 also means 3400円 but includes peripherals.  The example given by Enri in his Famicom Disk System documentation mentions the game [http://ja.wikipedia.org/wiki/%E3%81%A8%E3%81%B3%E3%81%A0%E3%81%9B%E5%A4%A7%E4%BD%9C%E6%88%A6 とびだせ大作戦 (Tobidase Daisakusen/3D Worldrunner)], where both sales of the game with and without the [http://homepage3.nifty.com/poco-pen/s-te.htm とびだせメガネ (Tobidase 3D glasses)] cost 3400円.  The reason for the delineation within the actual '''Price''' field is unknown.
=== File amount block (block 2) ===


When the '''Disk rewrite count''' field is $01, the '''Price''' field represents incurred costs of disk rewriting (such as that done by a Disk Writer kiosk).  A value of $00 means 500円 (which appears to be specific to Mario Brothers via an in-box advertisement promising that all disk rewrites would only cost 500円), while a value of $01 means 600円.
This block contains the total number of files recorded on disk.
 
==== Manufacturer codes ====
 
The manufacturer codes are similar (quite possibly identical) to that known on the GameBoy.  There are some differences, however (for example, $A6).


{| class="wikitable"
{| class="wikitable"
|-
|-
! Value !! Company (English) !! Company (Japanese)
! Offset !! Length (bytes) !! Description !! Details
|-
|-
| $00 || <unlicensed> || <非公認>
| $00 || 1 || Block code || Raw byte: $02
|-
|-
| $01 || Nintendo || 任天堂
| $01 || 1 || File Amount ||
|-
|-
| $08 || Capcom || カプコン
| $02 || 2 || CRC || (Omitted from .FDS files)
|}
 
More files might exist on the disk, but the BIOS load routine will ignore them, those files are called "hidden" files.
Some games have a simple copy protection this way: They have their own loading routine similar to the one from the BIOS but hard-code the file amount to a higher number, which will allow for loading hidden files. This also allows the game to load faster because the BIOS will stop reading the disc after the last non-hidden file.
 
=== File header block  (block 3) ===
 
{| class="wikitable"
|-
|-
| $0A || Jaleco || ジャレコ
! Offset !! Length (bytes) !! Description !! Details
|-
| $18 || Hudson Soft || ハドソン
|-
| $49 || Irem || アイレム
|-
| $4A || Gakken || 学習研究社
|-
| $8B || BulletProof Software (BPS) || BPS
|-
| $99 || Pack-In-Video || パックインビデオ
|-
| $9B || Tecmo || テクモ
|-
| $9C || Imagineer || イマジニア
|-
|-
| $A2 || Scorpion Soft || スコーピオンソフト
| $00 || 1 || Block code || Raw byte: $03
|-
|-
| $A4 || Konami || コナミ
| $01 || 1 || File Number ||
|-
|-
| $A6 || Kawada Co., Ltd. || 河田
| $02 || 1 || File ID || The ID specified at disk-read function call.
|-
|-
| $A7 || Takara || タカラ
| $03 || 8 || File Name ||
|-
|-
| $A8 || Royal Industries || ロイヤル工業
| $0B || 2 || File Address || 16-bit little-endian. The destination address when loading.
|-
|-
| $AC || Toei Animation || 東映動画
| $0D || 2 || File Size || 16-bit little-endian.
|-
|-
| $AF || Namco || ナムコ
| $0F || 1 || File Type || 0: Program (PRAM)<br />1: Character (CRAM)<br />2: Name table (VRAM)
|-
| $B1 || ASCII Corporation || アスキー
|-
| $B2 || Bandai || バンダイ
|-
| $B3 || Soft Pro Inc. || ソフトプロ
|-
| $B6 || HAL Laboratory || HAL研究所
|-
| $BB || Sunsoft || サンソフト
|-
| $BC || Toshiba EMI || 東芝EMI
|-
| $C0 || Taito || タイトー
|-
| $C1 || Sunsoft / Ask Co., Ltd. || サンソフト アスク講談社
|-
| $C2 || Kemco || ケムコ
|-
| $C3 || Square || スクウェア
|-
| $C4 || Tokuma Shoten || 徳間書店
|-
| $C5 || Data East || データイースト
|-
| $C6 || Tonkin House/Tokyo Shoseki || トンキンハウス
|-
| $C7 || East Cube || イーストキューブ
|-
| $CA || Konami / Ultra / Palcom || コナミ
|-
| $CB || NTVIC / VAP || バップ
|-
| $CC || Use Co., Ltd. || ユース
|-
| $CE || Pony Canyon / FCI || ポニーキャニオン
|-
| $D1 || Sofel || ソフエル
|-
| $D2 || Bothtec, Inc. || ボーステック
|-
| $DB || Hiro Co., Ltd. || ヒロ
|-
| $E7 || Athena || アテナ
|-
| $EB || Atlus || アトラス
|-
|-
| $10 || 2 || CRC || (Omitted from .FDS files)
|}
|}
=== File amount block (block 2) ===
This block contains the total number of files recorded on disk.
SIZE  CONTENTS
1      $02
1      File Amount
More files might exist on the disk, but the BIOS load routine will ignore them, those files are called "hidden" files.
Some games have a simple copy protection this way: They have their own loading routine similar to the one from the BIOS but hard-code the file amount to a higher number, which will allow for loading hidden files. This also allows the game to load faster because the BIOS will stop reading the disc after the last non-hidden file.
=== File header block  (block 3) ===
SIZE    CONTENTS
1        $03
1        File Number 
1        File Indicate Code (file identification code) 
          ID specified at disk-read function call
8        File Name
2        File Address (16-bit little endian)
          the destination address when loading
2        File Size (16-bit little endian)
1        Kind of File 
          0:Program (PRAM) 
          1:Character (CRAM) 
          2:Name table (VRAM)


The file Number must go in increasing order, first file is 0.
The file Number must go in increasing order, first file is 0.
Line 253: Line 162:
=== File data block (block 4) ===
=== File data block (block 4) ===


SIZE      CONTENTS
{| class="wikitable"
1         $04
|-
--       disk data
! Offset !! Length (bytes) !! Description !! Details
|-
| $00 || 1 || Block code || Raw byte: $04
|-
| $01 || -- || Disk data ||
|-
| -- || 2 || CRC || (Omitted from .FDS files)
|}
 
== See also ==
 
* [[FDS file format]] ('''.FDS''')
* [//nesdev.org/FDS%20technical%20reference.txt FDS technical reference.txt] by Brad Taylor
* [http://cmpslv2.starfree.jp/Famic/Famdis.htm Enri's Famicom Disk System page] (Japanese)
* [https://web.archive.org/web/20091023182159/http://www2.odn.ne.jp/~haf09260/Famic/Famdis.htm Enri's Famicom Disk System page] (Japanese) (old/outdated)
* [http://park19.wakwak.com/~fantasy/fds/ Fantasy's FDS Maniacs page] (Japanese). Technical information is in the [http://park19.wakwak.com/~fantasy/fds/document/document.htm ディスクシステム資料室] section.
* [https://web.archive.org/web/20080515232015/http://fdsstudy.hp.infoseek.co.jp/ FDS Study site] via archive.org (Japanese). The FDSStudy program can still be found [https://w.atwiki.jp/famicomall/pages/589.html here].
* [//nesdev.org/fds-nori.txt fds-nori.txt] - FDS reference in Japanese by Nori
* [//forums.nesdev.org/viewtopic.php?p=194867#p194867 Forum post]: .fds format: Can checksums be heuristically detected? - Includes a CRC implementation in C.


== References ==
== References ==
<References />
<References />

Latest revision as of 21:33, 27 May 2024

The Famicom Disk System uses disks that are a modified version of Mitsumi Quick Disk hardware, with a custom data format stored on the disk.

Each side can hold more than 64KB of data.

For archive and emulation, dumps of these disks are often preserved using the FDS file format (.FDS).

FDS Disk Side format

Each disk side must be structured into block as follows :

1, 2, 3, 4, 3, 4, ...., 3, 4

The 3, 4 pattern should be repeated once per file present on the disk.

Blocks type 1 and 2 represent information about the disk and how many files it has, and each block type 3 and 4 pair represents a single file. See Block format below.

Gaps

Physically on the disc, there are "gaps" of 0 recorded between blocks and before the start of the disc. Length of the gaps are as follows:

  • Before the start of the disc : At least 26150 bits, 28300 typical.
  • Gap between blocks : At least 480 bits, 976 bits typical.

Gaps are teminated by a single '1' bit. In terms of bytes, it would be $80, as the data is stored in little endian format.

CRCs

At the end of each block, a 16-bit CRC is stored. On loading, the CRC is *not* calculated by the 6502 in the BIOS, but by the RAM adapter, which monitors disc transfers and calculates the CRC. It will automatically send an error code if both CRCs doesn't match.

The CRC used is the common CRC-16/KERMIT algorithm. The '1' bit at the end of the gap is included in the calculation.

True disc capacity

In the commonly used FDS file format, its disk image size is limited to 65500 bytes, but does not contain CRCs or gaps.

The actual disk capacity is somewhat larger, and there are a few variant disk formats that may have even more capacity.

Block format

Disk info block (block 1)

Offset Length (bytes) Description Details
$00 1 Block code Raw byte: $01
$01 14 Disk verification Literal ASCII string: *NINTENDO-HVC*
Used by BIOS to verify legitimate disk image
$0F 1 Licensee code See Licensee codes
$10 3 Game name 3-letter ASCII code per game (e.g. ZEL for The Legend of Zelda)
$13 1 Game type $20 = " " — Normal disk
$45 = "E" — Event (e.g. Japanese national DiskFax tournaments)
$4A = "J" — Unknown. May indicate Family Computer Network Adapter
$52 = "R" — Reduction in price via advertising
$14 1 Game version Starts at $00, increments per revision
$15 1 Side number $00 = Side A, $01 = Side B. Single-sided disks use $00
$16 1 Disk number First disk is $00, second is $01, etc.
$17 1 Disk type (FMC) $01 for FMC blue-disk releases, and $00 otherwise [1]
$18 1 Unknown $00 in all known games
$19 1 Boot read file code Refers to the file code/file number to load upon boot/start-up
$1A 5 Unknown Raw bytes: $FF $FF $FF $FF $FF
$1F 3 Manufacturing date See Date format
$22 1 Country code $49 = Japan
$23 1 Unknown Raw byte: $61. Speculative: Region code?
$24 1 Unknown Raw byte: $00. Speculative: Location/site?
$25 2 Unknown Raw bytes: $00 $02
$27 5 Unknown Speculative: some kind of game information representation?
$2C 3 "Rewritten disk" date See Date format. It's speculated this refers to the date the disk was formatted and rewritten by something like a Disk Writer kiosk.
In the case of an original (non-copied) disk, this should be the same as Manufacturing date
$2F 1 Unknown
$30 1 Unknown Raw byte: $80
$31 2 Disk Writer serial number
$33 1 Unknown Raw byte: $07
$34 1 Disk rewrite count Value stored in BCD format. $00 = Original (no copies).
$35 1 Actual disk side $00 = Side A, $01 = Side B
$36 1 Disk type (other) $00 = yellow disk, $FF = blue disk, $FE = prototype, sample, or internal-use (white or pink) disk. Some prototype disks have been observed with value $00, but this may indicate the field was simply not filled in.
$37 1 Disk version Unknown how this differs from game version ($14). Disk version numbers indicate different software revisions. Speculation is that disk version incremented with each disk received from a licensee.
$38 2 CRC (Omitted from .FDS files)

The *NINTENDO-HVC* string, stored in ASCII, proves that this is a FDS disk. If the string doesn't match, the BIOS will refuse to read the disk further.

If the FDS is started with a disk whose side number and disk number aren't both $00, it will be prompted to insert the first disk side. However, some games make this number $00, even for the second disk to make it bootable too.

All files with IDs smaller or equals to the boot read file code will be loaded when the game is booting.

Date format

All bytes are stored in BCD format, in order of year, month, and day. The year is usually represented as the 1-indexed number of years since the start of the current Japanese calendar era, either the Shōwa era (1926) or Heisei era (1989). Values observed are $61-63 for 1986-1988 and $01-03 for 1989-1991. Disk Writer kiosks continued to use Shōwa era dates beyond the end of the Shōwa era, so disks written by the service up to its discontinuation in 2003 may have year values as high as $78.

A small number of games used the last two digits of the current year instead of a Japanese calendar date. Values observed are $85-$86 for 1985-1986.

File amount block (block 2)

This block contains the total number of files recorded on disk.

Offset Length (bytes) Description Details
$00 1 Block code Raw byte: $02
$01 1 File Amount
$02 2 CRC (Omitted from .FDS files)

More files might exist on the disk, but the BIOS load routine will ignore them, those files are called "hidden" files. Some games have a simple copy protection this way: They have their own loading routine similar to the one from the BIOS but hard-code the file amount to a higher number, which will allow for loading hidden files. This also allows the game to load faster because the BIOS will stop reading the disc after the last non-hidden file.

File header block (block 3)

Offset Length (bytes) Description Details
$00 1 Block code Raw byte: $03
$01 1 File Number
$02 1 File ID The ID specified at disk-read function call.
$03 8 File Name
$0B 2 File Address 16-bit little-endian. The destination address when loading.
$0D 2 File Size 16-bit little-endian.
$0F 1 File Type 0: Program (PRAM)
1: Character (CRAM)
2: Name table (VRAM)
$10 2 CRC (Omitted from .FDS files)

The file Number must go in increasing order, first file is 0. File IDs can be freely assigned, and this is the number which will decide which file is loaded from the disk (instead of the file number). An ID smaller than the boot number means the file is a boot file, and will be loaded on first start up.

File names are uppercase ASCII.

File data block (block 4)

Offset Length (bytes) Description Details
$00 1 Block code Raw byte: $04
$01 -- Disk data
-- 2 CRC (Omitted from .FDS files)

See also

References

  1. FamicomWorld: FMC and FSC product codes