WFS Demos

# Wireless File System (WFS) Library Sample Demos

## Compilation

Open a directory containing a sample demo 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/(sample_demo_directory)/bin/(platform)/(target)/`

For example:

> `$TwlSDK/build/demos/mb/multiboot-wfs/bin/ARM9-TS/Release/main.srl`

is the executable file for the `multiboot-wfs` demo.

## Execution

### For NITRO ROMs

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 a 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 a 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 a 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 a 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 a command line

Because many of the WFS library sample demos use DS Download Play, you need a number of development machines, all with the same communications environment (wireless or wired).
`$TwlSDK/bin/ARM9-TS/Rom/mb_child_NITRO.srl` and `mb_child_TWL.srl` are samples providing the same functionality as the DS Download Play on the Nintendo DS system, so load the programs into the other machines and execute them together.
Depending on the options set for IS-NITRO-DEBUGGER, a dialog box containing the message "The transfer destination address on the ARM9 Processor is incorrect" appears when the program is loaded. Select NO to proceed with loading.

## Description

Name | Directory | Operation
--- | --- | ---
`$TwlSDK/build/demos/wireless_shared/wfs` | `demos` | This sample code demonstrates a simple procedure for hooking the WFS library to MP communications. Several sample demos to be described later access this code as a shared process.

`$TwlSDK/build/demos/wbt/wbt-fs`

`demos`

This is the simplest sample using the WFS library that provides a file system from the parent device program to the child device program.
This program must be executed twice, once for the parent and once again for the child, so that they may communicate. The `$TwlSDK/build/demos/wireless_shared/wc` sample code is used as the framework for MP communications.
The sample code in `$TwlSDK/build/demos/wireless_shared/wfs` is used for hooking operations for MP communications.

`$TwlSDK/build/demos/mb/multiboot-wfs`

`demos`

This sample uses the MB library to download a program to the Nintendo DS and then reconnect to that program to provide a wireless file system to the child device program.
The `$TwlSDK/build/demos/wireless_shared/wc` sample code is used as the framework for MP communications.
The sample code in `$TwlSDK/build/demos/wireless_shared/wfs` is used for hooking operations for MP communications.

`$TwlSDK/build/demos/wm/wireless-all`

`demos`

This is a comprehensive sample of DS Multi-Card Play.
Performing DS Download Play using the clone boot functionality of the MB library, this sample program provides a wireless file system by reconnecting to the downloaded child program and performing data sharing communications.
The sample code contained in `$TwlSDK/build/demos/wireless_shared/wh` is used as the framework for MP communications.
The sample code in `$TwlSDK/build/demos/wireless_shared/wfs` is used for hooking operations for MP communications.

## Operation

The WFS library demo does not work properly on `ensata`.

The `wireless-all` demo works only in NTR mode.

## See Also

WFS Function List

## Revision History

2008/07/11 Changed descriptions to support TWL.
2007/06/15 Initial version.

CONFIDENTIAL