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<hr>
18
19<h2>Introduction</h2>
20
21<p>This library operates the GameCube Controller. Applications for Revolution 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 Revolution Standard Controller.</p>
22
23<p>
24<font color=#ff0000><b>Important:</b>Avoid using the PAD library and WPAD library for UI Tool version 3 simultaneously. Doing so can lead to system instability. The WPAD library for UI Tool version 3 can obtain data from the GameCube Controller as well as from the Revolution Standard Controller, but this feature is limited.  (The ability to obtain data from the GameCube Controller is provided for debugging.) For details, see <A href="../wpad/intro.html">WPAD Library Precautions</a></font>.
25</p>
26
27<p>The GameCube Controller supports these features:</p>
28
29<UL>
30<LI>Two analog sticks
31<LI>Two analog/digital triggers (L Button and R Button). When the L Button or R Button is fully pressed, there is a clicking sensation that indicates that the digital switch was activated.
32<LI>One directional pad (+Control Pad)
33<LI>Six digital buttons (A, B, X, Y, Z, Start/Pause).
34<LI>One built-in rumble motor (excluding WaveBird controllers)
35</UL>
36
37<p>
38The Revolution game console has four GameCube Controller ports (Controller Ports) where GameCube Controllers can be attached. From a hardware standpoint, players are not required to plug Controllers into the Controller Ports in order from left to right. Furthermore, players can plug and unplug Controllers while power to the Revolution system is on.
39</p>
40<p>
41The Revolution hardware samples the status of each connected Controller at the interval specified in the program. The video interface controls when Controllers are sampled. (For details, see &quot;Video Interface&quot; in the Graphics Programmer&rsquo;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.
42
43</p>
44<h2>Changes from the Dolphin SDK</h2>
45<p>There are a few changes from the PAD library prepared for the Dolphin SDK. Below is a description of the changes:
46</p>
47<p>
48The following functions were deleted:
49</p>
50<ul>
51<li>PADSetSamplingRate</li>
52<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 instead. </p>
53<li>PADSetSpec</li>
54<p>
55This function specifies the version number of the GameCube Controller that is being used. Because the Revolution can only use GameCube Controllers of a set version number, this function has been deleted.
56</p>
57</ul>
58
59<p>
60The following functions are no longer supported:
61</p>
62<ul>
63<li><a href="./PADSetAnalogMode.html">PADSetAnalogMode</a></li>
64<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 expandability in the types of Controllers that can connect to the Revolution Controller Port. As of March 1, 2006, there is no need for this function.</p>
65</ul>
66
67<h2>Cautions</h2>
68<ul>
69<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 <a href="../vi/VIInit.html"><code>VIInit</code></a> before calling <a href="./PADInit.html"><code>PADInit</code></a> because the Revolution video interface (VI) controls the timing at which Controller data is sampled.
70</li>
71<li>
72The WaveBird does not have a rumble motor.
73</li>
74</ul>
75
76<h2>Process Flow</h2>
77<h3>Initialize PAD</h3>
78<p>
79First, call <a href="./PADInit.html"><code>PADInit</code></a> to initialize the PAD library.
80</p>
81
82<h3>Obtaining Standard Controller Status</h3>
83<p>
84Use the <a href="./PADRead.html"><code>PADRead</code></a> function to get the latest Controller status.
85</p>
86<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.
87</p>
88<h3>Other</h3>
89<ul>
90<li>
91Use 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 completes the sampling of Controller data at the rate specified by <a href="../si/SISetSamplingRate.html"><code>SISetSamplingRate</code></a>.&nbsp;
92</li>
93</ul>
94
95<ul>
96<li>
97You can use the <a href="./PADControlMotor.html"><code>PADControlMotor</code></a> function to control the vibrations of the GameCube Controller in the specified channel.
98</li>
99</ul>
100
101<p>
102Simple <a href="./sampledemos/paddemos.html">demo programs</a> have been prepared using the PAD library. You can also use them as a reference.
103</p>
104
105<h2>Currently Known Bugs</h2>
106<p>
107None.
108</p>
109
110<H2>Revision History</H2>
111<p>
11203/01/2006 Initial version.
113</p>
114
115</body>
116</html>
117