NDS/DOCfilesystems

From Dev-Scene

< NDS
Comparison of FS types
FS Name Dirs List NL Name Size Date Checksum Extra Inf Compression Writable RAM GBAROM SD/CF SRAM
#FAT (old) Yes Yes 255/Yes Name Size Date no Attributes no Yes no Yes (FCSR) Yes Yes (FCSR)
#FAT (new) Yes No (needs DKP r20) 255/Yes Name Size Date no Attributes no Yes no Yes (FCSR) Yes Yes (FCSR)
#PinEightGBFS no yes 24 Name Size no no no no no Yes Yes no  ?
#romfs yes yes? 255? Name Size no? yes yes? no no Yes Yes no  ?
#Moonshell IMFS Yes  ? 64 Name Size no CRC32 none LZ77 no  ?  ?  ?  ?
#Moonshell EXFS  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?
#Pogoshell (ROM) Yes  ? 32 Name Size no no none no no  ? Yes  ?  ?
#Pogoshell (SRAM) no  ? 32 Name Size Date GBA Game ID User # RLE Yes  ?  ?  ? Yes
#PocketNES no  ? 32 Name Size no no none no no  ? Yes  ?  ?
#PocketNES SRAM no  ? 32 Name Size Date First 16k no MiniLZO Yes  ?  ?  ? Yes
#ZIP File  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?

[edit] Explanation of columns

  • FS Name - The name of the filesystem / library
  • Dirs - Supports files in directories
  • List - Supports listing files and directories
  • NL - Maximum filename Length
  • Size - Can get size of a file
  • Date - Can get the date/timestamp of a file
  • Checksum - Is the FS as a whole, or individual files have checksums?
  • Extra Inf - Any extra file meta-data
  • Compression - Does the FS have built-in support for compression?
  • Writable - Can you write to files / create new files?
  • RAM - FS can live in RAM
  • GBAROM - FS can live in GBA ROM space
  • SD/CF - FS can live on a SD/CF card
  • SRAM - FS can live in SRAM

[edit] More info on filesystems

[edit] FS Details

[edit] FAT (old)

Directories are implemented as special files, containing directory entries. They are linked. Uses a FAT to determine where clusters are on the disk Uses fixed size file entries, as well as special invalid files to add long names.

[edit] FAT (new)

[edit] PinEightGBFS

  • Also known as simply 'gbfs'
  • Official Site
  • Simple appended filesystem. Each directory entry stores a 24 character filename, a relative pointer to the start of the data, and the size of the data. Each file also stores the size of the file, allowing multiple GBFS files to be appended at once.
  • Identified by magic string "PinEightGBFS\r\n\032\n"

[edit] romfs

[edit] Moonshell IMFS

  • File system used by moonshell.

Directories are implemetned as an directory ID number for a file. Directories can be contained within directories. Files can be compressed with LZ77, this is done at the filesystem level. Identified by magic number "IMFS"

[edit] Moonshell EXFS

  • Another file system used by moonshell when used on traditional flash cards. Analogous to Pogoshell (ROM).

[edit] Pogoshell (ROM)

  • Filesystem used by pogoshell on ROM. GBA files are stored separately from other files, and are aligned to 32k boundaries to support bankswitching the flash cartridge to run them. Pogoshell itself has ugly limitations on the number of files in a directory, but these are not part of the filesystem itself. Filenames are 32 characters or less, posing a problem for long names. It chops off the file extension if the name is too long.

Identified by magic number 0xFAB0BABE, must be aligned to 32k boundary.

[edit] Pogoshell (SRAM)

  • Separate file system used by pogoshell for storing SRAM. Split accross 3 64k pages of SRAM. No support for subdirectories. Originally, pogoshell used the GBA GAME ID to identify which rom a save was associated with, but Kuwanger has modified the shell to remove that "feature".

Files are always RLE compressed. Stores a User ID# to allow multiple players to save with the same file. Identified by magic string "MINSF2"

[edit] PocketNES

  • Very similar to GBFS, but stores flags about how the emulator should treat roms. Each file gets a 48 byte header, containing filename, flags, and size.

No magic number, the emulator knows its size and uses that to determine where to look. But the position of NES^Z-48 can also be used.

[edit] PocketNES SRAM

  • Linked structure in SRAM for storing savestates and sram files, all files are compressed with MiniLZO.

Magic number is 0x57a731d7 (stateidt).

[edit] ZIP File

  • A PKZIP file with no compression. This is used by scummvm ds.


Dev-Scene (c) Ashley "MrShlee" Hull - Rock-ED Productions