1<html> 2 3<head> 4<meta name="GENERATOR" content="Microsoft FrontPage 5.0"> 5<meta name="ProgId" content="FrontPage.Editor.Document"> 6<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<base target="main"> 9<title>Introduction to GameCube Controller (PAD)</title> 10</head> 11 12<body> 13 14 15<h1>GameCube Controller (PAD) API Description</h1> 16 17<h2>Introduction</h2> 18<p>This library operates the GameCube Controller. Applications for Wii can use the GameCube Controller. This manual describes the GameCube Controller's features and API. See the <A href="../wpad/list.html">WPAD Library</A> when using the Wii standard controller.</p> 19 20<p>The GameCube Controller supports these features:</p> 21 22<UL> 23<LI>Two analog sticks 24<LI>Two analog/digital triggers (L and R). When a trigger is fully pressed, there is a clicking sensation indicating that the digital switch has activated. 25<LI>One directional keypad (+Control Pad) 26<LI>Six digital buttons (A, B, X, Y, Z, START/PAUSE). 27<LI>One built-in rumble motor (except for WaveBird controllers) 28</UL> 29 30<p> 31The Wii game console has four GameCube Controller Sockets (Controller Sockets) where GameCube Controllers can be attached. From a hardware standpoint, players are not required to plug Controllers into Controller Sockets in order from left to right. Furthermore, players can plug and unplug Controllers while power to the Wii system is on. 32</p> 33<p> 34The Wii hardware samples the status of each connected Controller at the interval specified in the program. The video interface controls the timing of Controller sampling (for details, see <EM>Video Interface</EM> in the Graphics Programmer’s Guide). Controller status is stored in a serial interface register and can be read by the CPU at any time. The GameCube Controller library (PAD) provides a set of function groups for communications between the application and the GameCube Controller. 35 36</p> 37<h2>Changes from the Dolphin SDK</h2> 38<p>There are a few changes from the PAD library prepared for the Dolphin SDK. Below is a description of the changes: 39</p> 40<p> 41The following functions were deleted. 42</p> 43<ul> 44<li><CODE>PADSetSamplingRate</CODE></li> 45<p>This function sets the rate for sampling the Controller information in units of milliseconds. The function was retained in the Dolphin SDK in order to maintain compatibility in the source code, but this time it has been deleted. Use the <a href="../si/SISetSamplingRate.html"><CODE>SISetSamplingRate</CODE></a> function from now on.</p> 46<li><CODE>PADSetSpec</CODE></li> 47<p> 48This function specifies the version number of the GameCube Controller that is being used. Because the Wii can only use GameCube Controllers of a set version number, this function has been deleted. 49</p> 50</ul> 51 52<p> 53The following functions are no longer supported. 54</p> 55<ul> 56<li><a href="./PADSetAnalogMode.html"><CODE>PADSetAnalogMode</CODE></a></li> 57<p>This function specifies analog mode for the GameCube Controller that is being used. It has been left in the library in order to maintain extensibility in the types of Controllers that can connect to the Controller Sockets. As of March 1, 2006, there is no need for this function.</p> 58</ul> 59 60<h2>Notes</h2> 61<ul> 62<li>Before calling the <a href="./PADInit.html"><CODE>PADInit</CODE></a> function, be sure to call the <a href="../vi/VIInit.html"><CODE>VIInit</CODE></a> function to initialize the VI. You need to initialize VI using the <a href="../vi/VIInit.html"><CODE>VIInit</CODE></a> function before calling the <a href="./PADInit.html"><CODE>PADInit</CODE></a> function because the Wii video interface (VI) controls the timing at which Controller data is sampled. 63</li> 64<li> 65The WaveBird does not have a rumble motor. 66</li> 67</ul> 68 69<h2>Process Flow</h2> 70<h3>Initialize PAD</h3> 71<p> 72First, call the <a href="./PADInit.html"><CODE>PADInit</CODE></a> function to initialize the PAD library. 73</p> 74 75<h3>Getting Controller Information</h3> 76<p> 77Use the <a href="./PADRead.html"><CODE>PADRead</CODE></a> function to get the latest Controller status. 78</p> 79<p>The default sampling rate for getting Controller status is initialized so that the program can get the latest Controller status each time the <a href="./PADRead.html"><CODE>PADRead</CODE></a> function is called immediately after a vertical retrace interrupt. This sampling rate can be changed by the <a href="../si/SISetSamplingRate.html"><CODE>SISetSamplingRate</CODE></a> function. 80</p> 81<h3>Other</h3> 82<ul> 83<li> 84Use the <a href="./PADSetSamplingCallback.html"><CODE>PADSetSamplingCallback</CODE></a> function to register the Controller sampling callback. The specified callback function is called every time Hollywood finishes sampling Controller data at the rate specified by the <a href="../si/SISetSamplingRate.html"><CODE>SISetSamplingRate</CODE></a> function. 85</li> 86</ul> 87 88<ul> 89<li> 90You can use the <a href="./PADControlMotor.html"><CODE>PADControlMotor</CODE></a> function to control the Rumble feature of the GameCube Controller on the specified channel. 91</li> 92</ul> 93 94<p> 95Simple <a href="./sampledemos/paddemos.html">demo programs</a> have been prepared using the PAD library. You can also use them as a reference. 96</p> 97 98<h2>Currently Known Bugs</h2> 99<p> 100None. 101</p> 102 103<H2>Revision History</H2> 104<p> 1052008/05/08 Deleted notes regarding the UI Tool Version 3.<br>2006/03/01 Initial version.<br> 106</p> 107 108<hr><p>CONFIDENTIAL</p></body> 109</html> 110