1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>WPADStatus</title>
9</head>
10
11<body>
12
13<h1>WPADStatus</h1>
14
15<H2>Syntax</H2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/wpad.h&gt;
18#include &lt;revolution/wpadBalance.h&gt;
19#include &lt;revolution/wpadGuitar.h&gt;
20#include &lt;revolution/wpadTrain.h&gt;
21
22
23#define WPAD_DPD_MAX_OBJECTS        4
24#define WPAD_PRESS_UNITS            4
25
26// for Core or BalanceBoard
27#define WPAD_BUTTON_LEFT            0x0001
28#define WPAD_BUTTON_RIGHT           0x0002
29#define WPAD_BUTTON_DOWN            0x0004
30#define WPAD_BUTTON_UP              0x0008
31#define WPAD_BUTTON_PLUS            0x0010
32#define WPAD_BUTTON_2               0x0100
33#define WPAD_BUTTON_1               0x0200
34#define WPAD_BUTTON_B               0x0400
35#define WPAD_BUTTON_A               0x0800
36#define WPAD_BUTTON_MINUS           0x1000
37#define WPAD_BUTTON_HOME            0x8000
38
39// for FreeStyle
40#define WPAD_BUTTON_Z               0x2000
41#define WPAD_BUTTON_C               0x4000
42
43// for ClassicStyle, Guitar, Train, etc
44#define WPAD_CL_BUTTON_UP           0x0001
45#define WPAD_CL_BUTTON_LEFT         0x0002
46#define WPAD_CL_TRIGGER_ZR          0x0004
47#define WPAD_CL_BUTTON_X            0x0008
48#define WPAD_CL_BUTTON_A            0x0010
49#define WPAD_CL_BUTTON_Y            0x0020
50#define WPAD_CL_BUTTON_B            0x0040
51#define WPAD_CL_TRIGGER_ZL          0x0080
52#define WPAD_CL_RESERVED            0x0100
53#define WPAD_CL_TRIGGER_R           0x0200
54#define WPAD_CL_BUTTON_PLUS         0x0400
55#define WPAD_CL_BUTTON_HOME         0x0800
56#define WPAD_CL_BUTTON_MINUS        0x1000
57#define WPAD_CL_TRIGGER_L           0x2000
58#define WPAD_CL_BUTTON_DOWN         0x4000
59#define WPAD_CL_BUTTON_RIGHT        0x8000
60
61// for compatibility
62#define WPAD_BUTTON_SELECT          WPAD_BUTTON_MINUS
63#define WPAD_BUTTON_START           WPAD_BUTTON_PLUS
64#define WPAD_BUTTON_SMALL_B         WPAD_BUTTON_2
65#define WPAD_BUTTON_SMALL_A         WPAD_BUTTON_1
66#define WPAD_BUTTON_Z1              WPAD_BUTTON_Z
67#define WPAD_BUTTON_Z2              WPAD_BUTTON_C
68
69
70typedef struct DPDObject
71{
72    s16 x;
73    s16 y;
74    u16 size;
75    u8  traceId;
76} DPDObject;
77
78typedef struct WPADStatus
79{
80    u16       button;
81    s16       accX;
82    s16       accY;
83    s16       accZ;
84    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
85    u8        dev;
86    s8        err;
87} WPADStatus;
88
89typedef struct WPADFSStatus
90{
91    u16       button;
92    s16       accX;
93    s16       accY;
94    s16       accZ;
95    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
96    u8        dev;
97    s8        err;
98    s16       fsAccX;
99    s16       fsAccY;
100    s16       fsAccZ;
101    s8        fsStickX;
102    s8        fsStickY;
103} WPADFSStatus;
104
105typedef struct WPADCLStatus
106{
107    u16       button;
108    s16       accX;
109    s16       accY;
110    s16       accZ;
111    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
112    u8        dev;
113    s8        err;
114    u16       clButton;
115    s16       clLStickX;
116    s16       clLStickY;
117    s16       clRStickX;
118    s16       clRStickY;
119    u8        clTriggerL;
120    u8        clTriggerR;
121} WPADCLStatus;
122
123typedef struct DPDObjEx
124{
125    s16       range_x1;
126    s16       range_y1;
127    s16       range_x2;
128    s16       range_y2;
129    u16       pixel;
130    s8        radius;
131} DPDObjEx;
132
133typedef struct WPADStatusEx
134{
135    u16       button;
136    s16       accX;
137    s16       accY;
138    s16       accZ;
139    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
140    u8        dev;
141    s8        err;
142    DPDObjEx  exp[WPAD_DPD_MAX_OBJECTS];
143} WPADStatusEx;
144
145typedef struct WPADTRStatus
146{
147    u16       button;
148    s16       accX;
149    s16       accY;
150    s16       accZ;
151    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
152    u8        dev;
153    s8        err;
154    u16       trButton;
155    u8        mascon;
156    u8        brake;
157} WPADTRStatus;
158
159typedef struct WPADBLStatus
160{
161    u16       button;
162    s16       accX;
163    s16       accY;
164    s16       accZ;
165    DPDObject obj[WPAD_DPD_MAX_OBJECTS];
166    u8        dev;
167    s8        err;
168    u16       press[WPAD_PRESS_UNITS];
169    s8        temp;
170    u8        battery;
171
172} WPADBLStatus;
173</pre></dd></dl>
174
175<H2>Elements</H2>
176<h3>Common Elements</h3>
177<TABLE class="arguments" border="1" >
178  <TBODY>
179  <tr>
180<TH>button</TH>
181<TD>When a button is pressed, the corresponding bit (<code>WPAD_BUTTON_*</code>) is set to 1.</TD>
182    </tr>
183  <tr>
184<TH>accX</TH>
185<TD>Output of the Motion Sensor's x-component. The resolution is 1024. A value of 0 corresponds to weightlessness (0G). (Outputs in the range of -512 &lt;= <SPAN class="argument">accX</SPAN> &lt; 512.)</TD>
186    </tr>
187  <tr>
188<TH>accY</TH>
189<TD>Output of the Motion Sensor's y-component. The resolution is the same as for <SPAN class="argument">accX</SPAN>.</TD>
190    </tr>
191  <tr>
192<TH>accZ</TH>
193<TD>Output of the Motion Sensor's z-component. The resolution is the same as for <SPAN class="argument">accX</SPAN>.</TD>
194    </tr>
195  <tr>
196<TH>obj[].x</TH>
197<TD>The x-coordinate of the center of mass for the object obtained with the Pointer. The resolution is 1024.</TD>
198    </tr>
199  <tr>
200<TH>obj[].y</TH>
201<TD>The y-coordinate of the center of mass for the object obtained with the Pointer. The resolution is 768.</TD>
202    </tr>
203  <tr>
204<TH>obj[].size</TH>
205<TD>The size of the object obtained with the pointer. The resolution is 128*96.</TD>
206    </tr>
207  <tr>
208<TH>obj[].traceId</TH>
209<TD>The trace ID of the object obtained with the Pointer.</TD>
210    </tr>
211  <tr>
212<TH>dev</TH>
213<TD>The controller type.</TD>
214    </tr>
215  <tr>
216<TH>err</TH>
217<TD>The controller error status.</TD>
218    </tr>
219  </TBODY>
220</TABLE>
221
222<h3><CODE>WPADFSStatus</CODE> Element</h3>
223<TABLE class="arguments" border="1" >
224  <TBODY>
225  <tr>
226<TH>fsAccX</TH>
227<TD>Output of the Nunchuk's motion sensor's x-component. Resolution is 1024. A value of 0 corresponds to weightlessness, or 0G (values are output in the range -512 &lt;= <SPAN class="argument">fsAccX</SPAN> &lt; 512).</TD>
228  </tr>
229  <tr>
230<TH>fsAccY</TH>
231<TD>Output of the Nunchuk's motion sensor's y-component. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD>
232  </tr>
233  <tr>
234<TH>fsAccZ</TH>
235<TD>Output of the Nunchuk's motion sensor's z-component. Resolution is the same as for <SPAN class="argument">fsAccX</SPAN>.</TD>
236  </tr>
237  <tr>
238<TH>fsStickX</TH>
239<TD>Translation data for the x-axis of the analog stick on the Nunchuk is received. The resolution is 256 (values are output in the range -128 &lt;= <SPAN class="argument">fsStickX</SPAN> &lt; 128).</TD>
240  </tr>
241  <tr>
242<TH>fsStickY</TH>
243<TD>Translation data for the y-axis of the analog stick on the Nunchuk is received. The resolution is the same as for <SPAN class="argument">fsStickX</SPAN>.</TD>
244  </tr>
245  </TBODY>
246</TABLE>
247
248<h3><CODE>WPADCLStatus</CODE> Element</h3>
249<TABLE class="arguments" border="1" >
250  <TBODY>
251  <tr>
252<TH>clButton</TH>
253<TD>When a Classic Controller, Master Controller, or Guitar Controller button is pressed, the corresponding bit (<code>WPAD_CL_BUTTON_*</code>) is set to 1.</TD>
254  </tr>
255  <tr>
256<TH>clLStickX</TH>
257<TD>Movement data given in terms of the x-axis for the Classic Controller's L Stick and the Guitar Controller's Control Stick.(-512 &lt;= (Values are output in the range -512 &lt;= <SPAN class="argument">clLStickX</SPAN> &lt; 512.)</TD>
258  </tr>
259  <tr>
260<TH>clLStickY</TH>
261<TD>Movement data given in terms of the y-axis for the Classic Controller's L Stick and the Guitar Controller's Control Stick. The value range is the same as for <SPAN class="argument">clLStickX</SPAN>.</TD>
262  </tr>
263  <tr>
264<TH>clRStickX</TH>
265<TD>Movement data given in terms of the x-axis for the Classic Controller R Stick.(-512 &lt;= (Values are output in the range -512 &lt;= <SPAN class="argument">clRStickX</SPAN> &lt; 512.)</TD>
266  </tr>
267  <tr>
268<TH>clRStickY</TH>
269<TD>Movement data given in terms of the y-axis for the Classic Controller R Stick. The value range is the same as for <SPAN class="argument">clRStickX</SPAN>.</TD>
270  </tr>
271  <tr>
272<TH>clTriggerL</TH>
273<TD>Movement data for the Classic Controller's L Button and the Master Controller's Brake. (Values are output in the range 0 &lt;= <SPAN class="argument">clTriggerL</SPAN> &lt; 256.)</TD>
274  </tr>
275  <tr>
276<TH>clTriggerR</TH>
277<TD>Movement data for the Classic Controller's R Button, the Master Controller's Master Control, and the Guitar Controller's Whammy Bar. The value range is the same as for <SPAN class="argument">clTriggerL</SPAN>.</TD>
278  </tr>
279  </TBODY>
280</TABLE>
281
282<h3><CODE>WPADStatusEx</CODE> Element</h3>
283<TABLE class="arguments" border="1" >
284  <TBODY>
285  <tr>
286<TH>exp[].range_x1</TH>
287<TD>The top-right coordinate (x-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 1024.</TD>
288    </tr>
289  <tr>
290<TH>exp[].range_y1</TH>
291<TD>The top-right coordinate (y-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 768.</TD>
292    </tr>
293  <tr>
294<TH>exp[].range_x2</TH>
295<TD>The bottom-left coordinate (x-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 1024.</TD>
296    </tr>
297  <tr>
298<TH>exp[].range_y2</TH>
299<TD>The bottom-left coordinate (y-axis) of the rectangle enclosing the object obtained by the pointer. Resolution is 768.</TD>
300    </tr>
301  <tr>
302<TH>exp[].pixel</TH>
303<TD>The number of pixels for the object obtained by the pointer. Resolution is 128*96.</TD>
304    </tr>
305  <tr>
306<TH>exp[].radius</TH>
307<TD>The radius of the object obtained by the pointer. Values are calculated based on the size and are output in the range 0 &lt;= <SPAN class="argument">exp[].radius</SPAN> &lt;= 15.</TD>
308    </tr>
309  </TBODY>
310</TABLE>
311
312<h3><CODE>WPADTRStatus</CODE> Element</h3>
313<TABLE class="arguments" border="1" >
314  <TBODY>
315  <tr>
316<TH>trButton</TH>
317<TD>When a Master Controller button is pressed, the corresponding bit (<code>WPAD_CL_BUTTON_*</code>) is set to 1.</TD>
318    </tr>
319  <tr>
320<TH>mascon</TH>
321<TD>Returns the value of the Master Controller's Master Control. (Values are output in the range 0 &lt;= mascon &lt; 256.)</TD>
322    </tr>
323  <tr>
324<TH>brake</TH>
325<TD>Returns the value of the Master Controller's Brake. The value range is the same as for mascon.</TD>
326    </tr>
327  </TBODY>
328</TABLE>
329
330<h3><CODE>WPADBLStatus</CODE> Element</h3>
331<TABLE class="arguments" border="1" >
332  <TBODY>
333  <tr>
334<TH>press</TH>
335<TD>The value of the sensors in the four corners of the Wii Balance Board.</TD>
336    </tr>
337  <tr>
338<TH>temp</TH>
339<TD>The temperature on the surface of the Wii Balance Board.</TD>
340    </tr>
341  <tr>
342<TH>battery</TH>
343<TD>The remaining battery life for the Wii Balance Board.</TD>
344    </tr>
345  </TBODY>
346</TABLE>
347
348<h2>Description</h2>
349<p>
350Each structure shows the state of the Wii Remote, external extension controller, and Wii Balance Board, respectively.
351<ul>
352<li>Number of Controllers</li>
353</ul>
354<blockquote>
355The maximum number of Wii Remotes that can connect is defined as the macro constant below.
356<TABLE class="arguments" border="1" >
357<TR>
358<TH>WPAD_MAX_CONTROLLERS</TH>
359<TD>The maximum number of Wii Remotes that can connect.</TD>
360</TR>
361</table>
362</blockquote>
363
364<ul>
365<li>Button Input</li>
366</ul>
367<blockquote>
368Button inputs are defined with the following macro constants.<br><br> The Wii Remote is equipped with +Control Pad, A, B, 1, 2, -, +, and HOME digital buttons.
369<TABLE class="arguments" border="1" >
370<TR>
371<TH>WPAD_BUTTON_UP</TH>
372<TD>+Control Pad UP on the Wii Remote is being pressed.</TD>
373</TR>
374<TR>
375<TH>WPAD_BUTTON_DOWN</TH>
376<TD>+Control Pad DOWN on the Wii Remote is being pressed.</TD>
377</TR>
378<TR>
379<TH>WPAD_BUTTON_LEFT</TH>
380<TD>+Control Pad LEFT on the Wii Remote is being pressed.</TD>
381</TR>
382<TR>
383<TH>WPAD_BUTTON_RIGHT</TH>
384<TD>+Control Pad RIGHT on the Wii Remote is being pressed.</TD>
385</TR>
386<TR>
387<TH>WPAD_BUTTON_A</TH>
388<TD>The A Button on the Wii Remote is being pressed.</TD>
389</TR>
390<TR>
391<TH>WPAD_BUTTON_B</TH>
392<TD>The B Button on the Wii Remote is being pressed.</TD>
393</TR>
394<TR>
395<TH>WPAD_BUTTON_1</TH>
396<TD>The 1 Button on the Wii Remote is being pressed.</TD>
397</TR>
398<TR>
399<TH>WPAD_BUTTON_2</TH>
400<TD>The 2 Button on the Wii Remote is being pressed.</TD>
401</TR>
402<TR>
403<TH>WPAD_BUTTON_MINUS</TH>
404<TD>The - Button on the Wii Remote is being pressed.</TD>
405</TR>
406<TR>
407<TH>WPAD_BUTTON_PLUS</TH>
408<TD>The + Button on the Wii Remote is being pressed.</TD>
409</TR>
410<TR>
411<TH>WPAD_BUTTON_HOME</TH>
412<TD>HOME on the Wii Remote is being pressed.</TD>
413</TR>
414</TABLE>
415The Nunchuk has the Z and C Buttons.
416<TABLE class="arguments" border="1" >
417<TR>
418<TH>WPAD_BUTTON_Z</TH>
419<TD>The Z Button on the Nunchuk is being pressed.</TD>
420</TR>
421<TR>
422<TH>WPAD_BUTTON_C</TH>
423<TD>The C Button on the Nunchuk is being pressed.</TD>
424</TR>
425</TABLE>
426The Classic Controller has the +Control Pad and the A, B, X, Y, -/SELECT, +/START, HOME, L, R, and Z buttons. The button status for the Wii Remote and the Classic Controller can be obtained independently.
427<TABLE class="arguments" border="1" >
428<TR>
429<TH>WPAD_CL_BUTTON_UP</TH>
430<TD>+Control Pad UP on the Classic Controller is being pressed.</TD>
431</TR>
432<TR>
433<TH>WPAD_CL_BUTTON_DOWN</TH>
434<TD>+Control Pad DOWN on the Classic Controller is being pressed.</TD>
435</TR>
436<TR>
437<TH>WPAD_CL_BUTTON_LEFT</TH>
438<TD>+Control Pad LEFT on the Classic Controller is being pressed.</TD>
439</TR>
440<TR>
441<TH>WPAD_CL_BUTTON_RIGHT</TH>
442<TD>+Control Pad RIGHT on the Classic Controller is being pressed.</TD>
443</TR>
444<TR>
445<TH>WPAD_CL_BUTTON_A</TH>
446<TD>The A Button on the Classic Controller is being pressed.</TD>
447</TR>
448<TR>
449<TH>WPAD_CL_BUTTON_B</TH>
450<TD>The B Button on the Classic Controller is being pressed.</TD>
451</TR>
452<TR>
453<TH>WPAD_CL_BUTTON_Y</TH>
454<TD>The Y Button on the Classic Controller is being pressed.</TD>
455</TR>
456<TR>
457<TH>WPAD_CL_BUTTON_X</TH>
458<TD>The X Button on the Classic Controller is being pressed.</TD>
459</TR>
460<TR>
461<TH>WPAD_CL_TRIGGER_L</TH>
462<TD>The L Button on the Classic Controller is being pressed.</TD>
463</TR>
464<TR>
465<TH>WPAD_CL_TRIGGER_R</TH>
466<TD>The R Button on the Classic Controller is being pressed.</TD>
467</TR>
468<TR>
469<TH>WPAD_CL_TRIGGER_ZL</TH>
470<TD>The ZL Button on the Classic Controller is being pressed.</TD>
471</TR>
472<TR>
473<TH>WPAD_CL_TRIGGER_ZR</TH>
474<TD>The ZR Button on the Classic Controller is being pressed.</TD>
475</TR>
476<TR>
477<TH>WPAD_CL_BUTTON_MINUS</TH>
478<TD>The -/SELECT Button on the Classic Controller is being pressed.</TD>
479</TR>
480<TR>
481<TH>WPAD_CL_BUTTON_PLUS</TH>
482<TD>The +/START Button on the Classic Controller is being pressed.</TD>
483</TR>
484<TR>
485<TH>WPAD_CL_BUTTON_HOME</TH>
486<TD>HOME on the Classic Controller is being pressed.</TD>
487</TR>
488</table>
489The Master Controller has the +Control Pad and the A, B, C, D, SELECT, and START buttons. Each button is treated as a corresponding button on the Classic Controller.
490<TABLE class="arguments" border="1" >
491<TR>
492<TH>WPAD_CL_BUTTON_UP</TH>
493<TD>+Control Pad UP on the Master Controller is being pressed.</TD>
494</TR>
495<TR>
496<TH>WPAD_CL_BUTTON_DOWN</TH>
497<TD>+Control Pad DOWN on the Master Controller is being pressed.</TD>
498</TR>
499<TR>
500<TH>WPAD_CL_BUTTON_LEFT</TH>
501<TD>+Control Pad LEFT on the Master Controller is being pressed.</TD>
502</TR>
503<TR>
504<TH>WPAD_CL_BUTTON_RIGHT</TH>
505<TD>+Control Pad RIGHT on the Master Controller is being pressed.</TD>
506</TR>
507<TR>
508<TH>WPAD_CL_BUTTON_A</TH>
509<TD>The C Button on the Master Controller is being pressed.</TD>
510</TR>
511<TR>
512<TH>WPAD_CL_BUTTON_B</TH>
513<TD>The B Button on the Master Controller is being pressed.</TD>
514</TR>
515<TR>
516<TH>WPAD_CL_BUTTON_Y</TH>
517<TD>The A Button on the Master Controller is being pressed.</TD>
518</TR>
519<TR>
520<TH>WPAD_CL_BUTTON_X</TH>
521<TD>The D Button on the Master Controller is being pressed.</TD>
522</TR>
523<TR>
524<TH>WPAD_CL_BUTTON_MINUS</TH>
525<TD>The SELECT Button on the Master Controller is being pressed.</TD>
526</TR>
527<TR>
528<TH>WPAD_CL_BUTTON_PLUS</TH>
529<TD>The START Button on the Master Controller is being pressed.</TD>
530</TR>
531</TABLE>
532The Guitar Controller has five fret buttons, UP and DOWN on the strum bar, a foot pedal, and the SELECT and START buttons. Each button is treated as a corresponding button on the Classic Controller.
533<TABLE class="arguments" border="1" >
534<TR>
535<TH>WPAD_CL_BUTTON_UP</TH>
536<TD>The strum bar on the Guitar Controller is being raised up.</TD>
537</TR>
538<TR>
539<TH>WPAD_CL_BUTTON_DOWN</TH>
540<TD>The strum bar on the Guitar Controller is being pushed down.</TD>
541</TR>
542<TR>
543<TH>WPAD_CL_BUTTON_A</TH>
544<TD>The green fret button on the Guitar Controller is being pressed.</TD>
545</TR>
546<TR>
547<TH>WPAD_CL_BUTTON_B</TH>
548<TD>The red fret button on the Guitar Controller is being pressed.</TD>
549</TR>
550<TR>
551<TH>WPAD_CL_BUTTON_Y</TH>
552<TD>The blue fret button on the Guitar Controller is being pressed.</TD>
553</TR>
554<TR>
555<TH>WPAD_CL_BUTTON_X</TH>
556<TD>The yellow fret button on the Guitar Controller is being pressed.</TD>
557</TR>
558<TR>
559<TH>WPAD_CL_TRIGGER_ZL</TH>
560<TD>The orange fret button on the Guitar Controller is being pressed.</TD>
561</TR>
562<TR>
563<TH>WPAD_CL_TRIGGER_ZR</TH>
564<TD>The foot pedal on the Guitar Controller is being pressed.</TD>
565</TR>
566<TR>
567<TH>WPAD_CL_BUTTON_MINUS</TH>
568<TD>The SELECT Button on the Guitar Controller is being pressed.</TD>
569</TR>
570<TR>
571<TH>WPAD_CL_BUTTON_PLUS</TH>
572<TD>The START Button on the Guitar Controller is being pressed.</TD>
573</TR>
574</table>
575The Wii Balance Board has only a Power Button, which is treated as the A Button on the Wii Remote.
576<TABLE class="arguments" border="1" >
577<TR>
578<TH>WPAD_BUTTON_A</TH>
579<TD>The Wii Balance Board's Power Button is being pressed.</TD>
580</TR>
581</TABLE>
582</blockquote>
583
584<ul>
585<li>Pointer</li>
586</ul>
587<blockquote>
588The pointer specifications are defined by the following macro constants.
589
590<TABLE class="arguments" border="1" >
591<TR>
592<TH>WPAD_DPD_MAX_OBJECTS</TH>
593<TD>The maximum number of objects that the pointer can detect simultaneously.</TD>
594</TR>
595<TR>
596<TH>WPAD_DPD_ANGLE</TH>
597<TD>The pointer view angle (in degrees).</TD>
598</TR>
599<TR>
600<TH>WPAD_DPD_IMG_RESO_WX</TH>
601<TD>Pointer resolution along the x-axis.</TD>
602</TR>
603<TR>
604<TH>WPAD_DPD_IMG_RESO_WY</TH>
605<TD>Pointer resolution along the y-axis.</TD>
606</TR>
607</table>
608
609<p>
610Object data items are stored in the <SPAN class="argument">obj</SPAN> array in the order in which they are detected by the Pointer. The pointer scans the image captured by the sensor internally from top left to bottom right and outputs object data in the order detected. At the same time, trace IDs are assigned in the order in which the objects are detected.
611</p>
612<p>
613The trace IDs help to judge whether previously obtained data is the same as the currently obtained data. Consider a case where objects A (trace ID=0) and B (trace ID=1) are detected as A and B, respectively, by the previous scan, and then they are detected as B and A, respectively, after the pointer is moved. The output order for the current scan is the reverse of the previous one. However, the trace IDs are in the order of B (using the previously assigned trace ID of 1) and A (using the previously assigned trace ID of 0), and the fact that the data is the same is preserved.
614</p>
615</blockquote>
616
617<ul>
618<li>Motion Sensor</li>
619</ul>
620<blockquote>
621The motion sensor specifications are defined by the macro constant below.
622
623<TABLE class="arguments" border="1" >
624<TR>
625<TH>WPAD_ACC_RESO</TH>
626<TD>The motion sensor's resolution.</TD>
627</TR>
628</table>
629</blockquote>
630
631<ul>
632<li>Controller Type</li>
633</ul>
634<blockquote>
635Controller types are defined with the following macro constants.
636      <TABLE class="arguments" border="1" >
637        <TBODY>
638          <TR>
639<TH>WPAD_DEV_NOT_FOUND</TH>
640<TD>Nothing is connected to the specified channel.</TD>
641          </TR>
642          <TR>
643<TH>WPAD_DEV_CORE</TH>
644<TD>Wii Remote.</TD>
645          </TR>
646          <TR>
647<TH>WPAD_DEV_FREESTYLE</TH>
648<TD>Nunchuk Style.</TD>
649          </TR>
650          <TR>
651<TH>WPAD_DEV_CLASSIC</TH>
652<TD>Classic Style.</TD>
653          </TR>
654          <TR>
655<TH>WPAD_DEV_TRAIN</TH>
656<TD>Wii Remote + Master Controller.</TD>
657          </TR>
658          <TR>
659<TH>WPAD_DEV_GUITAR</TH>
660<TD>Wii Remote + Guitar Controller.</TD>
661          </TR>
662          <TR>
663<TH>WPAD_DEV_BALANCE_CHECKER</TH>
664<TD>Wii Balance Board.</TD>
665          </TR>
666          <TR>
667<TH>WPAD_DEV_FUTURE</TH>
668<TD>A device that will be supported in the future. The device is legitimate, but this External Extension Controller cannot be used with this title. It can be operated as a Wii Remote.</TD>
669          </TR>
670          <TR>
671<TH>WPAD_DEV_NOT_SUPPORTED</TH>
672<TD>A device that cannot be used. This type is selected when an illegal device is plugged in or device recognition fails due to a poor connection with the external extension controller. It can be operated as a Wii Remote.</TD>
673          </TR>
674          <TR>
675<TH>WPAD_DEV_UNKNOWN</TH>
676<TD>Unknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It can be operated as a Wii Remote.</TD>
677          </TR>
678        </TBODY>
679      </TABLE>
680</blockquote>
681<ul>
682<li>Error Status</li>
683</ul>
684<blockquote>
685Error statuses are defined with the following macro constants.
686      <TABLE class="arguments" border="1" >
687        <TBODY>
688          <TR>
689<TH>WPAD_ERR_NONE</TH>
690<TD>A Wii Remote or Wii Balance Board is connected. Each structure contains valid data.</TD>
691          </TR>
692          <TR>
693<TH>WPAD_ERR_NO_CONTROLLER</TH>
694<TD>A Wii Remote or Wii Balance Board is not connected. Each structure does not contain valid data (members other than <SPAN class="argument">err</SPAN> are undefined).</TD>
695          </TR>
696          <TR>
697<TH>WPAD_ERR_TRANSFER</TH>
698<TD>Indicates a problem occurred during communications. Each structure does not contain valid data (members other than <SPAN class="argument">err</SPAN> are undefined).</TD>
699          </TR>
700          <TR>
701<TH>WPAD_ERR_INVALID</TH>
702<TD>The data format of data received from the Wii Remote or Wii Balance Board differs from that set by the <a href="./WPADSetDataFormat.html"><code>WPADSetDataFormat</code></a> function.(Structure members other than <SPAN class="argument">err</SPAN> are undefined.)</TD>
703          </TR>
704          <TR>
705<TH>WPAD_ERR_CORRUPTED</TH>
706<TD>The data in the External Extension Controller is corrupted. The structure members of the External Extension Controller are undefined.</TD>
707          </TR>
708        </TBODY>
709      </TABLE>
710</blockquote>
711
712<H2>See Also</H2>
713<p>
714None.
715</p>
716
717<H2>Revision History</H2>
718<P>
7192008/04/16 Integrated descriptions for external extension controller structures. Deleted <CODE>WPAD_ERR_BUSY</CODE> from the error status.<br>2008/03/17 Revised the description of <CODE>WPAD_DEV_NOT_SUPPORTED</CODE>.<br>2006/09/22 Added <CODE>WPAD_ERR_CORRUPTED</CODE>.<br>2006/08/15 Changed the description of <CODE>WPAD_ERR_INVALID</CODE>.<br>2006/06/19 Added define, renamed the external extension controller, renamed buttons, and revised the <CODE>WPAD_DEV_DOLPHIN</CODE> explanation.<br>2005/10/27 Changed the acceleration resolution from 2,048 to 1,024. Changed the interface from EXI to SI.<br>2005/09/27 Changed the name to DPD. Deleted the note regarding the <CODE>DPDObject</CODE> member variables <SPAN class="argument">size</SPAN> and <SPAN class="argument">traceID</SPAN>. Changed the DPD description.<br>2005/08/30 Modified the description of button placement and added a note that the member variable of the <CODE>DPDObject</CODE> structure will change.<br>2005/08/01 Initial version.<br>
720</P>
721
722<hr><p>CONFIDENTIAL</p></body>
723</HTML>