$REVOLUTION_SDK_ROOT/build/demos/cntdemo
A sample demo is used here to describe how to develop applications that use data titles with disc emulation.
Prepare the files that will be included in the content file for the data title and place them under the following directory (read dvddata as the appropriate directory if it is not the same as DvdRoot).
|
The game code for the data title is given by {game code} and the index of the content file is given by {index}. The game code for the data title is a000 and the index for the content file is 1 in the sample demo.
To access the content files of the data title you use the CNT library, just as you would for NAND applications. The difference is that you open the content file using CNTInitHandleTitle (whereas you would use CNTInitHandle for a normal NAND application).
In order to use CNTInitHandleTitle you must specify a 64-bit title ID. This title ID can be calculated as follows:
0x00010005 for data titles.
For example, when the game code for a data title is a000, the title ID is 0x0001000561303030 (in ASCII, '0' is 0x30 and 'a' is 0x61).
After the content file has been opened the data can be accessed using the CNT API. For more specific usages, refer to the demo source.
You can access the files under dvddata/datatitle/{game code}/content{index} by building and running datatitledemo.
|
A sample demo is used here to describe how to create data titles and give examples of how to create NAND applications that use data titles.
A data title can be created by specifying the -f option to makeWad when it is run. Be aware that a data title does not include a program, and therefore its content numbers start at 1.
The beginning of the game code specified with the -gc option must be set to a lower-case alphabetic character. It is set to a000 by default.
A data title will be created by performing a build in build/demos/cntdemo with datatitle specified as the target.
|
The process collects the following files together as an archive located in dvddata/content2/ and creates the WAD file for the data title that has this as the content file.
dvddata/archives/content1_a000.arcUse Nmenu to import a data title into Wii console NAND memory. Nmenu can import the WAD file for a data title in the same way that it imports a file for a NAND application.
You can also use the ECDK (E-Commerce Library) to download and import a data title.
By defining the NANDAPP macro as a compiler switch, the CNT API will access a data title in Wii console NAND memory. You can also directly define NANDAPP before including cnt.h in your source code and then perform a build to change the location that will be accessed.
If the datatitledemo application is built with NANDAPP defined, it will access the content files in a000.wad, a data title imported into Wii console NAND memory.
|
Use Nmenu to import and run the bin/RVL/datatitledemoD.wad that is generated.
2008/07/23 Moved datatitledemo under cntdemo.
2008/07/22 Changed descriptions again following changes in the way Nmenu handles data titles. Changed descriptions together with the implementation of disc emulation.
2008/02/13 Changed the description to be in line with the change in the way data titles are handled by Nmenu.
2007/10/11 Initial version.
CONFIDENTIAL