FDS file format: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(splitting from FDS)
 
(Improve formatting and add note about header omission.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== .FDS format ==
'''fwNES''' was an [[NES emulator]] developed by Fan Wan Yang and Shu Kondo. Its most lasting contribution to the NES scene was its disk image file format, an image of the Quick Disk media.
'''fwNES''' was an [[NES emulator]] developed by Fan Wan Yang. Its most lasting contribution to the NES scene was its disk image file format, an image of the Quick Disk media.


The FDS format (file name suffix <code>.fds</code>) is a way to store Famicom Disk System disk data. It consists of the following sections, in order:
== fwNES FDS file format ==
# Header (16 bytes)
 
The FDS format (filename suffix <code>.fds</code>) is a way to store [[Family Computer Disk System|Famicom Disk System]] disk data. It consists of the following sections, in order:
# Header (16 bytes), '''sometimes omitted'''
# Disk data (65500 * ''x'' bytes)
# Disk data (65500 * ''x'' bytes)


The format of the header is as follows:
The format of the header is as follows:
* 0-3: Constant $46 $44 $53 $1A ("FDS" followed by MS-DOS end-of-file)
{| class="wikitable"
* 4: Number of disk sides
! Bytes !! Description
* 5-15: Zero filled
|-
| 0-3 || Constant $46 $44 $53 $1A ("FDS" followed by MS-DOS end-of-file)
|-
| 4 || Number of disk sides
|-
| 5-15 || Zero filled padding
|}


Note: Most games are an even number of sides. Ports from NROM were one side. No commercial FDS game had an odd number of sides greater than 1.
Some .FDS images may '''omit the header'''.
Disk sides comes in the following order :
* Disc 1 Side A
* Disc 1 Side B
* Disc 2 Side A
* Disc 2 Side B
* etc...


== FDS Disk Side format ==
=== Disk data ===


Each disk side must be structured into block as follows :
The disk data follows the [[FDS disk format]], but gaps and CRCs are not included in the .FDS image.


1, 2, 3, 4, 3, 4, ...., 3, 4
Most games are an even number of sides. Ports from NROM were one side. No commercial FDS game had an odd number of sides greater than 1.
 
Disk sides comes in the following order:
The 3, 4 pattern should be repeated once per file present on the disk.
* Disk 1 Side A
 
* Disk 1 Side B
From the last file, fill the side with all 0 so that the side has exactly 65500 is reached.
* Disk 2 Side A
* Disk 2 Side B
* etc...


== Data not stored in the FDS image ==
After the last file block, fill a side with all 0 so that the disk side reaches exactly 65500 bytes.


In addition to data stored in the FDS image, there is other data stored on the disc, but removed when the disc is dumped because such data wasn't meaningful for emulation.
[[Category:File formats]]

Latest revision as of 04:20, 9 October 2023

fwNES was an NES emulator developed by Fan Wan Yang and Shu Kondo. Its most lasting contribution to the NES scene was its disk image file format, an image of the Quick Disk media.

fwNES FDS file format

The FDS format (filename suffix .fds) is a way to store Famicom Disk System disk data. It consists of the following sections, in order:

  1. Header (16 bytes), sometimes omitted
  2. Disk data (65500 * x bytes)

The format of the header is as follows:

Bytes Description
0-3 Constant $46 $44 $53 $1A ("FDS" followed by MS-DOS end-of-file)
4 Number of disk sides
5-15 Zero filled padding

Some .FDS images may omit the header.

Disk data

The disk data follows the FDS disk format, but gaps and CRCs are not included in the .FDS image.

Most games are an even number of sides. Ports from NROM were one side. No commercial FDS game had an odd number of sides greater than 1. Disk sides comes in the following order:

  • Disk 1 Side A
  • Disk 1 Side B
  • Disk 2 Side A
  • Disk 2 Side B
  • etc...

After the last file block, fill a side with all 0 so that the disk side reaches exactly 65500 bytes.