1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML><HEAD> 3 <META http-equiv="Content-Type" content="text/html; charset=utf-8"> 4 <META http-equiv="Content-Style-Type" content="text/css"> 5<TITLE>CTR-SDK API Guide</TITLE> 6 <LINK rel="stylesheet" href="./css/manpage.css" type="text/css"> 7 <style> 8 <!-- 9 .disabled 10 { 11 color: gray; 12 } 13 th 14 { 15 white-space: nowrap; 16 } 17 thead th 18 { 19 width: auto; 20 } 21 --> 22 </style> 23</HEAD><BODY> 24<h1>CTR-SDK API Guide</h1> 25<h2>Overview</h2> 26 <p> 27This guide provides the following two types of information to allow developers to understand the features provided by the CTR-SDK. 28 </p> 29 <ul> 30<li>An overview of each library provided by the CTR-SDK 31<li>An index of functions, sorted by feature and purpose 32 </ul> 33<h2>Contents</h2> 34 <ul> 35<li><a href="#des">Library Overview</a> 36<li><a href="#rev">Index of Functions (by Category)</a> 37 <ul> 38<li><a href="#graphics">Graphics</a> 39<li><a href="#sound">Sound</a> 40<li><a href="#hid">User Input</a> 41<li><a href="#info">Getting Information Other Than User Input</a> 42<li><a href="#comm">Communication</a> 43<li><a href="#calc">Calculation</a> 44<li><a href="#pow">Power and Application Controls</a> 45<li><a href="#debug">Debugging</a> 46<li><a href="#os">OS Foundation</a> 47<li><a href="#fs">File System</a> 48<li><a href="#home">HOME Menu</a> 49<li><a href="#applet">Applets</a> 50<li><a href="#pre">Built-In Software</a> 51<li><a href="#setting">System Settings</a> 52<li><a href="#parental">Parental Controls</a> 53 </ul> 54 </ul> 55 <a name="des"></a> 56<h2>Library Overview</h2> 57 <p> 58 </p> 59 <table> 60 <thead> 61<tr><th>Library Name 62<th>Overview 63 </thead> 64<tr><th><a href="nn/init/Overview.html"><CODE>init</CODE></a> 65<td>Handles processing that precedes a program's <CODE>main</CODE> function. By providing functions with particular names, applications can add processing that runs before the <CODE>main</CODE> function starts. 66<tr><th><a href="nn/os/Overview.html"><CODE>os</CODE></a> 67<td>Handles threads, mutexes, timers, clocks, and basic memory management. 68<tr><th><a href="nn/fnd/Overview.html"><CODE>fnd</CODE></a> 69<td>Defines common classes used by a number of other libraries, such as allocators, dates, and times. 70<tr><th><a href="nn/fs/Overview.html"><CODE>fs</CODE></a> 71<td>Accesses Game Cards, SD Cards, save data, and other memory locations. 72<tr><th><a href="nn/ro/Overview.html"><CODE>ro</CODE></a> 73<td>Controls dynamic modules. 74<tr><th><a href="nn/math/Overview.html"><CODE>math</CODE></a> 75<td>Defines numeric functions and classes. 76<tr><th><a href="nn/nstd/Overview.html"><CODE>nstd</CODE></a> 77<td>The customized version of the standard library function. 78<tr><th><a href="nn/util/Overview.html"><CODE>util</CODE></a> 79<td>Defines general-purpose classes. 80<tr><th><a href="nn/cx/Overview.html"><CODE>cx</CODE></a> 81<td>Compresses and expands data. 82<tr><th><a href="introduction/AboutZlib.html"><CODE>zlib</CODE></a> 83<td>The CTR-SDK ported version of the open-source <CODE>zlib</CODE> library. 84<tr><th><a href="nn/crypto/Overview.html"><CODE>crypto</CODE></a> 85<td>Handles encryption-related processing. 86<tr><th><a href="nn/jpeg/CTR/Overview.html"><CODE>jpeg</CODE></a> 87<td>Encodes and decodes <CODE>JPEG</CODE> and <CODE>MPO</CODE> images. 88<tr><th><a href="nn/enc/Overview.html"><CODE>enc</CODE></a> 89<td>Provides conversion back and forth between UTF-16 and UTF-8. 90<tr><th><a href="nn/applet/CTR/Overview.html"><CODE>applet</CODE></a> 91<td>Controls the HOME Menu and Sleep Mode. 92<tr><th><a href="nn/ptm/CTR/Overview.html"><CODE>ptm</CODE></a> 93<td>Gets power status and controls the real-time clock alarms. 94<tr><th><a href="nn/pl/CTR/Overview.html"><CODE>pl</CODE></a> 95<td>Handles pedometer step counts and shared fonts. 96<tr><th><a href="nn/news/CTR/Overview.html"><CODE>news</CODE></a> 97<td>Posts messages to Notifications. 98<tr><th><a href="nn/cfg/CTR/Overview.html"><CODE>cfg</CODE></a> 99<td>Gets the settings stored in System Memory. 100<tr><th><a href="nn/dbg/Overview.html"><CODE>dbg</CODE></a> 101<td>Handles debug output and abnormal program termination. 102<tr><th><a href="nn/hio/CTR/Overview.html"><CODE>hio</CODE></a> 103<td>Communicates with a Windows PC through USB. This library can be used only for development purposes. 104<tr><th><a href="nn/midi/CTR/Overview.html"><CODE>midi</CODE></a> 105<td>Uses UIC-MIDI to communicate with a MIDI interface. This library can be used only for development purposes. 106<tr><th><a href="nn_gx/Overview.html"><CODE>nngx</CODE></a>, <a href="nn/gx/CTR/Overview.html"><CODE>nn::gx</CODE></a> 107<td>Controls the GPU. 108<tr><th><a href="gl/Overview.html"><CODE>gl</CODE></a> 109<td>Creates command lists. It uses an OpenGL ES-compatible API, but it increases the CPU load. 110<tr><th><a href="nn/gd/CTR/Overview.html"><CODE>gd</CODE></a> 111<td>Creates command lists. It is incompatible with OpenGL ES, but it reduces the CPU load. 112<tr><th><a href="nn/gr/CTR/Overview.html"><CODE>gr</CODE></a> 113<td>Provides helper functions for creating command lists. 114<tr><th><a href="nn/ulcd/CTR/Overview.html"><CODE>ulcd</CODE></a> 115<td>Generates appropriate camera matrices based on input from the 3D depth slider. 116<tr><th><a href="nn/tpl/CTR/Overview.html"><CODE>tpl</CODE></a> 117<td>A library for accessing TPL files, which hold texture data. 118<tr><th><a href="nn/font/CTR/Overview.html"><CODE>font</CODE></a> 119<td>A library for rendering characters and strings using font data created by FontConverter. 120<tr><th><a href="nn/snd/CTR/Overview.html"><CODE>snd</CODE></a> 121<td>Uses the sound DSP for sound playback. 122<tr><th><a href="nn/dsp/CTR/Overview.html"><CODE>dsp</CODE></a> 123<td>Controls the sound DSP. 124<tr><th><a href="nn/hid/CTR/Overview.html"><CODE>hid</CODE></a> 125<td>Reads input from buttons, the Circle Pad, the Touch Screen, the accelerometer, and the gyro sensor. 126<tr><th><a href="nn/camera/CTR/Overview.html"><CODE>camera</CODE></a> 127<td>Controls the cameras. 128<tr><th><a href="nn/y2r/CTR/Overview.html"><CODE>y2r</CODE></a> 129<td>Converts YUV image data into RGB format. 130<tr><th><a href="nn/mic/CTR/Overview.html"><CODE>mic</CODE></a> 131<td>Gets input from the microphone. 132<tr><th><a href="nn/uds/CTR/Overview.html"><CODE>uds</CODE></a> 133<td>Handles direct wireless communication between CTR systems. 134<tr><th><a href="nn/rdt/CTR/Overview.html"><CODE>rdt</CODE></a> 135<td>Establishes reliable communication channels on top of UDS communication channels. 136<tr><th><a href="nn/dlp/CTR/Overview.html"><CODE>dlp</CODE></a> 137<td>Handles Download Play. 138<tr><th><a href="nn/cec/CTR/Overview.html"><CODE>cec</CODE></a> 139<td>Controls StreetPass. 140<tr><th><a href="nn/boss/Overview.html"><CODE>boss</CODE></a> 141<td>Controls SpotPass. 142<tr><th><a href="nn/ac/CTR/Overview.html"><CODE>ac</CODE></a> 143<td>Connects to access points. 144<tr><th><a href="nn/http/Overview.html"><CODE>http</CODE></a> 145<td>Used by <a href="#NEX">NEX</a>. 146<tr><th><a href="nn/socket/Overview.html"><CODE>socket</CODE></a> 147<td>Used by <a href="#NEX">NEX</a>. 148<tr><th><a href="nn/ir/CTR/Overview.html"><CODE>ir</CODE></a> 149<td>Performs infrared communication between consoles. 150<tr><th><a href="nn/ndm/CTR/Overview.html"><CODE>ndm</CODE></a> 151<td>Controls communication-related background processing. 152<tr><th><a href="nn/friends/CTR/Overview.html"><CODE>friends</CODE></a> 153<td>Gets information from the friend list. It also controls logging on to online services. 154<tr><th><a href="nn/ngc/CTR/Overview.html"><CODE>ngc</CODE></a> 155<td>Checks strings for profanity. 156<tr><th><a href="nn/ubl/Overview.html"><CODE>ubl</CODE></a> 157<td>Manages the user blacklist. 158<tr><th><a href="nn/erreula/CTR/Overview.html"><CODE>erreula</CODE></a> 159<td>Controls the applet that displays the EULA error message. 160<tr><th><a href="nn/swkbd/CTR/Overview.html"><CODE>swkbd</CODE></a> 161<td>Controls the software keyboard applet. 162<tr><th><a href="nn/phtsel/CTR/Overview.html"><CODE>phtsel</CODE></a> 163<td>Controls the photo selector applet. 164<tr><th><a href="nn/voicesel/CTR/Overview.html"><CODE>voicesel</CODE></a> 165<td>Controls the voice selector applet. 166 </table> 167 <a name="rev"></a> 168<h2>Index by Feature</h2> 169 <p> 170 </p> 171 <a name="graphics"></a> 172<h3>Graphics</h3> 173 <table> 174<tr><th>Screen Display 175<td>Handled by the <a href="nn_gx/Overview.html"><CODE>gx</CODE></a>, <a href="gl/Overview.html"><CODE>gl</CODE></a>, <a href="nn/gd/Overview.html"><CODE>gd</CODE></a>, and <a href="nn/gr/Overview.html"><CODE>gr</CODE></a> libraries. 176<tr><th>Stereoscopic Output 177<td>Use the <a href="nn_gx/Overview.html"><CODE>gx</CODE></a> and <a href="nn/ulcd/CTR/Overview.html"><CODE>ulcd</CODE></a> libraries. 178<tr><th><a name="font">Fonts</a> 179<td>Use the <a href="nn/font/CTR/Overview.html"><CODE>font</CODE></a> library.<br> Use <CODE>FontConverter</CODE> to create font data for the <a href="nn/font/CTR/Overview.html"><CODE>font</CODE></a> library. 180<tr><th>Text Rendering 181<td>→ <a href="#font">Fonts</a> 182<tr><th>Shared Fonts 183<td>Use the <a href="nn/pl/CTR/Overview.html"><CODE>pl</CODE></a> library. 184<tr><th>Texture Files 185<td>Use the <a href="nn/tpl/CTR/Overview.html"><CODE>tpl</CODE></a> library.<br> Use <a href="../TechnicalNotes/TexturePackagerLibrary/TPLTexturePackageTool.pdf"><CODE>ctr_TexturePackager</CODE></a> to create TPL files for the <a href="nn/tpl/CTR/Overview.html"><CODE>tpl</CODE></a> library. 186<tr><th>Encoding and Decoding JPEG Images 187<td>Use the <a href="nn/jpeg/CTR/Overview.html"><CODE>jpeg</CODE></a> library. 188<tr><th>Encoding and Decoding MPO Images 189<td>Use the <a href="nn/jpeg/CTR/Overview.html"><CODE>jpeg</CODE></a> library. 190<tr><th>Encoding and Decoding Stereoscopic Images 191<td>→ <a href="#MPOEncodeDecode">Encoding and Decoding MPO Images</a> 192<tr><th>Converting from YUV to RGB 193<td>Use the <a href="nn/y2r/CTR/Overview.html"><CODE>y2r</CODE></a> library. 194<tr><th class="disabled">Brightness Adjustment 195<td class="disabled">You cannot change the brightness or get the current brightness value. 196<tr><th class="disabled">Power-Saving Mode 197<td class="disabled">You cannot turn power-saving mode on or off, and you cannot get the current mode. 198 </table> 199 <a name="sound"></a> 200<h3>Sound</h3> 201 <table> 202<tr><th>Sound Playback 203<td>Use the <a href="nn/snd/CTR/Overview.html"><CODE>snd</CODE></a> library. 204<tr><th>Shutter Sound 205<td>Play it using <a href="nn/camera/CTR/PlayShutterSound.html"><CODE>nn::camera::CTR::PlayShutterSound</CODE></a>. 206<tr><th>Microphone 207<td>Use the <a href="nn/mic/CTR/Overview.html"><CODE>mic</CODE></a> library to get input audio. 208<tr><th>Using the MIDI Interface (UIC-MIDI) 209<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/midi/CTR/Overview.html"><CODE>midi</CODE></a> library. 210<tr><th>Sound Output Mode 211<td>Use <a href="nn/cfg/CTR/GetSoundOutputMode.html"><CODE>nn::cfg::CTR::GetSoundOutputMode</CODE></a> to get the sound output mode. 212<tr><th><a name="headphone">Headphone Connection Status</a> 213<td>Use <a href="nn/snd/CTR/GetHeadphoneStatus.html"><CODE>nn::snd::CTR::GetHeadphoneStatus</CODE></a> to get the connection status of headphones. 214<tr><th class="disabled">Sound Volume 215<td class="disabled">You cannot get a value for this function. 216 </table> 217 <a name="hid"></a> 218<h3>User Input</h3> 219 <table> 220<tr><th>+Control Pad, A/B/X/Y/L/R Buttons, START 221<td>Use <a href="nn/hid/CTR/PadReader/Overview.html"><CODE>nn::hid::CTR::PadReader</CODE></a> to get input values. 222<tr><th>SELECT 223<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Enable debug mode by using the <CODE>Config</CODE> tool, and call <a href="nn/hid/CTR/EnableSelectButton.html"><CODE>nn::hid::CTR::EnableSelectButton</CODE></a> to get input from <a href="nn/hid/CTR/PadReader/Overview.html"><CODE>nn::hid::CTR::PadReader</CODE></a>. 224<tr><th><a name="slidepad">Circle Pad</a> 225<td>Use <a href="nn/hid/CTR/PadReader/Overview.html"><CODE>nn::hid::CTR::PadReader</CODE></a> to get input values. 226<tr><th>Circle Pad Pro 227<td>Use <CODE><a href="nn/hid/CTR/ExtraPadReader/Overview.html">nn::hid::CTR::ExtraPadReader</a></CODE> to get input values. 228<tr><th>ZL/ZR Buttons 229<td>Use <CODE><a href="nn/hid/CTR/ExtraPadReader/Overview.html">nn::hid::CTR::ExtraPadReader</a></CODE> to get input values. 230<tr><th>Analog Stick 231<td>→ <a href="#slidepad">Circle Pad</a> 232<tr><th><a name="touchpanel">Touch Panel</a> 233<td>Use <a href="nn/hid/CTR/TouchPanelReader/Overview.html"><CODE>nn::hid::CTR::TouchPanelReader</CODE></a> to get input values. 234<tr><th>Touch Screen 235<td>→ <a href="#touchpanel">Touch Panel</a> 236<tr><th>Accelerometer 237<td>Use <a href="nn/hid/CTR/AccelerometerReader/Overview.html"><CODE>nn::hid::CTR::AccelerometerReader</CODE></a> to get input values. 238<tr><th>Gyro Sensor 239<td>Use <a href="nn/hid/CTR/GyroscopeReader/Overview.html"><CODE>nn::hid::CTR::GyroscopeReader</CODE></a> to get input values. 240<tr><th>Pedometer 241<td>Use the <a href="nn/pl/CTR/Overview.html"><CODE>pl</CODE></a> library. 242<tr><th>Camera 243<td>Use the <a href="nn/camera/CTR/Overview.html"><CODE>camera</CODE></a> library to get camera images. 244<tr><th>Microphone 245<td>Use the <a href="nn/mic/CTR/Overview.html"><CODE>mic</CODE></a> library to get input audio. 246<tr><th>Debug Controller 247<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use <a href="nn/hid/CTR/DebugPadReader/Overview.html"><CODE>nn::hid::CTR::DebugPadReader</CODE></a> to get input values. 248<tr><th>3D Depth Slider 249<td>To use this control indirectly, use the <a href="nn/ulcd/CTR/Overview.html"><CODE>ulcd</CODE></a> library. 250<tr><th class="disabled">Sound Volume 251<td class="disabled">You cannot get a value for this function. 252<tr><th>POWER Button 253<td>You cannot get input directly from the POWER Button. <br> → You must handle <a href="#ApiClose">Application Close</a> instead. 254<tr><th>Wireless Switch 255<td>You cannot get the wireless switch input. <br> → However, <a href="#WiFiOFF">wireless-disabled mode</a> has an effect during communication. 256<tr><th>HOME Button 257<td>You cannot get input directly from the HOME Button. <br> → You must handle <a href="#HomeMenuChange">switching to the HOME Menu</a>. 258 </table> 259 <a name="info"></a> 260<h3>Getting Information Other Than User Input</h3> 261 <table> 262<tr><th><a name="BatteryLevel">Remaining Battery Power</a> 263<td>Use <a href="nn/ptm/CTR/GetBatteryLevel.html"><CODE>nn::ptm::CTR::GetBatteryLevel</CODE></a> to get the remaining battery life. 264<tr><th><a name="ACadapter">AC Adapter Connection State</a> 265<td>Use <a href="nn/ptm/CTR/GetAdapterState.html"><CODE>nn::ptm::CTR::GetAdapterState</CODE></a> to get the AC adapter connection state. 266<tr><th><a name="BatteryCharge">Charging Status</a> 267<td>Use <a href="nn/ptm/CTR/GetBatteryChargeState.html"><CODE>nn::ptm::CTR::GetBatteryChargeState</CODE></a> to get the charging status. 268<tr><th>Getting System Settings 269<td>Use the <a href="nn/cfg/CTR/Overview.html"><CODE>cfg</CODE></a> library to get some System Settings. 270<tr><th><a name="DateTime">Date and Time</a> 271<td>Use <a href="nn/fnd/DateTime/Overview.html"><CODE>nn::fnd::DateTime</CODE></a> to get the current date and time.<br> Use <a href="nn/cfg/CTR/GetUserTimeOffset.html"><CODE>nn::cfg::CTR::GetUserTimeOffset</CODE></a> to discover whether and how the time has been changed by the user.<br> Use <a href="nn/os/Tick/Overview.html"><CODE>nn::os::Tick</CODE></a> to get CPU cycle counts. 272<tr><th><a name="UserName">Username</a> 273<td>Use <a href="nn/cfg/CTR/GetUserName.html"><CODE>nn::cfg::CTR::GetUserName</CODE></a> to get the user name. 274<tr><th><a name="Birthday">Birthday</a> 275<td>Use <a href="nn/cfg/CTR/GetBirthday.html"><CODE>nn::cfg::CTR::GetBirthday</CODE></a> to get the birthday. 276<tr><th><a name="Country">Area</a> 277<td>Use <a href="nn/cfg/CTR/GetCountry.html"><CODE>nn::cfg::CTR::GetCountry</CODE></a> to get the country, and use <a href="nn/cfg/CTR/GetSimpleAddress.html"><CODE> nn::cfg::CTR::GetSimpleAddress</CODE></a> to get the local area. 278<tr><th>Headphone Connection Status 279<td>Use <a href="nn/snd/CTR/GetHeadphoneStatus.html"><CODE>nn::snd::CTR::GetHeadphoneStatus</CODE></a> to get the connection status of headphones. 280<tr><th>User Information 281<td>→ <a href="#UserName">Username</a><br> → <a href="#Birthday">Birthday</a><br> → <a href="#Country">Area</a><br> 282<tr><th>Language 283<td>Use <a href="nn/cfg/CTR/GetLanguage.html"><CODE>nn::cfg::CTR::GetLanguage</CODE></a> to get the language. 284<tr><th>Region 285<td>Use <a href="nn/cfg/CTR/GetRegion.html"><CODE>nn::cfg::CTR::GetRegion</CODE></a> to get the region. 286<tr><th>Sound Output Mode 287<td>Use <a href="nn/cfg/CTR/GetSoundOutputMode.html"><CODE>nn::cfg::CTR::GetSoundOutputMode</CODE></a> to get the sound output mode. 288<tr><th>Variable RTC Offset 289<td>Use <a href="nn/cfg/CTR/GetUserTimeOffset.html"><CODE>nn::cfg::CTR::GetUserTimeOffset</CODE></a> to get the variable RTC offset. 290<tr><th>System-Specific ID 291<td>Use <a href="nn/cfg/CTR/GetTransferableId.html"><CODE>nn::cfg::CTR::GetTransferableId</CODE></a> to get the system-specific ID. 292<tr><th>Pedometer 293<td>Use the <a href="nn/pl/CTR/Overview.html"><CODE>pl</CODE></a> library. 294<tr><th>Notification LED 295<td>You cannot manipulate the notification LED directly, or get its state. <br> The following entries describe the illumination and blinking conditions, and provide related information. 296 <ul> 297<li><b>When a notification is received</b><br>Illuminates when a notification is received from <a href="#boss">SpotPass</a>. To send a notification from the server and illuminate the LED, register an application-specific task in <a href="#boss">SpotPass</a>. 298<li><b>When a StreetPass communication is received</b><br>Illuminates when <a href="#cec">StreetPass</a> is engaged. <br> You cannot control this option from the application. 299<li><b>When a friend comes online</b><br>Illuminates when a <a href="#friends">Friend</a> comes online. <br> You cannot control this option from the application. 300<li><b>When the battery level is very low</b><br>Illuminates when the <a href="#BatteryLevel">battery level</a> reaches <CODE><a href="nn/ptm/CTR/BatteryLevel.html">nn::ptm::CTR::BATTERYLEVEL_1</a></CODE>. <br> You cannot control this option from the application. 301 </ul> 302<tr><th>3D LED 303<td>You cannot control or get the state of the 3D LED directly.<br> The 3D LED illuminates when <CODE>NN_GX_DISPLAY_MODE_STEREO</CODE> is specified to <a href="nn_gx/nngxSetDisplayMode.html"><CODE>nngxSetDisplayMode</CODE></a>, as long as <a href="#3Dgx">display of 3D images</a> is not restricted by Parental Controls. 304<tr><th>Power LED 305<td>You cannot control or get the state of the power LED.<br>→ Use the <a href="#BatteryLevel">remaining battery life</a> instead. 306<tr><th>Recharge LED 307<td>You cannot control or get the state of the recharge LED.<br>→ Use the <a href="#BatteryCharge">charging status</a> instead. 308<tr><th>Wireless LED 309<td>You cannot manipulate the wireless LED or get its state. <br> The LED illuminates when wireless communication is activated, and blinks during wireless communication. 310<tr><th>Getting the Execution Environment 311<td>Use <a href="nn/os/CTR/GetRunningTargetHardware.html"><CODE>nn::os::CTR::GetRunningTargetHardware</CODE></a> to get the type of hardware on which an application is running. 312 </table> 313 <a name="comm"></a> 314<h3>Communications</h3> 315 <table> 316<tr><th><a name="cec">StreetPass</a> 317<td>Use the <a href="nn/cec/CTR/Overview.html"><CODE>cec</CODE></a> library. 318<tr><th><a name="boss">SpotPass</a> 319<td>Use the <a href="nn/boss/Overview.html"><CODE>boss</CODE></a> library. 320<tr><th><a name="uds">Direct, Low-Latency Communication Between CTR Systems</a> 321<td>Use the <a href="nn/uds/CTR/Overview.html"><CODE>uds</CODE></a> library. 322<tr><th><a name="rdt">Direct Data Transfers Between CTR Systems</a> 323<td>Use the <a href="nn/rdt/Overview.html"><CODE>rdt</CODE></a> library. 324<tr><th><a name="dlplay">Download Play</a> 325<td>Use the <a href="nn/dlp/CTR/Overview.html"><CODE>dlp</CODE></a> library. 326<tr><th><a name="ir">Infrared Communication</a> 327<td>Use the <a href="nn/ir/CTR/Overview.html"><CODE>ir</CODE></a> library. 328<tr><th><a name="friends">Getting Friend Information</a> 329<td>Use the <a href="nn/friends/CTR/Overview.html"><CODE>friends</CODE></a> library. 330<tr><th>Friend List 331<td>→ <a href="#friends">Getting Friend Information</a> 332<tr><th class="disabled">Friend Registration 333<td class="disabled">Applications cannot register friends. 334<tr><th><a name="NEX">NEX</a> 335<td>→ NEX is distributed with the CTR-NEX package, which is separate from the CTR-SDK. Refer to the CTR-NEX package. 336<tr><th>Online Matchmaking 337<td>→ <a href="#NEX">NEX</a> 338<tr><th>Online Ranking 339<td>→ <a href="#NEX">NEX</a> 340<tr><th>Network Data Storage 341<td>→ <a href="#NEX">NEX</a> 342<tr><th><a name="ac">Connecting to an Access Point</a> 343<td>Use the <a href="nn/ac/CTR/Overview.html"><CODE>ac</CODE></a> library. 344<tr><th>Nintendo Zone 345<td>Use the <a href="nn/ac/CTR/Overview.html"><CODE>ac</CODE></a> library to automatically connect to a Nintendo Zone just like an ordinary access point. 346<tr><th>USB Communication With a Windows PC 347<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/hio/CTR/Overview.html"><CODE>hio</CODE></a> library. 348<tr><th>Posting Messages 349<td>Applications can post messages directly using <a href="nn/news/CTR/user/PostNews.html"><CODE>nn::news::CTR::user::PostNews</CODE></a>.<br> You can also post messages through <a href="#boss">SpotPass</a>. 350<tr><th><a name="internet">Internet Communication</a> 351<td>→ <a href="#ac">Connecting to an Access Point</a><br> → <a href="#boss">SpotPass</a><br> → <a href="#NEX">NEX</a> 352<tr><th><a name="local">Local Communications</a> 353<td>→ <a href="#uds">Direct, Low-Latency Wireless Communication Between CTR Systems</a><br> → <a href="#rdt">Direct Wireless Data Transfers Between CTR Systems</a><br> → <a href="#dlplay">Download Play</a><br>→ <a href="#ir">Infrared Communication</a> 354<tr><th>Nintendo 3DS Service User Agreement 355<td>→ <a href="#EULA">EULA</a> 356<tr><th><a name="EULA">EULA</a> 357<td>You must accept the EULA before you can use <a href="#internet">Internet communication</a>, run <a href="#cec">StreetPass</a>, or get <a href="#friends">friend information</a>. To accept the EULA, use the System Settings or <CODE>Config</CODE>. <br> An application can use <CODE><a href="nn/cfg/CTR/IsAgreedEula.html">nn::cfg::CTR::IsAgreedEula</a></CODE> to find if the user has accepted the EULA. 358<tr><th>Wireless LED 359<td>You cannot manipulate the wireless indicator LED or get its state.<br> The LED illuminates when wireless communication is activated, and blinks during wireless communication. 360<tr><th>Wireless Switch 361<td>You cannot get the wireless switch input.<br> → However, <a href="#WiFiOFF">disabling Wi-Fi</a> during communication has an effect. 362<tr><th><a name="WiFiOFF">Disabled</a> 363<td>If wireless communication is disabled when you initialize a library that uses wireless, you get an error with an error value to indicate that wireless communication is disabled. <br> If wireless communication is disabled from the wireless switch when wireless communication is in use, the sequence transitions to one for disconnecting a connection by a library. 364 </table> 365 <a name="calc"></a> 366<h3>Calculation</h3> 367 <table> 368<tr><th>Matrix and Vector 369<td>Use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library. 370<tr><th>Quaternions 371<td>Use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library. 372<tr><th>Floating-Point Functions 373<td>Use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library. 374<tr><th>Integer Functions 375<td>Use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library. 376<tr><th>Bit Operations 377<td>Use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library. 378<tr><th>Random Number Generation 379<td>Normally you can use the <a href="nn/math/Overview.html"><CODE>math</CODE></a> library for generating pseudo-random numbers.<br/>Use the <a href="nn/crypto/GenerateRandomBytes.html"><CODE>nn::crypto::GenerateRandomBytes</CODE></a> function to generate random numbers that are not repeated. 380<tr><th>CRC Calculations 381<td>Use the <a href="nn/util/Overview.html"><CODE>util</CODE></a> library. 382<tr><th>SHA Calculations 383<td>Use the <a href="nn/crypto/Overview.html"><CODE>crypto</CODE></a> library. 384<tr><th>AES Encryption 385<td>Use the <a href="nn/crypto/Overview.html"><CODE>crypto</CODE></a> library. 386<tr><th>Compression and Decompression 387<td>Use the <a href="nn/cx/Overview.html"><CODE>cx</CODE></a> library or <a href="introduction/aboutZlib.html"><CODE>zlib</CODE></a> library. 388<tr><th>Encoding and Decoding JPEG Images 389<td>Use the <a href="nn/jpeg/CTR/Overview.html"><CODE>jpeg</CODE></a> library. 390<tr><th><a name="MPOEncodeDecode">Encoding and Decoding MPO Images</a> 391<td>Use the <a href="nn/jpeg/CTR/Overview.html"><CODE>jpeg</CODE></a> library. 392<tr><th>Encoding and Decoding Stereoscopic Images 393<td>→ <a href="#MPOEncodeDecode">Encoding and Decoding MPO Images</a> 394 </table> 395 <a name="pow"></a> 396<h3>Power and Application Controls</h3> 397 <table> 398<tr><th>POWER Button 399<td>You cannot get input directly from the POWER Button.<br> → You must handle <a href="#ApiClose">Application Shutdown</a> instead. 400<tr><th>HOME Button 401<td>You cannot get input directly from the HOME Button.<br> → You must handle <a href="#HomeMenuChange">switching to the HOME Menu</a>. 402<tr><th class="disabled">Power Off 403<td class="disabled">Applications cannot turn the system off. 404<tr><th><a name="sleep">Sleep</a> 405<td>Applications cannot go into Sleep Mode autonomously. Applications go into sleep mode according to instructions from the system.<br> For more information, see the <a href="nn/applet/CTR/Overview.html"><CODE>applet</CODE></a> library. 406<tr><th>Sleep Mode 407<td>→ <a href="#sleep">Sleep</a> 408<tr><th><a name="ApiClose">Application Shutdown</a> 409<td>Applications cannot exit autonomously. <br>Applications close according to instructions from the system.<br> For more information, see the <a href="nn/applet/CTR/Overview.html"><CODE>applet</CODE></a> library. 410<tr><th>Application Reset 411<td>Use <a href="nn/applet/CTR/RestartApplication.html"><CODE>nn::applet::CTR::RestartApplication</CODE></a>. 412<tr><th>Remaining Battery Power 413<td>Use <a href="nn/ptm/CTR/GetBatteryLevel.html"><CODE>nn::ptm::CTR::GetBatteryLevel</CODE></a> to get the remaining battery life. 414<tr><th>AC Adapter Connection State 415<td>Use <a href="nn/ptm/CTR/GetAdapterState.html"><CODE>nn::ptm::CTR::GetAdapterState</CODE></a> to get the AC adapter connection state. 416<tr><th>Charging Status 417<td>Use <a href="nn/ptm/CTR/GetBatteryChargeState.html"><CODE>nn::ptm::CTR::GetBatteryChargeState</CODE></a> to get the charging status. 418 </table> 419 <a name="os"></a> 420<h3>OS Foundation</h3> 421 <table> 422<tr><th>Thread 423<td>Use <a href="nn/os/Thread/Overview.html"><CODE>os::Thread</CODE></a>. 424<tr><th>Mutex 425<td>Use the <a href="nn/os/Overview.html"><CODE>os</CODE></a> library. 426<tr><th><a name="tick">Ticks</a> 427<td>Use <a href="nn/os/Tick/Overview.html"><CODE>os::Tick</CODE></a>. 428<tr><th>Cycle Counts 429<td>→ <a href="#tick">Ticks</a> 430<tr><th>Timers 431<td>Use <a href="nn/os/Timer/Overview.html"><CODE>os::Timer</CODE></a>. 432<tr><th><a name="MemoryControl">Memory Management</a> 433<td>Use the <a href="nn/os/Overview.html"><CODE>os</CODE></a> library for basic allocation of memory to your application. You can use the <a href="nn/fnd/Overview.html"><CODE>fnd</CODE></a> library to build an allocator in allocated memory. 434<tr><th>Device Memory 435<td>→ <a href="#MemoryControl">Memory Management</a> 436<tr><th>Exception Handling 437<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Register exception handlers with the <CODE>os</CODE> library (<a href="nn/os/ARM/Overview.html"><CODE>nn::os::ARM</CODE></a>). 438<tr><th><a name="DateTime">Date and Time</a> 439<td>Use <a href="nn/fnd/DateTime/Overview.html"><CODE>fnd::DateTime</CODE></a> to get the current date and time.<br><br> Use <a href="nn/os/Tick/Overview.html"><CODE>os::Tick</CODE></a> to get CPU cycle counts. 440<tr><th><a name="DLL">Dynamic Modules</a> 441<td>Use the <a href="nn/ro/Overview.html"><CODE>ro</CODE></a> library. 442<tr><th>DLL 443<td>→ <a href="#DLL">Dynamic module</a> 444 </table> 445 <a name="fs"></a> 446<h3>File System</h3> 447 <table> 448<tr><th>Game Card 449<td>Use the <a href="nn/fs/Overview.html"><CODE>fs</CODE></a> library.<br> See <a href="nn/fs/MountRom.html"><CODE>nn::fs::MountRom</CODE></a>. 450<tr><th>Save Data 451<td>Use the <a href="nn/fs/Overview.html"><CODE>fs</CODE> library</a>.<br> See <a href="nn/fs/MountSaveData.html"><CODE>nn::fs::MountSaveData</CODE></a>. 452<tr><th>Expanded Save Data 453<td>Use the <a href="nn/fs/Overview.html"><CODE>fs</CODE> library</a>.<br> See <a href="nn/fs/MountExtSaveData.html"><CODE>nn::fs::MountExtSaveData</CODE></a>. 454<tr><th>SD Card 455<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/fs/Overview.html"><CODE>fs</CODE> library</a>.<br> For more information, see <a href="nn/fs/MountSdmc.html"><CODE>nn::fs::MountSdmc</CODE></a>. 456 </table> 457 <a name="debug"></a> 458<h3>Debugging</h3> 459 <table> 460<tr><th>Debug Output 461<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use <a href="nn_dbg/Overview.html">macros for debug string output</a>. 462<tr><th>ASSERT 463<td>Use the <a href="nn_dbg/Overview.html">ASSERT Macro</a>.<br/>Lets you set which handler to call with <CODE><a href="nn/dbg/SetBreakHandler.html">nn::dbg::SetBreakHandler</a></CODE> when the assertion fails. 464<tr><th>USB Communication With a Windows PC 465<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/hio/CTR/Overview.html"><CODE>hio</CODE></a> library. 466<tr><th>Using the MIDI Interface (UIC-MIDI) 467<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/midi/CTR/Overview.html"><CODE>midi</CODE></a> library. 468<tr><th>Debug Controller 469<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use <a href="nn/hid/CTR/DebugPadReader/Overview.html"><CODE>nn::hid::CTR::DebugPadReader</CODE></a> to get input values. 470<tr><th>Exception Handling 471<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Register exception handlers with the <CODE>os</CODE> library (<a href="nn/os/ARM/Overview.html"><CODE>nn::os::ARM</CODE></a>). 472<tr><th>Getting the Execution Environment 473<td>Use <a href="nn/os/CTR/GetRunningTargetHardware.html"><CODE>nn::os::CTR::GetRunningTargetHardware</CODE></a> to get the type of hardware on which an application is running. 474<tr><th>Accessing SD Cards 475<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Use the <a href="nn/fs/Overview.html"><CODE>fs</CODE> library</a>.<br> For more information, see <a href="nn/fs/MountSdmc.html"><CODE>nn::fs::MountSdmc</CODE></a>. 476<tr><th>SELECT 477<td>This option can be used only for development purposes.<br>It cannot be used in retail products.<br>Enable debug mode by using the <CODE>Config</CODE> tool, and call <a href="nn/hid/CTR/EnableSelectButton.html"><CODE>nn::hid::CTR::EnableSelectButton</CODE></a> to get input from <a href="nn/hid/CTR/PadReader/Overview.html"><CODE>nn::hid::CTR::PadReader</CODE></a>. 478 </table> 479 <a name="home"></a> 480<h3>HOME Menu</h3> 481 <table> 482<tr><th class="disabled">Brightness Adjustment 483<td class="disabled">You cannot change the brightness or get the current brightness value. 484<tr><th class="disabled">Power-Saving Mode 485<td class="disabled">You cannot turn power-saving mode on or off, and you cannot get the current mode. 486<tr><th>Banners 487<td>For information about how to create banners, see the <a href="../tools/ctr_makebanner.html"><CODE>ctr_makebanner</CODE></a> reference. <br>For information about how to add them to your application, see <a href="../SDKRules/BuildRules.html">Build Rules</a> or the <a href="../TechnicalNotes/BuildSystemDevelopmentGuide/BuildSystemDevelopmentGuide.html"><I>Guide to Developing a Build System</I></a>. 488<tr><th><a name="icon">Icons</a> 489<td>For information about how to create icons, see the <a href="../tools/ctr_makebanner.html"><CODE>ctr_makebanner</CODE></a> reference.<br> For information about how to add them to your application, see <a href="../SDKRules/BuildRules.html">Build Rules</a> or the <a href="../TechnicalNotes/BuildSystemDevelopmentGuide/BuildSystemDevelopmentGuide.html"><I>CTR Guide to Developing a Build System</I></a>. 490<tr><th>Software Icons 491<td>→ <a href="#icon">Icons</a> 492<tr><th><a name="boss_news">SpotPass Notifications</a> 493<td>These notifications are received from <a href="#boss">SpotPass</a>. To receive notifications sent from the server, register an application-specific task in <a href="#boss">SpotPass</a>. 494<tr><th><a name="cec_news">StreetPass Notifications</a> 495<td>This notification indicates that <a href="#cec">StreetPass</a> has occurred. <br> You cannot control this option from the application. 496<tr><th><a name="news">Notifications Distributed Directly From Games</a> 497<td>Applications can use <a href="nn/news/CTR/user/PostNews.html"><CODE>nn::news::CTR::user::PostNews</CODE></a> to distribute notifications directly. 498<tr><th>Pedometer 499<td>Use the <a href="nn/pl/CTR/Overview.html"><CODE>pl</CODE></a> library. 500<tr><th>Play Coins 501<td>→ The library used for Play Coins is distributed with the CTR-SDK Applet package, which is separate from the CTR-SDK itself. 502<!-- <tr><th><a name="Emanual">電子マニュアル</a> <td>PDF, ビルド, makerom <tr><th>取扱説明書 <td>→ <a href="#Emanual">電子マニュアル</a> --> 503<tr><th><a name="HomeMenuChange">Switching to the HOME Menu</a> 504<td>Use the <a href="nn/applet/CTR/Overview.html"><CODE>applet</CODE></a> library. 505 </table> 506 <a name="applet"></a> 507<h3>Applets</h3> 508 <table> 509<tr><th>Error Messages 510<td>Use the <CODE><a href="nn/erreula/CTR/Overview.html">erreula</a></CODE> library. 511<tr><th>Software Keyboard 512<td>Use the <CODE><a href="nn/swkbd/CTR/Overview.html">swkbd</a></CODE> library. 513<tr><th>Photo Selector Dialog Box 514<td>Use the <CODE><a href="nn/phtsel/CTR/Overview.html">phtsel</a></CODE> library. 515<tr><th>Voice Selector Dialog Box 516<td>Use the <CODE><a href="nn/voicesel/CTR/Overview.html">voicesel</a></CODE> library. 517 </table> 518 <a name="pre"></a> 519<h3>Built-In Software</h3> 520 <table> 521<tr><th>Notifications 522<td>→ <a href="#boss_news">SpotPass Notifications</a><br> → <a href="#cec_news">StreetPass Notifications</a><br> → <a href="#news">Notifications Distributed Directly From Games</a> 523<tr><th>Software Library 524<td>→ Register <a href="#icon">Icon</a> information here. No other operations are possible. 525<tr><th>Activity Log 526<td>→ Use <a href="#icon">Icon</a> information here. No other operations are possible. 527<tr><th>AR Cards 528<td>→ Use the AR library to recognize AR Cards. It is distributed separately from the CTR-SDK. 529<tr><th>Mii Characters 530<td>→ The CTR Face Library allows you to use Mii characters. It is distributed separately from the CTR-SDK. 531 </table> 532 <a name="setting"></a> 533<h3>System Settings</h3> 534 <table> 535<tr><th><a name="UserName">Username</a> 536<td>Use <a href="nn/cfg/CTR/GetUserName.html"><CODE>nn::cfg::CTR::GetUserName</CODE></a> to get the user name. 537<tr><th><a name="Birthday">Birthday</a> 538<td>Use <a href="nn/cfg/CTR/GetBirthday.html"><CODE>nn::cfg::CTR::GetBirthday</CODE></a> to get the birthday. 539<tr><th><a name="Country">Area</a> 540<td>Use <a href="nn/cfg/CTR/GetCountry.html"><CODE>nn::cfg::CTR::GetCountry</CODE></a> to get the country, and use <a href="nn/cfg/CTR/GetSimpleAddress.html"><CODE> nn::cfg::CTR::GetSimpleAddress</CODE></a> to get the local area. 541<tr><th>Language 542<td>Use <a href="nn/cfg/CTR/GetLanguage.html"><CODE>nn::cfg::CTR::GetLanguage</CODE></a> to get the language. 543<tr><th>Sound Output Mode 544<td>Use <a href="nn/cfg/CTR/GetSoundOutputMode.html"><CODE>nn::cfg::CTR::GetSoundOutputMode</CODE></a> to get the sound output mode. 545<tr><th>Variable RTC Offset 546<td>Use <a href="nn/cfg/CTR/GetUserTimeOffset.html"><CODE>nn::cfg::CTR::GetUserTimeOffset</CODE></a> to get the variable RTC offset. 547<tr><th>Touch Screen Calibration 548<td>Applications do not need to calibrate the Touch Screen because it is automatically done by the <a href="nn/hid/CTR/TouchPanelReader/Overview.html"><CODE>nn::hid::CTR::TouchPanelReader</CODE></a>. 549<tr><th>External Camera Calibration 550<td>Applications do not need to calibrate the cameras to take 3D photos because the cameras are calibrated automatically.<br><br> Use <a href="nn/camera/CTR/GetStereoCameraCalibrationData.html"><CODE>nn::camera::CTR::GetStereoCameraCalibrationData</CODE></a> to get calibration data and <a href="nn/camera/CTR/GetStereoCameraCalibrationMatrixEx.html"><CODE>nn::camera::CTR::GetStereoCameraCalibrationMatrixEx</CODE></a> to generate a calibration matrix from the calibration data. 551<tr><th>Circle Pad Calibration 552<td>Applications do not need to calibrate the Circle Pad because it is automatically done by the <a href="nn/hid/CTR/PadReader/Overview.html"><CODE>nn::hid::CTR::PadReader</CODE></a>. 553<tr><th>Parental Controls 554<td>→ <a href="#parental">Parental Controls</a> 555<tr><th>Blocked-User Settings Initialization 556<td>The <a href="nn/ubl/Overview.html"><CODE>ubl</CODE></a> library clears the registered blocked-user settings. 557<tr><th>Configure Internet Connection 558<td>Used by <a href="#ac">Connecting to an Access Point</a>. 559 </table> 560 <a name="parental"></a> 561<h3>Parental Controls</h3> 562 <table> 563<tr><th class="disabled">Software Rating 564<td class="disabled">Based on the rating information set in <a href="#icon">Icon</a>, applications with a setting greater than the target age are prohibited from running. <br>This restriction is applied automatically, and prevents the application from being started from the HOME Menu. <br> It is not possible to get whether this restriction is enabled. 565<tr><th class="disabled">Internet Browser 566<td class="disabled">When enabled, this restriction prevents the Internet Browser from starting. <br> It is not possible to get whether this restriction is enabled. 567<tr><th class="disabled">Nintendo 3DS Shopping Services 568<td class="disabled">When enabled, this restriction prevents the user from purchasing paid content. <br> It is not possible to get whether this restriction is enabled. 569<tr><th><a name="3Dgx">Display of 3D Images</a> 570<td>When enabled, this restriction prevents the system from displaying stereoscopic images. This restriction is applied automatically. It prevents stereoscopic display even if you set <CODE><a href="nn_gx/nngxSetDisplayMode.html">nngxSetDisplayMode</a></CODE> to <CODE>NN_GX_DISPLAYMODE_STEREO</CODE>.<br> To determine whether this restriction or the 3D depth slider has prohibited stereoscopic images, call <a href="nn/gx/CTR/IsStereoVisionAllowed.html"><CODE>nn::gx::CTR::IsStereoVisionAllowed</CODE></a>. 571<tr><th>Sharing Images, Audio, and Video 572<td>When enabled, this restriction prevents the sending and receiving of user-generated content (UGC). <br> This restriction is not applied automatically. Applications must get a value from <a href="nn/cfg/CTR/IsRestrictPhotoExchange.html"><CODE>nn::cfg::CTR::IsRestrictPhotoExchange</CODE></a> and then enforce this restriction. 573<tr><th>Online Interaction 574<td>When enabled, this restriction prevents communication through access points. This restriction is applied automatically. When enabled, it causes connection to an AP to fail.<br> To determine whether this restriction is enabled, use <a href="nn/cfg/CTR/IsRestrictP2pInternet.html"><CODE>nn::cfg::CTR::IsRestrictP2pInternet</CODE></a>. 575<tr><th>StreetPass 576<td>When enabled, this restriction blocks StreetPass. <br> This restriction is applied automatically. When enabled, writing a message to a StreetPass box fails. It also blocks the StreetPass feature itself.<br> To determine whether this restriction is enabled, use <a href="nn/cfg/CTR/IsRestrictP2pCec.html"><CODE>nn::cfg::CTR::IsRestrictP2pCec</CODE></a>. 577<tr><th>Registering Friends 578<td>It is prohibited to register friends when this restriction is enabled.<br><br> To determine whether this restriction is enabled, use <a href="nn/cfg/CTR/IsRestrictAddFriend.html"><CODE>nn::cfg::CTR::IsRestrictAddFriend</CODE></a>. 579<tr><th class="disabled">DS Download Play 580<td class="disabled">DS Download Play is prohibited when this restriction is enabled. <br> It is not possible to get whether this restriction is enabled. 581 </table> 582<h2>Revision History</h2> 583 <div class="section"> 584 <dl class="history"> 585 <dt>2012/06/22</dt> 586<dd>Added the item about the ASSERT macro.</dd> 587 <dt>2011/12/12</dt> 588<dd>Updated information.</dd> 589 <dt>2011/07/19</dt> 590<dd>Initial version.</dd> 591 </dl> 592 </div> 593<hr><p>CONFIDENTIAL</p></BODY></HTML> 594