readme-wpad_wbc.txt
1===========================================================================
2Nintendo Revolution SDK 3.1 WPAD Library Supporting Wii Balance Board
3February 27, 2008
4===========================================================================
5
6Table of Contents
7- Introduction
8- Installation Procedure
9- Cautions
10- Revision History
11- File List
12
13=======================================================================
14Introduction
15=======================================================================
16This is the WPAD library of Revolution SDK 3.1 with additional capability to recognize the Wii Balance Board.
17
18=======================================================================
19System Requirements
20=======================================================================
21A system running Revolution SDK 3.1 Patch 4 is required.
22
23=======================================================================
24Installation Procedure
25=======================================================================
26We recommend that you back up the Revolution SDK before installing this package.
27
28Expand this package, and copy its contents to the $(REVOLUTION_SDK_ROOT) directory.
29
30=======================================================================
31Cautions
32=======================================================================
33Installation of this package results in an SDK that supports the Wii Balance Board.
34Do not install this package when developing applications that do not support the Wii Balance Board.
35
36
37The library must be replaced for applications that use the Wii Balance Board. Include kpad.h if you are using the KPAD library and wpadBalance.h otherwise.
38
39
40Pairing
41
42To use the Wii Balance Board, it must first be paired with a Wii console. Normal-pair the Wii Balance Board by pressing SYNC on the Wii console and on the Wii Balance Board at the same time.
43
44Only a single Wii Balance Board can be paired with a Wii console. Be aware that if a new Wii Balance Board is paired with a console that already has a Wii Balance Board paired to it, the earlier pairing information will be overwritten.
45
46
47Sharing Process for Pairing Information
48
49A process for sharing the Wii Balance Board's pairing information among supporting applications is executed at the time of library initialization. Sharing was not implemented in the Japanese version of WiiFit. Thus, applications that support the Japanese version of Wii Balance Board are required to have a work buffer of approximately 300 KB at the time of library initialization for the sharing process.
50Prior to this release, the buffer had been allocated as static within the library; however, because it is not used after initialization completes, we made a change to a format where a work buffer is passed from the application.
51
52For applications intended for Japan, always call the WPADRegisterBLCWorkarea function before calling WPADInit or KPADInit. Set the buffer passed to this function as 32-byte aligned and make its size at least that given by WPAD_BLCINT_WORK_LEN. This buffer can be freed after the WPADGetStatus function has returned WPAD_STATE_SETUP.
53
54Applications intended for markets other than Japan are not required for calling the WPADRegisterBLCWorkarea function.
55
56
57Device Type
58
59The WPADProbe function or the WPADExtensionCallback function can be used to verify that the connected device is a Wii Balance Board. The device type will be WPAD_DEV_BALANCE_CHECKER in that case.
60
61
62Data Format
63
64If a Wii Balance Board has been connected, change the data format to WPAD_FMT_BALANCE_CHECKER with the WPADSetDataFormat function. This format supports button input and Wii Balance Board input (the four analog sensors, temperature, and battery power value).
65
66If you are using the KPAD library, the data format will be changed automatically within the library.
67
68
69Data Acquisition
70
71After changing the data format, the controller information obtained with the WPADRead function and with autosampling is returned as a WPADBLStatus structure.
72
73When using the KPAD library, get controller information with the KPADGetUnifiedWpadStatus function for the channel to which the Wii Balance Board is connected.
74Be aware that the KPADRead function will always return zero when it is called for the channel to which the Wii Balance Board is connected.
75
76
77Hardware Specification Notes
78
79In accordance with Wii Balance Board specifications, the Wii Balance Board register is actually changed after the send result of a read or write command to the register is notified to the library. Wait for approximately 500ms before accessing the register again after the result notification. NOTE: Take care not to call the WPADGetBLCalibration and WPADControlBLC functions in succession because both functions access the Wii Balance Board register.
80
81
82Demos
83
84Refer to wpadHealthdemo and wbcdemo, which are created in $(REVOLUTION_SDK_ROOT)/build/demos when the package is installed.
85
86
87=======================================================================
88Revision History
89=======================================================================
902008
91February 27:
92* Updated the Programming Guidelines.
93* Added Programming Manual.
94* Added sample demos (simple_wbc and balance).
95* Made revisions (to wbc[D].a): the zero point is initialized only the first time WBCSetupCalibration is called rather than every time.
96* To the readme file, added a cautionary note about this patch.
97
98February 04:
99* Added support for all revisions up through SDK 3.1 Patch 4.
100
101February 01:
102* Added support for all revisions up through SDK 3.1 Patch 3.
103* To the November 14, 2007 and subsequent SDK versions, added a sharing process that executes at the time of library initialization; as a result, the Wii Balance Board's pairing information can be shared with supported applications. The buffer used for this sharing process used to be internally allocated as static in the library. However, because this buffer is only used during initialization, allocation has been changed to a format where a work buffer is passed from the application.
104* Changed the sample demo according to the changes described above.
105* To "Notes," added information about the process for sharing pairing information.
106
107January 24:
108* Updated the WBCGetTGCWeight function because the g-force correction used in European market software differs from that used in Japanese and American software.
109
1102007
111December 10:
112* Updated the Guidelines.
113* Updated wbc[D].a. (Changed the threshold for determining when a person has stepped on the Wii Balance Board.)
114* Corrected a problem where execution would terminate on an exception if a Mutex was used within the allocator function passed to WPADRegisterAllocator.
115
116November 20:
117* Re-created the package due to omitted content.
118
119November 19:
120* When the Wii Balance Board was connected and the KPADRead function called, there was a bug that would cause the function to end without enabling interrupts. This problem has been corrected.
121
122November 14:
123* Added support for SDK 3.1 Patch 2.
124* Added KPAD library support for the Wii Balance Board.
125* Changed so that pairing information for the Wii Balance Board is retained automatically after a reset. For this reason, the following functions were added and deleted.
126 [Added]
127 - WPADIsRegisteredBLC()
128[Deleted]
129 - WPADRegisterDevice()
130 - WPADGetDeviceKey()
131 - WPADGetDeviceName()
132* Changed so that the remaining battery life for the Wii Balance Board can be obtained with the WPADGetInfo(Async) function and the battery member of the WPADBLStatus structure. However, the WPADBLStatus structure's battery member is a value from 0 to 255 returned by the hardware. On the other hand, be aware that the WPADInfo structure's battery member for the WPADGetInfo(Async) function is returned in WPAD_BATTERY_LEVEL_* format. The value of the WPADBLStatus structure's battery member can be converted into WPAD_BATTERY_LEVEL_* format with the WBCGetBatteryLevel function.
133 Also, because the WPADGetInfo(Async) function sends a command to the Wii Balance Board to get values, several tens of milliseconds will pass before the result is available.
134
135October 12:
136* Fixed a problem that prevented the Balance Board from being simple-paired when the WPADRegisterDevice function was run for the first time.
137
138October 03:
139* Changed WBCInit to WBCSetupCalibration.
140* Added WBCGetCalibrationStatus.
141* Expanded and revised the Function Manual and Introduction.
142
143September 28:
144* Fixed a bug in temperature correction (wbc[D].a)
145
146September 26:
147* Added guidelines.
148* Added a cautionary note to the readme file regarding lack of kpad support.
149
150September 11:
151* Removed remaining battery power update from the WPADControlBLC function commands and added temperature update.
152* WPAD_ERR_BUSY is now returned when the address where the calibration values are written is passed to the WPADGetBLCalibration function.
153
154August 10:
155* Added support for all revisions up through SDK 3.1 RC2.
156* Changed the device name to Wii Balance Board.
157
158June 28:
159* Added support for all revisions up through SDK 3.0 Patch 4.
160* Fixed a problem where the information for a normal-paired Wii Remote would be lost if a Wii Balance Board was paired and then shutdown abnormally (for example, if ndstop or similar was used on NDEV to suddenly terminate an application). -> The bug fix in the Jun 22 revision was found to have this problem if shutdown was performed improperly twice in a row.
161
162 This bug was due to the fact that during initialization and shutdown processing for applications built with prior versions of the SDK, if any device other than a Wii Remote was paired, a portion of the pairing information written to the Wii console NAND memory would be missing. In order to fix the bug, the following changes were made to the specification for paring the Wii Balance Board.
163
164 Old Specification:
165 * The Wii Balance Boards will be normal-paired with the same processing as the Wii Remote. In other words, if 10 or more Wii Remotes are paired, the Wii Balance Board pairing information might have been overwritten.
166 * Multiple Wii Balance Boards can be paired.
167 * Pairing information is deleted at reset or shutdown.
168
169 New Specification:
170 * The Wii Balance Board will be normal-paired, but its registration data will not be overwritten even if 10 or more Wii Remotes are paired.
171 * Only a single Wii Balance Board can be paired.
172 * Pairing information is deleted at reset or shutdown.
173
174* Updated the WPADRegisterDevice function reference.
175
176June 22:
177* Added support for all revisions up through SDK 3.0 Patch 3.
178* Fixed a problem where the information for a normal-paired Wii Remote would be lost if a Wii Balance Board was paired and then shutdown abnormally (For example, if ndstop or similar was used on NDEV to suddenly terminate an application).
179
180June 14:
181* Added the Function Reference to the package, as it was not included.
182
183May 31:
184* Added a Function Reference.
185* Added the WPAD_BLCMD_BAT command to the WPADControlBLC function.
186
187May 30:
188* Changed the API of the WPADGetBLCalibration function.
189* Added a caution concerning Wii Balance Board register access to Cautions.
190
191May 29:
192* Initial version.
193
194=======================================================================
195File List
196=======================================================================
197/build/demos/wbcdemo/src/simple_wbc.c
198/build/demos/wbcdemo/src/balance.c
199/build/demos/wbcdemo/src/handling_weight.c
200/build/demos/wbcdemo/makefile
201/build/demos/wpadHealthdemo/src/handling.c
202/build/demos/wpadHealthdemo/makefile
203/include/revolution/kpad.h
204/include/revolution/wbc.h
205/include/revolution/wpad.h
206/include/revolution/wpadBalance.h
207/man/en_US/wbc/image/wbc.gif
208/man/en_US/wbc/demo_private.html
209/man/en_US/wbc/index.html
210/man/en_US/wbc/intro_private.html
211/man/en_US/wbc/list_private.html
212/man/en_US/wbc/toc_private.html
213/man/en_US/wbc/WBCGetBatteryLevel.html
214/man/en_US/wbc/WBCGetCalibrationStatus.html
215/man/en_US/wbc/WBCGetTGCWeight.html
216/man/en_US/wbc/WBCRead.html
217/man/en_US/wbc/WBCSetupCalibration.html
218/man/en_US/wbc/WBCSetZEROPoint.html
219/man/en_US/wpad/sampledemos/healthdemos.html
220/man/en_US/wpad/list.html
221/man/en_US/wpad/toc.html
222/man/en_US/wpad/WPADBLStatus.html
223/man/en_US/wpad/WPADControlBLC.html
224/man/en_US/wpad/WPADGetBLCalibration.html
225/man/en_US/wpad/WPADIsRegisteredBLC.html
226/man/en_US/wpad/WPADRegisterBLCWorkarea.html
227/RVL/lib/kpad.a
228/RVL/lib/kpadD.a
229/RVL/lib/wbc.a
230/RVL/lib/wbcD.a
231/RVL/lib/wpad.a
232/RVL/lib/wpadD.a
233/RVL/lib/wud.a
234/RVL/lib/wudD.a
235/readme-wpad_wbc.txt
236/WBC_Guidelines.pdf
237/WBC.pdf
238
239