Environment Settings

Many of the Cafe Developer SDK environment settings on the host PC are variables that are defined in the cafe.bat batch script that is used to open the Cafe Cygwin shell. Other environment settings are maintained in the app.xml, cos.xml, and meta.xml files included in the SDK. For information about these XML files and how to configure them, see Application Configuration.

The most common environment settings are described here.

General System Settings

Cafe SDK Installation Directory

The Cafe SDK installation path is maintained in the $CAFE_ROOT environment variable.

This variable is derived from the location of the cafe.bat script. It is imperative that the script be kept in the Cafe SDK root directory.

Cafe Operating Modes

Boot Modes

The CAT-DEV (devkit) supports two boot modes; NAND mode and PCFS mode. The CAT-DEV boot mode is set by the CAFE_BOOT_MODE environment variable. By default, SDK version 2.04 and later CAT-DEVs boot from NAND but execute applications from the host PC (via PCFS).

For more information on NAND mode and PCFS mode, see the Running Applications Overview.

Application File System Emulation Settings

The application accesses content and game-save data through the following mount points:

Volume Environment Variable Default Emulation Directory Remarks
/vol/save/ $CAFE_SAVE_DIR $CAFE_ROOT/data/save/ Game-save data
/vol/content/ $CAFE_CONTENT_DIR $CAFE_ROOT/data/disc/content/ Application content data

The system mounts these paths automatically when the application is launched and mapped to the appropriate device. This abstracts the application from physical storage devices. Applications can then be installed and launched from any permitted device, with no change to the application code.

The devkit environment takes advantage of this abstraction by using a hardware bridge that allows the host PC to emulate various Cafe storage devices. This means that developers may build and test programs quickly, without installing the programs and assets on an actual optical disc or other distribution media.

For more information about system devices, file systems, and volumes, see:

Emulation Devices

The Cafe development environment supports two emulation devices.

Device Description Remarks
/dev/hfio01/ File-level emulation. Read/Write access. Default emulation device that is mapped to /vol/content during caferun.
/dev/sd01/ Block-level emulation. Read-only access. Limited volume size. Default emulation device that is mapped to /vol/content during cafediscrun.
/dev/odd01/ Block-level emulation. Read-only access. Limited volume size. Default optical device that is mapped to /vol/content during cafediscrun.

Developers may change the default content device for the application file system.

RPX/RPL

On production systems, all of the application executables (RPXs and RPLs) are stored in the system\bin\ghs\cafe\ folder. You may put one RPX and any number of RPLs in this folder.

On devkit systems, the caferun tool automatically copies all RPLs to the directory in which the RPX application file resides. The RPX file can reside anywhere on your host PC.

Users may specify additional locations for RPLs by using the -l option. For more information, see the caferun MAN page.

Headless vs. Bridged Operation

On devkit systems, you may run an application without a connection to the host PC if the system is configured to boot from NAND and the application is loaded onto the devkit built-in hard drive. This configuration is referred to as "standalone" or "headless" mode. This allows you to simulate the retail console system as closely as possible. In this mode:

This mode differs from using HDD emulation in that the host PC is explicitly disconnected or not used.

This mode is a useful checkpoint before starting the process of burning R-discs and testing on the CAT-R system.

It is also useful for large-scale application testing:

For information about configuring "standalone" or "headless" mode, see Configure a CAT-DEV for Standalone Mode


See Also

File System Overview
Mastering Cafe Applications
Running Applications Overview
Set Up the CAT-DEV

Revision History

2013-05-08 Automated cleanup pass.
2013-02-15 Edit pass
2012-04-12 Reordered information in File System Emulation Settings.
2011-02-21 Initial version.


CONFIDENTIAL