The CTR-SDK contains the libraries, tools, and documentation required to develop CTR applications.
The source code for the libraries included in this package is intended for reference purposes during debugging. Note that the operation of these libraries is not guaranteed if they are rebuilt.
To use this package, you must apply SystemUpdater for CTR-SDK 0.14.23 (which is distributed as a separate package). For directions on the procedure for applying the System Updater, see SystemUpdaterPack_Manual.pdf in the System Updater Package.
| OS | Microsoft Windows XP Professional Service Pack 3 (32-bit) Microsoft Windows 7 Professional (64-bit) |
| Compiler | ARM C/C++ Compiler, RVCT 4.0 b865 (2010/09/09 Build) |
| Debugger | PARTNER-CTR/S Ver.5.61 111 20101224 |
| Runtime | Microsoft .NET Framework 3.5 SP1 |
The separately released document CTR-StartupGuide.pdf explains the procedures for setting up the CTR-SDK, so be sure to read it beforehand.
See the Build Rules page for more information about how to use the build system. The .NET Framework must be installed in order to perform a build.
For a list of changes to each package, refer to the change log.
The following bugs will not be fixed in CTR-SDK 1.x because SystemUpdater cannot be replaced. We plan to fix the following bugs in CTR-SDK 2.x onward.
Symptom In very rare cases a
FATAL_ERRORoccurs during infrastructure or background communication. The following error values are displayed at this time. RSL :0xF9606C0F Level : -1 Summary: 11 Module : 27 Desc : 15 RSL :0xF9606C11 Level : -1 Summary: 11 Module : 27 Desc : 17 Frequency of Occurrence Extremely low. Affects All applications that use infrastructure or background communication. Comments This bug may occur during background communication that uses infrastructure communication or during P2P communication via infrastructure communication.
Symptom If you run the following operations in order, a filesystem error (such as
DESCRIPTION_ARCHIVE_INVALIDATED) is returned when an SD Card is used. 1. Mount and use an SD Card from an application. (This is how expanded save data and SpotPass are used) 2. Remove and insert the SD Card. 3. Mount and use the SD Card again from the application without unmounting it. Frequency of Occurrence Always. Affects All applications that use expanded save data and SpotPass. Comments An error stops being returned if you restart the application or unmount the SD Card after it has been removed and inserted. (In other words, the SD Card can then be used normally.)
Symptom Regardless of whether the system has been turned on, if you leave it alone for eight days without increasing the step count you will be unable to save up to one days' step count afterward. Frequency of Occurrence Always. Affects All applications that use the pedometer.
Symptom After the system has been in DS compatibility mode for a week or longer, the steps counted since the system entered DS compatibility mode disappear in proportion to the amount of time that steps are counted. Frequency of Occurrence Always. Affects All applications that use the pedometer. Comments This does not occur if the system is turned off or control returns to the HOME Menu within a week of entering DS compatibility mode.
Symptom The camera's
Activatestate sometimes does not return when there is an applet transition (such as a HOME Button press) at the same time as the system is opened or closed while the cameras are being used. Frequency of Occurrence Low, but we have yet to investigate a concrete probability. Affects All applications that use the cameras. Comments Opening and closing the system once resolves this issue.
Symptom Background communication will cease to run autonomously if Wi-Fi is turned off at the same time as uds::Initialize, ac::Connect, ac::ConnectAsync, or dlp::Client::Initialize is called. Frequency of Occurrence Although the timing is severe, this occurs consistently. Affects All applications Comments Even if your application encounters this bug, SpotPass runs while infrastructure communication is connected. Power-cycling the system resolves this symptom.
Symptom If Sleep Mode is rejected when the system is closed, SpotPass ceases to run autonomously until the system either enters Sleep Mode or is opened. Frequency of Occurrence Always. Affects All applications Comments StreetPass is functional.
Symptom If the HOME Button is pressed while the card removal screen is displayed, the error screen is sometimes displayed again. This symptom has been confirmed to occur with the following procedure. 1. Use the HOME Button to suspend an application. 2. Close the system to put it into Sleep Mode. 3. Remove a card while the system is in Sleep Mode. 4. Open the system; the card removal error screen is displayed. Frequency of Occurrence Although it is timing-dependent, this occurs with high frequency when the procedure above is followed. Affects All card-based software. Comments Even if the error screen is displayed again, if you just wait control will return to the HOME Menu without a problem.
Symptom When a BOSS task is run, the original specifications call for it to return DONE as a result when the HTTP status code is 304 (NOT MODIFIED); instead, it sometimes returns ERROR. Frequency of Occurrence Although an accurate frequency is unknown because this depends on server behavior, it has been confirmed to occur in one of eight units running for 10 hours. Affects All applications that handle task execution results. Comments To handle HTTP status code 304, access the status code instead of the task's execution results.
Symptom Execution hangs on rare occasions if the system enters Sleep Mode or wireless is turned off while a UDS connection is starting or communication is in progress. Frequency of Occurrence This can be easily reproduced if you try. Affects All applications that use UDS communication. Comments You can prevent execution from hanging only when the system enters Sleep Mode. To do so, call DestroyNetwork and DisconnectNetwork before the system enters Sleep Mode. Consequently, the same problem occurs when the dlp::Server::OpenSessions and dlp::Server::Finalize functions are called.
Symptom It is sometimes impossible to delete extra data (expanded save data). Frequency of Occurrence This always occurs when you follow the procedure below. 1. Create expanded save data from an application and then create BOSS storage there. 2. Look at the banner for that application in the HOME Menu without a single downloaded contextual banner in the application's BOSS storage. 3. Launch System Settings and attempt to delete the application's expanded save data. This will fail. Affects This occurs in all applications that use SpotPass. Specifically, this occurs in applications that create BOSS storage in the expanded save data region. Workaround If you close and then re-open System Settings without looking at the application's banner, you can delete data properly. It is impossible for applications to implement a workaround for this. Comments Because SpotPass has mounted expanded save data in step 2, System Settings is unable to delete the expanded save data. If you remove and insert an SD Card after step 2, it becomes impossible to mount expanded save data.
Symptom The region name is sometimes blank. Frequency of Occurrence This always occurs when you follow the procedure below for US and EU versions of applications. 1. Configure Parental Controls from System Settings. (You can simply set the PIN) 2. Under Profile in System Settings, select and confirm a country without regions in Region Settings. (Such as Anguilla for the U.S. and Iceland for Europe) 3. Steps 1 and 2 cause the region name (of those saved on the system) to turn blank for the language that was configured with the system at the time. (Originally, the region name is configured to be the same as the country name.) Specifically, in the region settings obtained by nn::cfg::GetSimpleAddress(pSimpleAddress), pSimpleAddress->regionName[nn::cfg::GetLanguage()] is an empty string. Affects This has no effect beyond the symptom. Workaround It is impossible for applications to implement a workaround for this.
Symptom Once REPLY_LATER has been returned to a SleepQuery issued because the system was closed (or for some other reason), if a card is removed before REPLY_ACCEPT or REPLY_REJECT is returned the system will no longer be able to enter Sleep Mode. Frequency of Occurrence This grows more frequent the longer it takes for
REPLY_ACCEPTorREPLY_REJECTto be returned afterREPLY_LATER. Affects All applications that returnREPLY_LATERto aSleepQuery. Comments Closing the corresponding application resolves this problem.
Symptom The current FS library has the following bugs. * If the MountSdmc or MountExtSaveData functions have not succeeded and the GetSdmcSize function is called, an error (NotFound) is returned. * If a file is accessed as a directory or vice versa, an unexpected Result (DESCRIPTION_FAT_BROKEN_ENTRY or DESCRIPTION_INVALID_PATH_FORMAT) is sometimes returned. * When a new file is created in the same physical region as a deleted file, even if you have not written anything to it you can sometimes read the content of the deleted file. * You can call DeleteDirectory and RenameDirectory on the root directory for expanded save data. * You can rename save data and expanded save data to "." or "..". You cannot open or delete files that have been renamed in this way. * Even though you can create a directory with "..." in its name on an SDMC archive, an error (OperationDenied) is returned when you attempt to delete it. * If you attempt to rename save data and expanded save data to a higher-level directory, everything under that directory is deleted. Frequency of Occurrence Depends on the symptom. Affects All applications that use the FS library.
Symptom If you set the battery to 0% with the PARTNER-CTR debugger software, the debugger hangs. Frequency of Occurrence Always. Affects All applications Comments The only way to check shutdown processing is to actually set the battery to 0 using a CTR test unit.
Symptom Although a screen is displayed to instruct you to return to the HOME Menu if a card is removed while card-based software is running, you sometimes cannot return to the HOME Menu by pressing the HOME Button at this screen (the upper and lower screens will remain black). Frequency of Occurrence Approximately one in ten times. Affects All card-based software
Symptom When you run the following functions, sound is sometimes cut off with a noise that sounds like "chi." * nn::mic::CTR::SetAmp function (with false specified as an argument) * nn::mic::CTR::SetLowPassFilter function Frequency of Occurrence Approximately one in ten times. Affects All applications that use the microphone. Comments The noise is caused when sound is cut off by the relevant function blocking sound processing for a long time. To work around this problem, run the functions in question when you stop sound.
Symptom If the system is opened and closed rapidly while the cameras are being used,
Activatecontinues to return theIsSleepingerror. Frequency of Occurrence The precise frequency at which this occurs is unknown because it is only caused by the act of opening and closing the system rapidly. Because this is by nature infrequent and is resolved when the system is opened and closed, it is probably the case that recovery often occurs without the user noticing. Affects All applications that use the cameras. Comments Opening and closing the system once resolves this issue.
Symptom The AC library's
Connectfunction sometimes returnsResultSuccesswhen it succeeds; this differs from the information in the Function Reference Manual. Frequency of Occurrence This occurs infrequently whenConnectsucceeds. Affects All applications that use the AC library. Comments Because there is no need to use different conditional branches that distinguish between ResultLanConnected and ResultWanConnected, which should have originally been returned when Connect succeeds, handle IsSuccess instead.
Symptom If you open and close the system rapidly or perform an applet transition while the cameras are being used, the upper half of the captured image may be displayed on the lower screen and the lower half of the captured image may be displayed on the upper screen. Frequency of Occurrence The probability of reproducing this decreases as you use the cameras at higher frame rates. Just for reference, we have heard reports of this occurring in applications that run at 15 fps but not from applications that run at 30 fps. The reproducibility also increases the sooner the application calls
SetReceivingafter the previous transfer has completed. Affects All applications that use the cameras. Comments This problem can be resolved by closing the system again and then opening it after it has entered Sleep Mode. If you stop and restart capture operations from the callback function registered by applet::SetAwakeCallback to be invoked upon recovery from Sleep Mode (when the system is opened), no problems occur. Specifically, this is the following sequence.StopCapture→ Wait for the capture operation to stop →ClearBuffer→SetReceiving→StartCapture
Symptom When you format the save data in a card that was intentionally spoofed, the data is sometimes not formatted correctly even if the return value indicates success. In this case,
Mountwill fail and returnBadFormatorMediaAccessErrorimmediately afterFormator after several files have been created. Frequency of Occurrence The problem only occurs when data is intentionally spoofed. In general, it will never occur if cards are just inserted and removed with the final retail product. Affects All card-based software Comments This is restored normally ifFormatis run whenBadFormatorMediaAccessErroris returned.
Symptom If a card's save data is in an invalid format, you should be able to run nn::fs::FormatSaveData to put the save data into a normal state, but in some rare cases the invalid format is not cleared up even if FormatSaveData itself returns ResultSuccess. Frequency of Occurrence Because this becomes less likely as you continue to use save data following a format and also as the number of bytes written increases, it does not have a large effect on normal usage. However, it can be relatively easier for this to occur in format-destroy cycles for debugging. Affects All card-based software Comments You do not need any additional implementation other than one that handles errors for invalid formats. If the aforementioned symptom occurs, several of the functions run after FormatSaveData will return errors associated with nn::fs::ResultBadFormat. If you call FormatSaveData again at this time, save data returns to the normal state. # This means repeating the sequence for handling corrupted save data twice.
Symptom The V-Sync for the left and right cameras will on rare instances fail to match even if the camera::SynchronizeVsyncTiming function is called upon recovery from Sleep Mode. Frequency of Occurrence This occurs infrequently only when recovering from Sleep Mode. The problem does not occur if the function is called when the cameras are started or during a HOME Menu transition. Affects All applications that use the outer cameras. Comments The symptoms appear to be resolved by inserting a HOME Menu transition.
CONFIDENTIAL