# FS_Init

## C Specification

  `#include <nitro/fs.h>`
  `void FS_Init( u32 default_dma_no );`

## Arguments

default_dma_no | DMA number that the ROM Archive in the file system uses. If you specify `FS_DMA_NOT_USE`, instead of DMA, it uses the CPU to transfer. When a valid DMA channel is specified, this DMA channel cannot be used until the setting is changed with the `FS_SetDefaultDMA` function.The card access transfer source is an IO register, so DMA Channel 0 cannot be specified.

## Return Values

None.

## Description

This function initializes the ROM file system. The following processes are performed.

- Initializes the CARD library by calling `CARD_Init` function.
- Sets the current directory to ROM archive root ("`rom:/`").
- Initializes the DMA number that the ROM archive uses.

For more information on internal operations when allocating a DMA channel to the `ROM Archive`, refer to the description for the `CARD_ReadRomAsync` function.

## Caution

When a valid DMA channel is specified, this DMA channel cannot be used until the setting is changed with the `FS_SetDefaultDMA` function. The file system uses this DMA channel internally to access the NITRO ROM device. Refer to the description on the `CARD_ReadRom` function and `CARD_ReadRomAsync` functions.

## See Also

`FS_DMA_NOT_USE`, `FS_IsAvailable`, `FS_SetDefaultDMA`, `CARD_ReadRom`, `CARD_ReadRomAsync`

## Revision History

08/28/2005 Added link to CARD_ReadRomAsync function in description.
04/28/2005 Added note that DMA Channel 0 cannot be specified.
04/11/2005 Added note that `CARD_Init` is called.
09/24/2004 Fixed links.
07/23/2004 Added caution regarding the ROM archive and DMA channel.
05/14/2004 Added description concerning `FS_DMA_NOT_USE`.
04/13/2004 Added a reference to the `FS_IsAvailable` function.
04/08/2004 Revised description due to the addition of DMA number specification.
04/02/2004 Changed "file system" to "ROM file system".
04/01/2004 Initial version.