# ROM Archive

## Overview

This chapter describes the "ROM Archive" that is provided by default in the file system.

## Specifications

Basic ROM archive operations are shown below. Using the name "rom", which is reserved by the file system, this is automatically loaded when the `FS_Init` function is called. By utilizing CARD functions and accessing an appropriate CARD ROM, this provides archive information in the NitroROM format that it constructed on the CARD ROM.
You can use it from FS functions that access the overlay table.

## Implementation

A ROM archive implementation is shown below. Read callback:
The `CARD_ReadRomAsync` function reads CARD ROM data. It returns `FS_RESULT_PROC_ASYNC` when the process begins, and on completion responds with `FS_RESULT_SUCCESS`. Write callback:
Not supported. Always returns `FS_RESULT_FAILURE`.
User Procedures:

`FS_COMMAND_ACTIVATE` | In order to access the CARD ROM that will follow, calls `CARD_LockRom`.
`FS_COMMAND_IDLE` | In conjunction with the end of CARD ROM access, calls `CARD_UnlockRom`.
`FS_COMMAND_WRITEFILE` | This command is not supported. Will always return `FS_RESULT_UNSUPPORTED`.
Other | Returns `FS_RESULT_PROC_UNKNOWN` and defaults to default commands.

## See Also

`FSArchive, FS_ARCHIVE_PROC_FUNC, FS_SetArchiveProc`

## Revision History

09/24/2004 Initial version.

CONFIDENTIAL