CARD Demos

# CARD Library (CARD) Sample Demos

## Location

`$TwlSDK/build/demos/card`

## Compilation

Move to the `$TwlSDK/build/demos/card` directory and enter the following.

> `% make`

The compilation begins, and the SRL executable file and the NEF or TEF files with binary information are generated in the following directory.

> `$TwlSDK/build/demos/card/sample_name/bin/platform/target/`

For example:

> `$TwlSDK/build/demos/card/backup/bin/ARM9-TS/Release/main.srl`

The above path shows the executable file for the `backup` demo.

## Execution

### For NITRO ROMs

If using the ensata emulator:

- Execute NEF and SRL files with ensata

If using IS-NITRO-DEBUGGER:

- Load and execute an NLF file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from the command line

If using IS-TWL-DEBUGGER:

- Load and execute an NLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from the command line

### For TWL/NITRO Hybrid ROMs

If using IS-NITRO-DEBUGGER:

- Execute an SRL file with IS-NITRO-DEBUGGER
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from the command line

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from the command line

### For TWL Limited ROMs

If using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from the command line

## Description

Name | Directory | Operation
--- | --- | ---
`backup` | `demos` | This simple sample shows how to use the CARD library to access a backup device.
`card-1trom` | `demos` | This demo uses one-time PROM as the ROM type and outputs the transfer speed to the debugger.
`card-mrom` | `demos` | This demo uses mask ROM as the ROM type and outputs the transfer speed to the debugger.
`ctrdg/pullout-1` (included in the Game Pak demo) | `demos` | This sample is included in the Game Pak demo (`$TwlSDK/build/demos/ctrdg`). Detects removal of card and cartridge.

## Operation

`The `card-mrom` demo works properly only in NTR mode.`

## See Also

`CARD Function List`

## Revision History

2008/12/12 Renamed the card-1 demo to the `backup` demo.
2008/07/11 Changed the notation corresponding to TWL.
2005/04/26 Changed term from "1-time ROM" to "one-time PROM."
2005/04/06 Added descriptions of `card-1trom` and `card-mrom` demos.
2005/03/02 Revised descriptions to reflect current support environment conditions.
2004/10/06 Added description regarding `ctrdg/pullout-1` demo.
2004/09/10 Initial version.

CONFIDENTIAL