0% found this document useful (0 votes)
81 views28 pages

WiiWare Tutorial

This document provides steps to build a WiiWare game for the Nintendo Wii. It discusses using the CNT API to access files, creating a .wad file, importing to the console's NAND memory, and incorporating an online operations manual using HTML and the Virtual Console Manual Viewer. The total size for a WiiWare game is limited to 40 MB for code and data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views28 pages

WiiWare Tutorial

This document provides steps to build a WiiWare game for the Nintendo Wii. It discusses using the CNT API to access files, creating a .wad file, importing to the console's NAND memory, and incorporating an online operations manual using HTML and the Virtual Console Manual Viewer. The total size for a WiiWare game is limited to 40 MB for code and data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

WiiWare Tutorial

Dan Chang
Senior Software Engineer
Software Development Support Group
Roadmap
• How to build a WiiWare game
• How to incorporate the Users Manual
• Summary
Requirements
• Revolution Development Environment
– NDEV, Firmware 17.2.0 or 21.2.2, RVL SDK
2.4 patch 2+, RSO Library (2006/12/19),
CodeWarrior RVL v3.0 Alpha 5, Cygwin bash,
make, OpenSSL v0.98b-1 (older version;
get it from WarioWorld)
• NADK v1.5 Nmenu patch + common patch
• VCMV v1.8 patch 5
• NAND Application Guidelines & Lotcheck
documents
NADK
• NAND application development kit
• Usual game on NDEV: data files stored in
DvdRoot folder
• NAND applications: collect into .wad file
• Use CNT API to access files in .wad
• NAND apps cannot access optical drive
Steps
• 1. Create the application
• 2. Convert to a NAND application
• 3. Import into NAND
• 4. Execute NAND application
1. Create the Application
• Place data in special location
• Write code to access data using CNT API
• Build and test .ELF
Data Files
• Pick N sequentially starting from 2
– VCMV demo uses 2 through 5
• We'll use N = 6 for this demo
• Create a folder contentN in DvdRoot
• Place all data files in a contentN folder in
DvdRoot
CNT API
• CNT API modeled on DVD API
• Code Changes Overview
– Write code using CNTxxxx API calls
– Or change existing DVDxxxx calls to CNTxxxx
• Can switch between DVD or NAND
versions of CNT API through build process
– No need to change code or #ifdef code
Initialize
#include <revolution/cnt.h>
#define TARGET_CONTENT 6

s32 rv; CNTHandle Cnt;

CNTInit();
rv = CNTInitHandle(TARGET_CONTENT,
&Cnt,
&Allocator1);
Open File

CNTFileInfo fileInfo;

rv = CNTOpen(&Cnt, fileName,
&fileInfo);
Read File
fileSize = CNTGetLength(&fileInfo);

buf = (u8*)MEMAllocFromAllocator(
&Allocator1,
OSRoundUp32B(fileSize));

rv = CNTRead(&fileInfo, (void*)buf,
(u32)OSRoundUp32B(fileSize), 0);

CNTClose(&fileInfo);
Build and Test .elf
$ make dvdrun

• Internally, performs these steps:

$ make
$ ndrun bin/RVL/cntdemoD.elf
2. Convert to NAND app
$ make nandrun

• This actually
– Builds the .wad file
– Runs N Menu
– Imports the .wad file
– Runs the .wad file
Making the .wad
• Internally, performs these steps:
• darchD.exe
– Packs files in contentN folder into .arc file
• makedol.exe
– Converts .elf file into a Revolution executable
format call .dol
• makeWad.exe
– Converts the .dol file + .arc file into a .wad file
– Use -m switch to add a banner
3. Import into NAND
• Use N Menu to import, delete or run
NAND apps
– Text version of System Menu's Wii Channels
N Menu
• Three interactive modes
– Import Mode
• Import .wad from viewer folder in DvdRoot
– Title List Mode
• View .wad files in NAND
• Select .wad file to execute
– SD Browser Mode
• Import .wad from SD Card
Import
• If N Menu isn't in Import Mode, press B
Button repeatedly until screen says
"Import List"
• Highlight .wad file and press A Button to
Import
4. Execute NAND app
• If N Menu isn't in Title List Mode, press B
Button repeatedly until screen says
"Title List"
• Highlight title and press A Button to launch
Setting Game Information
• setncountrycode [ jp | us | eu ]
– Specifies the region encoding
• setnparentalcontrol ESRB6
– Sets E for Everyone (see manual for all)
– Also CERO, USK, PEGI, OFLC
• Issue commands before makeWad.exe
• Use makeWad.exe to set game code
Roadmap
• How to build a WiiWare game
• How to incorporate the Users Manual
• Summary
Operations Manual
• No printed manuals!
• On-line manual accessed via Home Button
Menu
• Author manuals in HTML using provided
templates
• Archive all pages using darchD.exe
• Use Virtual Console Manual Viewer
(VCMV) package to display manual
VCMV
• Manual viewer based upon Opera browser
• Memory footprint while running
– 7 MB of MEM1 for component browser RSO
– ~28 MB of MEM2 during usage (component
browser heap, memory resident fonts,
rendering buffers & texture buffers, browser
work memory, HBM resources, manual
contents (up to ~1.5 MB)
• Memory released when browser not in use
Custom Home Button Menu
NAND Memory Limits
• 40 MB limit for the WiiWare game
• 16 MB limit for the save data
Roadmap
• How to build a WiiWare game
• How to incorporate the Users Manual
• Summary
Summary
• You can start today!
• Use CNT API instead of DVD API to work
with files
• Write manual using HTML
• Incorporate manual using VCMV
• Limit of 40 MB code + data size
Questions?

Ask me during the


reception/breaks
Or e-mail [email protected]

You might also like