NITRO-SDK CHANGELOG

# NITRO-SDK Revision History

NITRO-SDK 3.2 Release version (8/28/2006)
  Note 42-01: (CARD) Corrected function reference page for CARD_GetRomHeader.
  Note 42-02: (GX) Corrected AntiAlias sample demos.
  Note 42-03: (OS) Added buffer overflow check for function cost calculation.
  Note 42-04: (PM) Corrected issues associated with card removal during wireless communication.
  Note 42-05: (WM) Corrected sample demos
  Known issues in SDK 3.2 release version

NITRO-SDK 3.2 RC2 (8/17/2006)
  Note 41-01: (CARD) Corrected the issue of the console not powering down when a card is removed during wireless communication.
  Note 41-02: (CP) Added wait processes inside the CP RestoreContext function.
  Note 41-03: (CP) Added a note regarding the use of dividers inside interrupts.
  Note 41-04: (CTRDG) Corrected a problem related to hot-swapping cartridges.
  Note 41-05: (OS) Added the OS_SleepThreadDirect function.
  Note 41-06: (OS) Changed internal thread switching.
  Note 41-07: (OS) Adjusted V count at time of startup.
  Note 41-08: (PRC) Made processing related to dividers thread safe.
  Note 41-09: (STD) Changed the specifications of character code conversion functions.
  Note 41-10: (WBT) Fixed the WBT_CMD_REQ_GET_BLOCK_DONE notification bug.
  Note 41-11: (WBT) Corrected sample demos
  Note 41-12: (WM) Revised the WM_SetWEPKey/Ex function.
  Note 41-13: (WM) Changed the reset processing of wepMode.
  Note 41-14: (WM) Corrected a problem related to wepMode settings.
  Note 41-15: (WM) Corrected sample demos
  Known problems with SDK 3.2 RC2

NITRO-SDK 3.2 RC (7/25/2006)
  Note 40-01: (CARD) Corrected the issue of the console not powering down when a card was removed.
  Note 40-02: (DevEnv) Flaw in the ITCM/DTCM size check using template files.
  Note 40-03: (MATH) Corrected the MATHCompareFunc function reference page
  Note 40-04: (MATH) Changed MATH_QSortStackSize function.
  Note 40-05: (MB) Corrected multiboot-PowerSave sample.
  Note 40-06: (MB) Changed the runtime defaults.
  Note 40-07: (STD) Changed the character code conversion functions.
  Note 40-08: (VIB) Changed the VIB library
  Note 40-09: (WM) Corrected sample demos
  Note 40-10: (WM) Prohibited new connections when communication ends.
  Known issues in SDK 3.2 RC

NITRO-SDK 3.2 PR (7/7/2006)
  Note 39-01: (CARD) Corrected card pull-out detection.
  Note 39-02: (CTRDG) Changed the AGB backup access function reference page.
  Note 39-03: (CTRDG) Revision of documents.
  Note 39-04: (DevEnv) Ended support of older CodeWarrior versions in shared definition files of the make system.
  Note 39-05: (MATH) Corrected the MATH_QSort function.
  Note 39-06: (MI) Corrected a problem with out-of-bounds access when using LZ77 compression.
  Note 39-07: (MI) Added 8-bit versions of Endian conversion functions.
  Note 39-08: (OS) Corrected the OS_InitException function.
  Note 39-09: (OS) Changed the function cost calculation.
  Note 39-10: (PM) Corrected a problem where the system would not power down if a card was removed while the LCD was turned off.
  Note 39-11: (PM) Revised the PM_GoSleepMode function reference page.
  Note 39-12: (PM) Corrected a problem with the RTC alarm interrupt after recovering from sleep mode.
  Note 39-13: (STD) Corrected the STD_CopyLString Function Reference page.
  Note 39-14: (STD) Changed the specifications of STD_CopyLString and added STD_CopyLStringZeroFill.
  Note 39-15: (STD) Added conversion functions Shift_JIS <-> Unicode.
  Note 39-16: (TOOL) Support for new overlay-related function with CodeWarrior 2.x.
  Note 39-17: (TOOL) Changed the compstatic Function Reference page.
  Note 39-18: (TOOL) Support for new 1 Gbit/2 Gbit ROMs for makerom.
  Note 39-19: (TOOL) Added checking for valid combinations of ROM parameters.
  Note 39-20: (WM) Changed the WFS sample demo
  Note 39-21: (WM) Changed the WM_EndDataSharing function.
  Note 39-22: (WM) Adjusted the link level value when communicating with the Wii console.
  Note 39-23: (WM) Corrected sample demos
  Note 39-24: (WM) Corrected a problem with initialization and shutdown functions.
  Note 39-25: (WM) Corrected a problem with port callback initialization inside the initialization function.
  Note 39-26: (WM) Corrected illegal operations during disconnection.
  Known issues in SDK 3.2 PR

NITRO-SDK 3.1 Release version (5/2/2006)
  Note 38-01: (CARD) Made changes regarding DMA transfer from ROM
  Note 38-02: (CTRDG) Added AGB backup access functions
  Note 38-03: (CTRDG) Added the functions CTRDG_SetPhiClock and CTRDG_GetPhiClock
  Note 38-04: (FS) Internally changed the ROM archive
  Note 38-05: (FX) Changed the FX_Mul function
  Note 38-06: (FX) Changed the VEC_Normalize function
  Note 38-07: (GX) Added a description to the Function Reference page for G2_SetBlendAlpha
  Note 38-08: (MATH) Corrected the MATHCompareFunc function reference page
  Note 38-09: (MI) Corrected the compression problem with the MI_CompressLZ function
  Note 38-10: (OS) Changed the OS_GetConsleType function.
  Note 38-11: (OS) Corrected the sample demo exceptionDisplay-2
  Note 38-12: (PRC) Added figure dictionary data for demo
  Known issues in SDK 3.1 release version

NITRO-SDK 3.1 RC (4/11/2006)
  Note 37-01: (CARD) Made Card Library compatible with new backup devices.
  Note 37-02: (DevEnv) Added .itcm.bss/.dtcm.bss/.wram.bss section
  Note 37-03: (DevEnv) Revised modulerules.cctype.CW
  Note 37-04: (FX) Added MTX_Copy* functions to the Function Reference.
  Note 37-05: (GX) Added G3OP_DUMMY_COMMAND
  Note 37-06: (GX) Changed the geometry command cycle list
  Note 37-07: (MI) Added endian-aware memory access functions
  Note 37-08: (OS) Corrected OS_CheckHeap
  Note 37-09: (OS) Changed arena overview
  Note 37-10: (OS) 8-byte alignment support for the stack
  Note 37-11: (PM) Corrected the PM_ForceToPowerOff and PM_ForceToPowerOffAsync functions
  Note 37-12: (SND) Added the SND_SetTrackMuteEx function
  Note 37-13: (TOOL) Changed Function Reference page for attachsign
  Note 37-14: (TOOL) Corrected a problem where PPM files could not be loaded using the ppmconv tool
  Note 37-15: (VIB) Changed the pulse_vib sample demo
  Note 37-16: (WM) Corrected the dataShare-Model sample demo
  Note 37-17: (WM) Added the wireless-all sample demo
  Note 37-18: (WM) Corrected sample demos
  Known issues in SDK 3.1 RC

NITRO-SDK 3.1 PR (3/14/2006)
  Note 36-01: (ARM7) Improved automatic pull-out detection of components
  Note 36-02: (CARD) Internal changes made to the CARD_CheckPulledOut function.
  Note 36-03: (CTRDG) Strengthened access restrictions to the AGB cartridge region
  Note 36-04: (CTRDG) Added the CTRDG_CheckPulledOut function.
  Note 36-05: (GX) Corrected 2D_CharBg_Direct sample demos
  Note 36-06: (GX) Edited Function Reference description for G2_GetBG2ScrPtr and G2_GetBG3ScrPtr functions
  Note 36-07: (MB) Added MB_FAKESCAN_PARENT_BEACON notification
  Note 36-08: (MB) Corrected the operation of MB_ReadMultiBootParentBssDesc
  Note 36-09: (MB) Corrected a problem with the number of retries when reconnecting to a clone boot sample parent
  Note 36-10: (MB) Updated documentation
  Note 36-11: (MIC) Described restrictions during automatic sampling
  Note 36-12: (PM) Corrected problem related to the PMAmpGain enumeration type
  Note 36-13: (PM) Changed the PM_ForceToPowerOff and PM_ForceToPowerOffAsync functions
  Note 36-14: - (TOOL) Fixed the inclusion order within ROM when specifying files to makerom using wildcards.
  Note 36-15: (VIB) Added VIB library
  Note 36-16: (WBT) Corrected the WFS sample module
  Note 36-17: (WBT) Corrected Function Reference
  Note 36-18: (WBT) Added Overview to the Function Reference
  Note 36-19: (WM) Changed specifications regarding NULL response from children during MP communication
  Note 36-20: (WM) Changed WMGameInfo structure definitions
  Note 36-21: (WM) Added the WM_IsValidGameBeacon and WM_IsValidGameInfo functions
  Note 36-22: (WM) Corrected a problem with minPollBmpMode
  Note 36-23: (WM) Updated documentation
  Note 36-24: (Misc) Corrected description of macros
  Known issues in SDK 3.1 PR

NITRO-SDK 3.0 Release version (1/16/2006)
  Note 35-01: (CARD) Added an overview to the Function Reference
  Note 35-02: (DevEnv) Added a Function Reference page for the packnlf tool
  Note 35-03: (DevEnv) Unified the source code format
  Note 35-04: (MI) Corrected LZ compression problems with the MI_CompressLZFast function and ntrcomp.exe
  Note 35-05: (OS) Corrected problems in the OS_ResetSystem function
  Note 35-06: (OS) Edited the Chinese version startup screen
  Note 35-07: (PRC) Added figure dictionary data for demo
  Note 35-08: (WM) Corrected the display of the debug string in the sample demo
  Note 35-09: (WM) Changed internal communication parameters
  Known issues in SDK 3.0 release version

NITRO-SDK 3.0 RC3 (12/26/2005)
  Note 34-01: (MATH) Added bit operation function
  Note 34-02: (MB) Fixed a bug that occurred when designating memory conservation with the MB_ReadSegment function
  Note 34-03: (MB) Improved MP communication effectiveness under adverse conditions
  Note 34-04: (OS) Changed the CARD_CheckPulledOut function reference page
  Note 34-05: (OS) Corrected the OS_CreateThread function
  Note 34-06: (WBT) Corrected wbt-1 sample demos
  Note 34-07: (WBT) Corrected a problem with the user callbacks
  Note 34-08: (WM) Corrected a problem with MP communication parameters
  Note 34-09: (WM) Made changes to the method of setting the WH-related parameters
  Note 34-10: (WM) Improved internal operations during disconnect
  Known problems with SDK 3.0 RC3

NITRO-SDK 3.0 RC2 (12/05/2005)
  Note 33-01: (CARD) Corrected problem with backup function
  Note 33-02: (CTRDG) Added access permission functions for AGB cartridges
  Note 33-03: (DevEnv) Added macro for comparing SDK versions
  Note 33-04: (DevEnv) Added SDK_INLINE, SDK_DECL_INLINE
  Note 33-05: (DevEnv) Corrected makebanner tool
  Note 33-06: (DevEnv) Updated ntexconv
  Note 33-07: (DevEnv) Added the packnlf tool
  Note 33-08: (MB) Corrected the MBP sample module
  Note 33-09: (MB) Added MB_FAKE_WORK_SIZE definition
  Note 33-10: (MB) Corrected problem with the parent beacon flag
  Note 33-11: (MI) Added the MI_CompressLZFast function
  Note 33-12: (OS) Added an automatic build switch for ARM7 debug output
  Note 33-13: (OS) Changed the definition of the VBlank wait function
  Note 33-14: (OS) Deleted OS_InitPrintServer and OS_PrintServer from the sample demo
  Note 33-15: (OS) Deleted PXI_Init from the sample demo
  Note 33-16: (OS) Changed SVC_WaitVBlankIntr in the sample demo
  Note 33-17: (OS) Changed the start location of extended main RAM arena
  Note 33-18: (WBT) Corrected the WFS sample module
  Note 33-19: (WBT) Changed the WFS-related sample demo
  Note 33-20: (WM) Corrected the 2D_CharBg_3 and Sub_CharBg_3 sample demos
  Note 33-21: (WM) Added a timing configuration function for MP communication
  Note 33-22: (WM) Added a function to configure the send size for MP communications
  Note 33-23: (WM) Added a spacing control function for MP communication
  Note 33-24: (WM) Updated the dataShare-Model sample demo
  Note 33-25: (WM) Corrected the display of the dataShare-Model sample demo
  Note 33-26: (WM) Added a way to set the maximum number of MP communications per frame.
  Note 33-27: (WM) Changed the specification for the receive signal strength level
  Note 33-28: (WM) Added an option for disabling the pre-check of the send/receive buffer size
  Note 33-29: (WM) Added a note regarding the wireless communication event counters
  Known problems with SDK 3.0 RC2

NITRO-SDK 3.0 RC (11/7/2005)
  Note 32-01: (CARD) Changed internal processing of EEPROM device operations
  Note 32-02: (CARD) Added removal detection after ROM access
  Note 32-03: (CARD) Made Card Library compatible with new backup devices.
  Note32-04: (DevEnv) Corrected the #pragma define_section parameters
  Note 32-05: (DevEnv) Added a resource data conversion tool for the ENV library
  Note 32-06: (DevEnv) Corrected the NITRO-SDK Package creation script
  Note 32-07: (DevEnv) Changed the version of CodeWarrior used for SDK package build
  Note 32-08: (DevEnv) Added a reference to the compilation target
  Note 32-09: (ENV) Added a reference to the ENV library
  Note 32-10: (ENV) Changed the ENV library
  Note 32-11: (GX) Corrected the G3BS_LoadMtx43 function
  Note 32-12: (GX) Further corrections to Sub_Double3D sample demo.
  Note 32-13: (MATH) Corrected problem with the MATH_QSort function.
  Note 32-14: (OS) Corrected the HI address calculations for the ARM7-specific WRAM arena
  Note 32-15: (OS) Created the OS_GetTotalOccupiedSize function
  Note 32-16: (OS) Corrected the OS_PutString function.
  Note 32-17: (OS) Added SDK_COMPILER_ASSERT
  Note 32-18: (OS) Improved the VBlank wait function
  Note 32-19: (OS) Changed the argument const of the cache function
  Note 32-20: (OS) Corrected the stack overflow check function
  Note 32-21: (OS) Support for the argument data buffer switch
  Note 32-22: (OS) Corrected the actual time and the check value conversion macro
  Note 32-23: (OS) Updated the Chinese version’s startup screen
  Note 32-24: (OS) Corrected thread queue operations, including threads about to terminate
  Note 32-25: (PRC) Corrected the sample tool “pdic2c.pl”
  Note 32-26: (RTC) Changed the method for getting RTC day of the week information
  Note 32-27: (SND) Corrected a problem where the SND_CalcDecibel function would not return a suitable value when the argument 0 had been entered
  Note 32-28: (STD) Added STD library
  Note 32-29: (WBT) Corrected a problem with GetBlock request notifications
  Note 32-30: (WBT) Corrected the WFS sample module
  Note 32-31: (WM) Updated the WM test tool
  Note 32-32: (WM) Corrected the description on the WM_SetLifeTime Function Reference page
  Note 32-33: (WM) Improved mongoose components
  Note 32-34: (WM) Added information in the notification to the port receive callback
  Note 32-35: (WM) Added notification when the port receive callback initializes
  Note 32-36: (WM) Added API for tests
  Note 32-37: (WM) Corrected a problem where the wireless connection function stops when a child device calls the WM_EndMP function
  Note 32-38: (WM) Added a disconnection notification when the local player disconnects
  Note 32-39: (WM) Fixed internal operations again for connecting and disconnecting
  Known issues in SDK 3.0 RC

¦NITRO-SDK 3.0 PR4 (9/8/2005)
  Note 31-01: (CARD) Added CARD_CancelBackupAsync function
  Note 31-02: (CARD) Fixed internal process in FRAM device operation (Released in NITRO-SDK 2.2 release version)
  Note 31-03: (CARD) Added CARD_RESULT_NO_RESPONSE error code
  Note 31-04: (DevEnv) Support for overlay groups in lsf files
  Note 31-05: (DevEnv) Fixed bug in certain section names of makelcf
  Note 31-06: (DevEnv) Corrected makelcf
  Note 31-07: (DevEnv) Added loadrun and nitrorun tool commands
  Note 31-08: (ENV) Added libenv*.a environment resource library
  Note 31-09: (FS) Changed FS_EndOverlay function (Released in NITRO-SDK 2.2 official release)
  Note 31-10: (FS) Revised documents (Released in NITRO-SDK 2.2 official release)
  Note 31-11: (FX) Corrected the FX_FX64C_TO_F32 macro
  Note 31-12: (FX) Fixed bug in FX_InvSqrt function (Released in NITRO-SDK 2.2 official release)
  Note 31-13: (MB) Added MB_GetMultiBootDownloadParameter function (Released in NITRO-SDK 2.2 official release)
  Note 31-14: (NVRAM) Fixed bug with error determination when loading data from NVRAM
  Note 31-15: (OS) Added function reference pages for debug output functions on ARM7 side (Released in NITRO-SDK 2.2 official release)
  Note 31-16: (OS) Fixed bug in upper address of DTCM arena
  Note 31-17: (OS) Added NitroStaticInit function reference (Released in NITRO-SDK 2.2 official release)
  Note 31-18: (OS) Organized const type arguments in function related to OSThread
  Note 31-19: (OS) Added OS_GetOpt function.
  Note 31-20: (SND) Optimized the cache invalidation process (Released in NITRO-SDK 2.2 official release)
  Note 31-21: (WM) Fixed bug in communication disconnect detection process (Released in NITRO-SDK 2.2 official release)
  Note 31-22: (WM) Added scan types that are performed by specifying the matching length of SSID
  Note 31-23: (WM) Corrected scan SSID matching length in infrastructure mode
  Note 31-24: (WM) Changed internal process for child connection (Released in NITRO-SDK 2.2 official release)
  Note 31-25: (WM) Added interface that indicates more detailed information about causes of connection failure time
  Known problems with SDK 3.0 PR4

¦NITRO-SDK 3.0 PR3 (8/10/2005)
  Note 30-01: (CARD) Added CARD_CheckPulledOut function reference page (Released in NITRO-SDK 2.2 official release)
  Note 30-02: (CARD) Added argument restrictions for CARD_IdentifyBackup function (Released in NITRO-SDK 2.2 official release)
  Note 30-03: (MB) Changed sample demos (Released in NITRO-SDK 2.2 official release)
  Note 30-04: (OS) Added the OS_SetThreadDestructorStack function
  Note 30-05: (OS) Alarm cancel process used in OS_Sleep function
  Note 30-06: (WM) Changed process during overload on child
  Note 30-07: (WM) Changed internal operation for disconnection (Released in NITRO-SDK 2.2 official release)
  Known problems with SDK 3.0 PR3

¦NITRO-SDK 3.0 PR2 (8/4/2005)
  Note 29-01: (DevEnv) Changed ISD_NITRO_DEBUGGER path (Released in NITRO-SDK 2.2 official release)
  Note 29-02: (GX) Changed the Sub double3D sample demos again (Released in NITRO-SDK 2.2 official release)
  Note 29-03: (GX) Added const modifier to arguments of function that gets display list state (Released in NITRO-SDK 2.2 official release)
  Note29-04: (OS) Added OS_GetLowEntropyData function.
  Note 29-05: (PM) Fixed restore process after transitioning to sleep mode from the LCD off state. (Released in NITRO-SDK 2.2 official release)
  Note 29-06: (WM) Added notification to WM_SetIndCallback function callback
  Note 29-07: (WM) Added WM_SetPowerSaveMode function
  Note 29-08: (WM) Fixed bug at time of setting ignoreFatalError (Released in NITRO-SDK 2.2 RC )
  Note 29-09: (WM) Changed receive process on child.
  Note 29-10: (WVR) Corrected bug in thumb build version of ichneumon component. (Released in NITRO-SDK 2.2 RC)
  Known problems with SDK 3.0 PR2

NITRO-SDK 3.0 PR (7/22/2005)
  Note 28-01: (Cht) Added Pictocatch demo
  Note 28-02: (DevEnv) Support for nitro.h precompiled headers
  Note 28-03: (FS) Changed overlay function operation (Released in NITRO-SDK 2.2 official release)
  Note28-04: (GX) Corrected GX demos
  Note 28-05: (MATH) Increased speed for MD5 function (Released in NITRO-SDK 2.2 official release)
  Note 28-06: (OS) Added mechanism to check for stack overflow in IRQ stack.
  Note 28-07: (OS) Added argument support using OS_GetArgc function and OS_GetArgv functions
  Note 28-08: (OS) OS_KillThread and OS_KillThreadWithPriority functions added
  Note 28-09: (OS) Implementation of thread destructors
  Note 28-10: (OS) Added user parameters to thread structure
  Note 28-11: (OS) Removed limit on maximum number of threads
  Known issues in SDK 3.0 PR

#### The NITRO-SDK 3.0 andNITRO-SDK 2.2 series are maintained as parallel versions branching from NITRO-SDK 2.2 PR.
However, all the changes in the 2.2 series are included in the 3.0 series.
For details on the 2.2 series, click here.

NITRO-SDK 2.2 PR (7/15/2005)
  Note 27-01: (CARD) Added the CARD_CheckPulledOut function.
  Note 27-02: (CARD) Made Card Library compatible with new backup devices.
  Note 27-03: (CTRDG) Corrected cache operations when getting cartridge information
  Note 27-04: (DevEnv) Added the bin2obj tool
  Note 27-05: (DevEnv) Provided support for CYGWIN cygdrive prefix that is not /cygdrive.
  Note 27-06: (DevEnv) Corrected the LCF template.
  Note 27-07: (DevEnv) Corrected problem with the StackSize specification for rsf.
  Note 27-08: (DevEnv) Changed the default value for TS_VERSION.
  Note 27-09: (DevEnv) Changed the #include search path.
  Note 27-10: (FS) Added the functions FS_CreateFileFromMemory and FS_CreateFileFromRom.
  Note 27-11: (FS) Added the FS_End function.
  Note 27-12: (FS) Corrected problem with the FS_WaitAsync function.
  Note 27-13: (FS) Corrected problem during overlay unloading.
  Note 27-14: (FX) Corrected problem with the arctangent functions.
  Note 27-15: (GX) Corrected the Sub_Double3D sample demo.
  Note 27-16: (GX) Corrected problem with ASSERT inside functions that manipulate display lists.
  Note 27-17: (MATH) Corrected problem with the MATH_QSort function.
  Note 27-18: (MATH) Accelerated the SHA-1 functions.
  Note 27-19: (MATH) Added Fast Fourier Transform functions.
  Note 27-20: (MB) Added multiboot-wfs sample.
  Note 27-21: (MB) Released the debug use expanded memory region.
  Note 27-22: (MB) Added user definition expanded parameters.
  Note 27-23: (MI) Corrected problems with the MI_CompressHuffman function and Hufmann compression by ntrcomo.exe.
  Note 27-24: (OS) Corrected internal operation of `OS_Sleep` function
  Note 27-25: (OS) Corrected problem with the OS_TryLockMutex function.
  Note 27-26: (OS) Added the OS_YieldThread function.
  Note 27-27: (OS) Made internal corrections to initialization process at startup time.
  Note 27-28: (OS) Expanded the startup screen process for Chinese language version.
  Note 27-29: (OS) Corrected problems with flushing the data cache.
  Note 27-30: (OS) Corrected problem when multiple OSMutexes are locked.
  Note 27-31: (OS) Added information about header files to the Function Reference.
  Note 27-32: (RTC) Added functions to convert back and forth between date/time and total elapsed time in seconds.
  Note 27-33: (RTC) Added restrictions to functions for changing date and time.
  Note 27-34: (WBT) Corrected wbt-fs sample demo
  Note 27-35: (WBT) Corrected WBT sample demos
  Note 27-36: (WM) Clarified the specification changes and planned deletion of Key Sharing functions.
  Note 27-37: (WM) Changed the internal operations of the WM_StartScanEx function.
  Note 27-38: (WM) Updated WMTestTool.srl
  Note 27-39: (WM) Deferred MP communication when child not connected.
  Note 27-40: (WM) Corrected problem with notification when child disconnects
  Note 27-41: (WM) Added restriction on number of MP communication transmissions per frame.
  Known issues in SDK 2.2 PR

Previous Revision Histories

## NITRO-SDK Version 3.2 Release

(2006/08/28)

### Note 42-01: (CARD) Corrected function reference page for CARD_GetRomHeader.

Added a note that the CARD_GetRomHeader function can obtain the correct information only with an actual production console.

### Note 42-02: (GX) Corrected AntiAlias sample demos.

A bug was corrected where the anti-alias ON/OFF display in the $NitroSDK/build/demos/gx/UnitTours/AntiAlias sample demo was incorrectly displayed in the initial state (and only in the initial state).

### Note 42-03: (OS) Added buffer overflow check for function cost calculation.

Added OS_CheckFunctionCostBuffer and OS_CheckStatisticsBuffer functions to check whether the buffer used for the function cost calculation is full.

### Note 42-04: (PM) Corrected issues associated with card removal during wireless communication.

An issue was corrected where the backlight occasionally turns off when a card is removed during wireless communication.

### Note 42-05: (WM) Corrected sample demos

The following changes have been made to the individual sample library of $NitroSDK/build/demo/wireless_shared.

- An issue was corrected where, when only the file system is shared between the parent and child in the sample library WFS, an invalid file table was generated depending on the parent file count and child overlay count.
- An issue was corrected where, in the sample library WH, the error content could not be checked due to an implicit reset process occurring internally. This is seen when the child is unexpectedly disconnected during MP communication start processing.

### Known issues in SDK 3.2 release version

None.

## NITRO-SDK Version 3.2 RC2

(2006/08/17)

### Note 41-01: (CARD) Corrected the issue of the console not powering down when a card is removed during wireless communication.

A bug was corrected where the console would not power down properly when a card was removed during wireless communication with the clamshell closed.

### Note 41-02: (CP) Added wait processes inside the CP RestoreContext function.

When the status of a divider was restored using the CP_RestoreContext function inside an interrupt, the status of the divider was occasionally not completely restored at the completion of the interrupt.
To correct this issue, a wait was added in the CP_RestoreContext function.

### Note 41-03: (CP) Added a note regarding the use of dividers inside interrupts.

The precautions regarding the use of CP functions inside interrupts were included only on the function reference pages for the CP_SetDiv function, the CP_SetSqrt function, and the CP_RestoreContext function. A caution and sample code were added to the CP overview page and the function reference pages for the other CP functions.
Furthermore, a link to this precaution was added to all the function reference pages of functions that use a divider internally.

### Note 41-04: (CTRDG) Corrected a problem related to hot-swapping cartridges.

An issue was corrected where, if a soft reset was performed with a Game Pak inserted after first powering up without one, that Game Pak would actually be recognized. This occurred due to the fact that Game Pak recognition was performed during a soft reset in addition to the recognition performed during the usual console startup.

### Note 41-05: (OS) Added the OS_SleepThreadDirect function.

The function OS_SleepThreadDirect, capable of putting a specified thread directly into sleep mode, was added.

### Note 41-06: (OS) Changed internal thread switching.

Made changes so that thread switching in the OS_RescheduleThread function is executed with interrupts disabled.

### Note 41-07: (OS) Adjusted V count at time of startup.

Added a wait process so that the default V count value is constant at program startup.

### Note 41-08: (PRC) Made processing related to dividers thread safe.

A problem was corrected where some code in the PRC SuperFine algorithm was using the divider without having interrupts disabled.

### Note 41-09: (STD) Changed the specifications of character code conversion functions.

Function specifications have been changed so that the number of source characters that have been converted can also be retrieved in the same manner as the number of characters stored after conversion.

### Note 41-10: (WBT) Fixed the WBT_CMD_REQ_GET_BLOCK_DONE notification bug.

A problem was corrected where the WBT_CMD_REQ_GET_BLOCK_DONE notification was not being issued at the time of completion when using the WBT_CMD_PREPARE_SEND_DATA notification with a NULL buffer specified for the WBT_RegisterBlock function.

### Note 41-11: (WBT) Corrected sample demos

A problem was corrected where it was not possible to manage the connection status normally with the $NitroSDK/build/demos/wbt/wbt-1 sample demo when disconnection and connection was carried out repeatedly and the same mode was selected two or more times.

### Note 41-12: (WM) Revised the WM_SetWEPKey/Ex function.

A problem was corrected with the WM_SetWEPKey/Ex function where the function would not function normally if NULL was specified for wepkey when wepMode was WM_WEPMODE_NO.

### Note 41-13: (WM) Changed the reset processing of wepMode.

A problem was corrected where wepMode would not reset in certain cases, such as when the status changed from parent to child.

### Note 41-14: (WM) Corrected a problem related to wepMode settings.

A bug was found where the wepMode of the parent attempting a connection was being set to the child side. This has been changed to reflect instead the value from the WM_SetWEPKey/Ex function called from the child.

### Note 41-15: (WM) Corrected sample demos

The following changes were added to the wh sample library located in $NitroSDK/build/demo/wireless_shared.

- A problem was corrected where the function WH_ChildConnectAuto, which searches for the parent with a given MAC address and automatically establishes a connection, could not be canceled normally.
- This was corrected because the changes in Note 39-23 were incomplete.

### Known problems with SDK 3.2 RC2

None.

## NITRO-SDK Version 3.2 RC

(2006/07/25)

### Note 40-01: (CARD) Corrected the issue of the console not powering down when a card was removed.

In certain instances, the console did not power down when the card was removed with the clamshell closed.
This problem was corrected.

### Note 40-02: (DevEnv) Flaw in the ITCM/DTCM size check using template files.

During the ITCM/DTCM allocated area overflow check using the lcf template file, the allocated area had been calculated as non-overlapped. This was still seen when an overlay area was configured in ITCM/DTCM and the area was actually overlapped through the use of overlays.
In certain cases, this resulted in errors when free space was still available.
Because the ITCM/DTCM size check process with added overlay is not very well implemented in the lcf template, the overlay area will not be part of the used area check.
For this reason, application developers must pay careful attention to the management of the size of the overlay region on ITCM/DTCM.
Specifically, attach a dummy variable at the end of the ITCM/DTCM region and check whether the variable address is out of bounds.

### Note 40-03: (MATH) Corrected the MATHCompareFunc function reference page

In the function reference page for MATHCompareFunc, the description given in "Return Values" was the opposite of the actual operation. This was corrected.

### Note 40-04: (MATH) Changed MATH_QSortStackSize function.

Following the changes described in Note 39-05, MATH_QSortStackSize function was changed to not return a value less than or equal to 0.

### Note 40-05: (MB) Corrected multiboot-PowerSave sample.

In the $NitroSDK/build/demos/mb/multiboot-PowerSave sample, the MB_SetPowerSaveMode function was not actually being called. This was corrected.

### Note 40-06: (MB) Changed the runtime defaults.

Specifications have changed so that the default lifetime value used for wireless control within the MB library is the same as that set for the WM library.

### Note 40-07: (STD) Changed the character code conversion functions.

The following changes have been made in the character code conversion functions.

- An error in the internal character conversion table was corrected.
- Part of the function specifications were changed to allow operations such as getting only the size after conversion and converting partial character strings.

### Note 40-08: (VIB) Changed the VIB library

The following changes were made to the VIB library.

- Added a check so that invalid pulse parameters are not passed to the VIB_StartPulse function.
- Improved pulse control precision following the modification of exclusion control in the library.

### Note 40-09: (WM) Corrected sample demos

The WH_SetSsid function was added to the WH sample module in $NitroSDK/build/demo/wireless_shared/wh.

### Note 40-10: (WM) Prohibited new connections when communication ends.

When terminating a parent using the WM_EndParent and WM_Reset functions, a new child would sometimes connect immediately after the parent disconnected as part of termination processing. The specifications have changed so that the newly connected child is now automatically disconnected in such cases.
The WM_DISCONNECT_REASON_NO_ENTRY notification will be sent to the child as the reason for the disconnection.

### Known issues in SDK 3.2 RC

None.

## NITRO-SDK Version 3.2 PR

(2006/07/07)

### Note 39-01: (CARD) Corrected card pull-out detection.

A bug was corrected where the automatic card removal detection did not work properly on the ARM7 processor side if a card was removed immediately after the program started.

### Note 39-02: (CTRDG) Changed the AGB backup access function reference page.

Added a note to the AGB backup access function reference page stating that IS-NITRO-DEBUGGER version 1.66 and earlier cannot properly access the AGB backup device.

### Note 39-03: (CTRDG) Revision of documents.

Numerous errors were corrected in the following document describing AGB cartridge backup access for the Nintendo DS.
$NitroSDK/docs/TechnicalNotes/AboutAGBBackupforDS.pdf

### Note 39-04: (DevEnv) Ended support of older CodeWarrior versions in shared definition files of the make system.

We ended support for the older versions of CodeWarrior, namely, version 1.0.2 and earlier, in the common definition file commondefs.cctype.CW used by the make system.
Due to this change, the supported version of the compiler is version 1.2 and later.

### Note 39-05: (MATH) Corrected the MATH_QSort function.

A problem was corrected where the function would not execute normally if the number of pieces of data to be sorted was 0 or 1.

### Note 39-06: (MI) Corrected a problem with out-of-bounds access when using LZ77 compression.

When compressing data using the MI_CompressLZ or MI_CompressLZFast functions, the compression failed if the data after compression was larger than the data before compression. When this occurred, a 1byte out-of-bounds access was seen in the compression target buffer.
This problem has been corrected.

### Note 39-07: (MI) Added 8-bit versions of Endian conversion functions.

8-bit versions of functions for Endian conversion have been added.
These have been created to standardize the look of the source code. They do not perform an actual conversion.

### Note 39-08: (OS) Corrected the OS_InitException function.

Due to an error in the conditions set by the exception handler, there was a problem such that the user-specified exception handler could not be called when a program was executed by loadrun.
This has been corrected so that the correct conditions are used.

### Note 39-09: (OS) Changed the function cost calculation.

During function cost calculation, an interrupt occasionally recorded a new cost calculation during the _PROFILE_ENTRY and _PROFILE_EXIT function input/output record save operation. This prevented accurate cost calculations. The issue was circumvented by prohibiting interrupts in the appropriate section of os_functioncost.c.

### Note 39-10: (PM) Corrected a problem where the system would not power down if a card was removed while the LCD was turned off.

As a result of the changes described in "Note 36-13: (PM), Changes to the PM_ForceToPowerOffAsync function," the device would not power down when a card was removed while the LCD was turned off even if the device was closed because PM_ForceToPowerOffAsync could not be called while interrupts were disabled.
This problem has been corrected.

### Note 39-11: (PM) Revised the PM_GoSleepMode function reference page.

The description on the function reference page for the PM_GoSleepMode function did not take into account the applicable guidelines. This has been corrected.

### Note 39-12: (PM) Corrected a problem with the RTC alarm interrupt after recovering from sleep mode.

There have been cases where the RTC alarm interrupt stopped working after recovering from sleep mode if the RTC alarm was not included in the recovery parameter.
This has been corrected.

### Note 39-13: (STD) Corrected the STD_CopyLString Function Reference page.

An error on the STD_CopyLString function reference page has been corrected.

### Note 39-14: (STD) Changed the specifications of STD_CopyLString and added STD_CopyLStringZeroFill.

The STD_CopyLString function has been changed to operate in the same manner as the strlcpy function since it was implemented under a different specification from the standard strlcpy.
The function return value has been changed from a 'char' type pointer, which indicates the copy target pointer, to an 'int' type value, which returns the length of the source string.
In addition, the old STD_CopyLString function, implemented under different specifications from strlcpy, has been added as the function STD_CopyLStringZeroFill. The return value has been changed to an int type value that returns the character string length of the source string just like the function STD_CopyLString.
The difference between these two functions lies in the fact that, if the copy size for STD_CopyLStringZerofFill is larger than the source string, the difference is padded with NULLs.

### Note 39-15: (STD) Added conversion functions Shift_JIS <-> Unicode.

Functions for performing conversion between Shift_JIS and Unicode character strings have been added to the STD library.
We have also added the demo, $NitroSDK/build/demos/std/unicode-1, to show how to use these functions.

### Note 39-16: (TOOL) Support for new overlay-related function with CodeWarrior 2.x.

Beginning with CodeWarrior 2.x, a symbol search target overlay group may be specified when linking.
The lsf file format was extended and the SearchSymbol command supported in order to support this feature.
The makelcf command and lcf template file were also modified in line with this change.
For details, see the makelcf manual.
With this change, CodeWarrior 2.0 is now officially supported.

### Note 39-17: (TOOL) Changed the compstatic Function Reference page.

A description of the -f option has been added to the function reference page for the compstatic tool.

### Note 39-18: (TOOL) Support for new 1 Gbit/2 Gbit ROMs for makerom.

Part of the ROM format has been changed to support the new 1Gbit/2 Gbit ROMs. For a ROM image of 1Gbit or larger, a fixed size area of the top level became a system reserved area.
Beginning with NITRO-SDK 3.2 PR, the ROM format output that conforms to this new specification will be the default setting for makerom.
Add -V1 to the makerom options to output a ROM image in the old format that was used before NITRO-SDK 3.2 PR.

### Note 39-19: (TOOL) Added checking for valid combinations of ROM parameters.

We have made an addition to the rsf file, which specifies the operation of the makerom tool, to check whether the given RomSize and RomSpeedType combination can actually be made into a ROM.
If RomSpeedType is MROM, RomSize must be 512 Mbit or less.
If RomSpeedType is 1TROM, RomSize must be 128 Mbit or more.

### Note 39-20: (WM) Changed the WFS sample demo

Made the following changes to the WM sample demo.

- A problem has been corrected with the WFS sample demo in $NitroSDK/build/demos/wireless_shared/wfs. The internal status of WFS would become abnormal if the WFS_Start function was called before the initialization process of the WFS_Init function had completed.
  This problem does not occur if the initialization function is called while the wireless state of both the parent and the child is IDLE and if the connection starts after this function returns.

### Note 39-21: (WM) Changed the WM_EndDataSharing function.

The state check inside the WM_EndDataSharing function has been deleted in line with the change described in Note 39-23.

### Note 39-22: (WM) Adjusted the link level value when communicating with the Wii console.

The link level value that can be retrieved using the WM_GetLinkLevel function has been adjusted for the case where a Wii console is the MP parent.

### Note 39-23: (WM) Corrected sample demos

Functionality to call the WM_EndDataSharing function has been added inside both of the wc and wh Reset functions. This was done because the WM_EndDataSharing function was not called by either the wh or the wc sample libraries located under $NitroSDK/build/demo/wireless_shared.

### Note 39-24: (WM) Corrected a problem with initialization and shutdown functions.

When a WM library function was called from a different thread or an interrupt handler during the execution of the WM_Init function, initialization was taken to be completed even if it was not. This created the risk of unexpected or illegal operations.
A similar state management problem was seen in the WM_Finish function as well.
These problems have been corrected.

### Note 39-25: (WM) Corrected a problem with port callback initialization inside the initialization function.

An issue with the port callback initialization in WM initialization function resulted in unnecessary warnings. This has been corrected.

### Note 39-26: (WM) Corrected illegal operations during disconnection.

The internal state of WM would occasionally become invalid if repeated connections and disconnections were made frequently. This has been corrected.

### Known issues in SDK 3.2 PR

None.

## NITRO-SDK Version 3.1 Release

(2006/05/02)

### Note 38-01: (CARD) Made changes regarding DMA transfer from ROM

Variables adjacent to the transfer destination buffer used for DMA transfer from ROM were being affected by cache operations if the buffer cache line was not aligned on a 32-byte boundary. This has been corrected.

### Note 38-02: (CTRDG) Added AGB backup access functions

Added functions to the CTRDG library to access the backup device installed in the AGB cartridge.

### Note 38-03: (CTRDG) Added the functions CTRDG_SetPhiClock and CTRDG_GetPhiClock

The CTRDG_SetPhiClock and CTRDG_GetPhiClock functions have been created for setting and getting the clock value output from the PHI terminal of the cartridge.
MI_SetPhiClock and MI_GetPhiClock provided the same functionality in previous versions, but this was changed to CTRDG_ when categories were reviewed.
Even for internal operations, the CTRDG_SetPhiClock function was changed to set the clocks of both the ARM7 and the ARM9.
Previously, it changed only the setting of the ARM9. However, the clock output pattern would change when moving the cartridge access right to the ARM7.
The operation of the CTRDG_GetPhiClock function for getting the clock settings is the same as the MI-GetPhiClock function.

### Note 38-04: (FS) Internally changed the ROM archive

Processing would not complete if the callback function set using CARD_SetPulledOutCallback returned FALSE and an attempt was made to access ROM files using a function like FS_OpenFile before the CARD_TerminateForPulledOut function could be called. This problem has been corrected.
This problem did not occur when loading a file table into memory using FS_LoadTable.

### Note 38-05: (FX) Changed the FX_Mul function

Changed FX_Mul so that a message was displayed by SDK_WARNING if digits overflow.
Additions were also made to the function reference page.

### Note 38-06: (FX) Changed the VEC_Normalize function

Correct results could not be obtained when the value passed to this function was greater than a particular value. It was changed so that a message is displayed by the SDK_WARNING macro when the value is greater than that particular value. This problem has been fixed.
Additions were also made to the function reference page.

### Note 38-07: (GX) Added a description to the Function Reference page for G2_SetBlendAlpha

Added a note to the function reference page for the G2_SetBlendAlpha function that a backdrop cannot be specified for the first target screen.

### Note 38-08: (MATH) Corrected the MATHCompareFunc function reference page

This function is used when sorting using the MATH_QSort function. A note was added to the function reference page for MATHCompareFunc stating that 0 must be returned if the two elements being compared are equal.

### Note 38-09: (MI) Corrected the compression problem with the MI_CompressLZ function

The problem where out-of-bounds access would occur during LZ compression that was revised in Note35-04 is not reflected in MI_CompressLZ, which is the low-speed version of the LZ compression function.
This problem has been corrected.

### Note 38-10: (OS) Changed the OS_GetConsleType function.

A problem was corrected where OS_GetConsoleType might return a value that differs from that described on the function reference page.

### Note 38-11: (OS) Corrected the sample demo exceptionDisplay-2

When using CodeWarrior 2.0 in the $NitroSDK/build/demos/os/exceptionDisplay-2 sample demo, the required function would be dead stripped. This problem has been corrected to explicitly prevent the dead stripping.

### Note 38-12: (PRC) Added figure dictionary data for demo

The stroke order for the Japanese character "GE" in the demo figure dictionary data was incorrect. This problem has been corrected.

### Known issues in SDK 3.1 release version

- Provisional support for CodeWarrior 2.0. However, accompanying changes will have no effect on current applications.
We plan to officially support the extended language codes in the next release.

## NITRO-SDK Version 3.1 RC

(2006/04/11)

### Note 37-01: (CARD) Made Card Library compatible with new backup devices.

Made the Card Library compatible with the 8 MB Flash Backup Device. Added CARD_BACKUP_TYPE_FLASH_8MBITS to the CARDBackupType enumerated type.
The function reference page and sample demos were updated accordingly.

### Note 37-02: (DevEnv) Added .itcm.bss/.dtcm.bss/.wram.bss section

Data placed in a .bss section that did not include initial values was accidentally being placed in the .data section. This occurred because a .bss section had not been specified in the .itcm/.dtcm/.wram section.
Changed $NitroSDK/build/tools/makelcf and $NitroSDK/include/nitro/section.h. Changed the .template files found under $NitroSDK/include/nitro/specfiles and $NitroSDK/build/components/ichneumon. Added a .bss section to .itcm/.dtcm/.wram.

### Note 37-03: (DevEnv) Revised modulerules.cctype.CW

A NITRO-SDK build error would sometimes occur depending on the version of the sed command that was run. This problem has been corrected.

### Note 37-04: (FX) Added MTX_Copy* functions to the Function Reference.

Added descriptions of the MTX_Copy* functions to the FX category of the Function Reference.
The following were added to the Function Reference:

- MTX_Copy22 function
- MTX_Copy33 function
- MTX_Copy43 function
- MTX_Copy44 function

### Note 37-05: (GX) Added G3OP_DUMMY_COMMAND

Added 0xFF, an undefined geometry command, as the dummy command G3OP_DUMMY_COMMAND.

### Note 37-06: (GX) Changed the geometry command cycle list

It has been confirmed that the number of command cycles corresponding to each source increases when an environment map is used.
Information about this was added to the geometry command cycle list in the Function Reference.

### Note 37-07: (MI) Added endian-aware memory access functions

Added a group of functions for reading and writing memory with full awareness of little-endian and big-endian issues.

### Note 37-08: (OS) Corrected OS_CheckHeap

An error would be returned if the heap handle specification was OS_CURRENT_HEAP_HANDLE.
This problem has been fixed.

### Note 37-09: (OS) Changed arena overview

Corrected a mistake in the graphic about arena management and memory allocation in the OS arena overview in the Function Reference. Also added descriptive text.

### Note 37-10: (OS) 8-byte alignment support for the stack

Adjusted stack processing so that the stack pointer is always aligned on an 8-byte boundary during a function call.

### Note 37-11: (PM) Corrected the PM_ForceToPowerOff and PM_ForceToPowerOffAsync functions

Corrected a problem with the specification changes given in Note 36-13.

### Note 37-12: (SND) Added the SND_SetTrackMuteEx function

Added the SND_SetTrackMuteEx function for selecting the processing to apply to a sound that is played while a sequence track is muted.

### Note 37-13: (TOOL) Changed Function Reference page for attachsign

Changed the description for getting the authentication code on the function reference page for the attachsign tool.

### Note 37-14: (TOOL) Corrected a problem where PPM files could not be loaded using the ppmconv tool

When an attempt was made to convert ppm files created with Photoshop (using a NetPBMformats plug-in), the message "Cannot convert file "xxxx.ppm" was displayed and conversion failed.
The problem was due to the fact that the processing implemented for analyzing file headers did not fully cover ppm specifications.
This problem has been fixed.
Several ppm files that could not be converted previously can now be converted.
This fix has no impact on the ppm files that could already be converted correctly.

### Note 37-15: (VIB) Changed the pulse_vib sample demo

The SVC_WaitVBlankIntr function, which was deleted from the source code for all sample demos in the NITRO-SDK (as described in Note 36-15), was being used in the pulse_vib sample demo. Consequently, this function was changed to OS-WaitVBlankIntr.
Furthermore, the specifications were changed so that the sample does not stop even if parameters that violate restrictions on the Rumble Pak library are entered.

### Note 37-16: (WM) Corrected the dataShare-Model sample demo

If the number of children specified by the user (WH_CHILD_MAX) was less than WM_NUM_MAX_CHILD, the WM_GetSharedDataAddress function would be called instead of WH__CHILD_MAX. This problem has been fixed.

### Note 37-17: (WM) Added the wireless-all sample demo

Added the sample demo $NitroSDK/build/demos/wm/wireless-all to show the comprehensive use of WM library functions.

### Note 37-18: (WM) Changed the sample demos

Made the following changes to the WM sample demos.

- Changes were made so that both data sharing and MP direct control modes can be used in the WC sample module of $NitroSDK/build/demos/wireless_shared/wc.
- Made changes so that the maximum number of MP communication transmissions per frame when using the $NitroSDK/build/demos/wireless_shared/wh WH sample module can be set in wh_config.h as WH_MP_FREQUENCY.
  The default value of 1 is used for conventional programs where this value is undefined.

### Known issues in SDK 3.1 RC

- Added a series of functions to the CTRDG library for accessing the backup device installed in the AGB cartridge.
However, correction functioning is not guaranteed because verification of these newly added AGB backup access functions is not complete.
We plan to officially support the extended language codes in the next release.
- Provisional support for CodeWarrior 2.0. However, accompanying changes will have no effect on current applications.
We plan to officially support the extended language codes in the next release.

## NITRO-SDK Version 3.1 PR

(2006/03/14)

### Note 36-01: (ARM7) Improved automatic pull-out detection of components

In the past, it was not possible to execute pull-out detection of another device when continuously locking one of the card or cartridge buses using the OS_Lock* function over an extended period of time. This has been changed in the current release so that pull-out detection can be performed.

### Note 36-02: (CARD) Internal changes made to the CARD_CheckPulledOut function.

Specifications have been changed when the CARD_CheckPulledOut function is called multiple times so that a callback function is not called every time. The callback can now be called only once when calling the CARD_CheckPulledOut function or because of ARM7 pull-out detection.

### Note 36-03: (CTRDG) Strengthened access restrictions to the AGB cartridge region

In order to avoid sudden write access to the AGB cartridge region, processing for changing the initial settings of the protection region have been added to the CTRDG_Init function. When writing to a cartridge, cartridge information must be checked and the CTRDG_Enable function must be called.
Note that processing will be forcibly stopped when outputting a debug string using OS_Printf or another function unless you are using IS-NITRO-DEBUGGER version 1.65, which is compatible with this function.

### Note 36-04: (CTRDG) Added the CTRDG_CheckPulledOut function.

The function CTRDG_CheckPulledOut has been added for quick cartridge pull-out detection from the ARM9.

### Note 36-05: (GX) Corrected 2D_CharBg_Direct sample demos

Changes were made so that correct settings are made by the G2_SetBG3ControlDCBmp function before the GX_LoadBG3Bmp function when using the sample demo $NitroSDK/build/demos/gx/UnitTours/2D_CharBg_Direct.

### Note 36-06: (GX) Edited Function Reference description for G2_GetBG2ScrPtr and G2_GetBG3ScrPtr functions

There were incorrect descriptions of the bitmap BG in the Function Reference information for the G2_GetBG2ScrPtr and G2_GetGB3ScrPtr functions. This problem has been fixed.

### Note 36-07: (MB) Added MB_FAKESCAN_PARENT_BEACON notification

MB_FAKESCAN_PARENT_BEACON was added to the events about which the MBFakeScanCallbackFunc callback receives notification. This notification is sent each time an MB parent beacon is received.
In line with this, processing for using the MB_GetUserVolatData function with the sample demos multiboot-Model and fake_child has been added.

### Note 36-08: (MB) Corrected the operation of MB_ReadMultiBootParentBssDesc

The magicNumber and ver members of gameinfo, which should usually be specified inside the MB_ReadMultiBootParentBssDesc function, remained uninitialized. This problem has been fixed.

### Note 36-09: (MB) Corrected a problem with the number of retries when reconnecting to a clone boot sample parent

The changes described in Note 20-08: were not applied to the clone boot sample. Further, retry was impossible if even one attempt at connection to the parent failed when reconnecting to a parent after a child's boot. This problem has been fixed.

### Note 36-10: (MB) Updated documentation

The following document about the MB library has been updated.
$NitroSDK/docs/technicalNotes/AboutMultiBoot.pdf

### Note 36-11: (MIC) Described restrictions during automatic sampling

A note was added to the Function Reference that there is a restriction which does not allow extended main memory to be specified as a buffer for storing sampling results when performing auto-sampling for the microphone. No change has been made to library operations.

### Note 36-12: (PM) Corrected problem related to the PMAmpGain enumeration type

The constant PM_AMPGAIN_DEFAULT used inside the PM_GAINAMP_DEFAULT macro was not actually defined. This has been corrected and PM_AMPGAIN_DEFAULT has been added to the PMAmpGain enumerator type.

### Note 36-13: (PM) Changed the PM_ForceToPowerOff and PM_ForceToPowerOffAsync functions

When an application attempts to turn off power to the DS unit, the DS main unit will occasionally restart if main power was turned off during the LCD OFF status.
The specifications of the PM_ForceToPowerOff and PM_ForceToPowerOffAsync functions have therefore been changed so that power is turned off after the LCDs are turned on.

### Note 36-14: - (TOOL) Fixed the inclusion order within ROM when specifying files to makerom using wildcards.

When using wildcards to specify files to be stored in ROM with makerom, the order in which the files were stored depended on the order in which the entries appeared in the PC file system. Consequently, the order in which files were stored would change across different PCs regardless of the fact the same application was being built.
This problem was fixed so that files are now sorted by name before being stored when using makerom.

### Note 36-15: (VIB) Added VIB library

The VIB library has been added to control the Rumble Pak option cartridge for the Nintendo DS.

### Note 36-16: (WBT) Corrected the WFS sample module

We fixed the following problems with the WFS sample module compiled in $NitroSDK/build/demos/wireless_shared/wfs.

- Data at the end of the list was undefined in file list initialization on the parent side.
- File handles on the parent side were insufficient when receiving multiple file requests simultaneously and with high frequency from the maximum number of children that can be connected.
- File requests of other children would not proceed when a child who was in the middle of requesting a file was disconnected.

### Note 36-17: (WBT) Corrected Function Reference

The fact that the following commands can be directly issued from one child to another was described incorrectly in the Function Reference. This problem has been fixed.

- WBT_PutUserData
- WBT_GetBlockInfo
- WBT_GetBlock

### Note 36-18: (WBT) Added Overview to the Function Reference

The item "Overview" was added to the WBT library function reference page.

### Note 36-19: (WM) Changed specifications regarding NULL response from children during MP communication

Specifications were changed so that a Null response would not be returned from children in the middle of MP communication as described in Note 30-06. However, this would occasionally result in unstable operations depending on the environment. Consequently, the change described in Note 30-06 has been canceled and the previous specification has been restored.
In addition, instead of allowing Null responses from child devices, if a parent device receives a Null response from a child device, it assumes that the child device had a communication failure.
Since the WM_SetMPInterval function has been added, excess load problems on the child side should not result even if changes are made later on to allow Null responses to be returned.

### Note 36-20: (WM) Changed WMGameInfo structure definitions

The definition of the WMGameInfo structure has been changed. The version field was eliminated and the name was changed to magicNumber. The magicNumber field is fixed at 0x0001 when used as a DS beacon. In addition, the ver field has been established using one byte from reserved memory.
In the current version, the ver field is always 0. In the future, this will increase as the format of the WMGameInfo structure changes. To ensure backward compatibility in the future, there must be no restriction on operations based on checking the ver field. Due to these changes, it is necessary to re-write programs that accessed WMGameInfo.version.
In addition, the name of the field gameNameCount_attribute has been changed to "attribute." Although this field can be accessed using the old name, be sure to use the new field name from now on.
In addition, support of the compile switch WM_GAMEINFO_TYPE_OLD, which is never used, has ended due to this change.

### Note 36-21: (WM) Added the WM_IsValidGameBeacon and WM_IsValidGameInfo functions

WM_IsValidGameBeacon and WM_IsValidGameInfo functions were added to determine whether or not the scan result beacon is that of a DS wireless play parent. Internally, a determination is made whether or not WMGameInfo.magicNumber is correct. In addition, each WM demo has been changed to use this function.

### Note 36-22: (WM) Corrected a problem with minPollBmpMode

Communications would be discontinued after a set time interval and the MP lifetime would run out when the MP communications option minPollBmpMode was enabled. This problem has been fixed.
Only titles that perform special communications using minPollBmpMode are affected by this problem.

### Note 36-23: (WM) Updated documentation

The following document about the WM library has been updated: $NitroSDK/docs/technicalNotes/AboutWirelessManager.pdf

### Note 36-24: (Misc) Corrected description of macros

Corrected the descriptions of macros where () were not attached to arguments.
This change has no effect so long as no arguments are being used where the functionality changes depending on the presence or absence of parentheses.
The following macros have been changed.

- SDK_NULL_ASSERT
- SDK_ALIGN4_ASSERT
- GX_VFCFX10
- GX_FX16ST
- GX_COMP4x4_PLTT_IDX
- GX_PACK_MTXMODE_PARAM
- GX_PACK_VIEWPORT_PARAM
- SVC_CpuClear*
- SVC_CpuCopy*
- WC_ROUNDUP_32

Corresponding function reference pages have also been changed.

### Known issues in SDK 3.1 PR

None.

## NITRO-SDK Version 3.0 Release

(2006/01/16)

### Note 35-01: (CARD) Added an overview to the Function Reference

Added overviews to the Function Reference pages in the CARD library.

### Note 35-02: (DevEnv) Added a Function Reference page for the packnlf tool

Added a Function Reference page for the packnlf tool.

### Note 35-03: (DevEnv) Unified the source code format

The source code format with respect to indents and carriage returns has been standardized in the library and demos.

### Note 35-04: (MI) Corrected LZ compression problems with the MI_CompressLZFast function and ntrcomp.exe

There was a possibility when using the MI_CompressLZFast function for LZ compression that there would be out-of-bound memory accesses.
The same problem was found in ntrcomp.exe after NITRO-SDK 3.0 RC2. There was also the possibility of unusual termination or a slight increase in the size of compressed data.
These problems have been fixed.

### Note 35-05: (OS) Corrected problems in the OS_ResetSystem function

An infinite loop inside the library would result if the cartridge bus was locked when the OS_ResetSystem function was called because this function internally accesses cartridges. This problem has been fixed.
This problem appears only in NITRO-SDK 3.0 RC3.

### Note 35-06: (OS) Edited the Chinese version startup screen

Changes described in Note 32-23 resulted in the display of garbage characters on the startup screen. This problem has been fixed.

### Note 35-07: (PRC) Added figure dictionary data for demo

The stroke order of the Japanese character "KE" in the figure dictionary data for the demo was wrong, so "KE" in the figure dictionary demo was corrected.

### Note 35-08: (WM) Corrected the display of the debug string in the sample demo

Changed the debug output of the sample libraries wh, wfs, and wc in $NitroSDK/build/demo/wireless_shared to display "0x" before hexadecimal numbers.

### Note 35-09: (WM) Changed internal communication parameters

MP communications could fail easily depending on the environment. Improvements were therefore made by making changes to the communications internal parameters.

### Known issues in SDK 3.0 release version

None.

## NITRO-SDK Version 3.0 RC3

(2005/12/26)

### Note 34-01: (MATH) Added bit operation function

The following inline function groups which perform bit operations were added:

- The MATH_CountTrailingZeros and MATH_CTZ macros
- The MATH_GetLeastSignificantBit and MATH_LSB macros
- The MATH_GetMostSignificantBit and MATH_MSB macros

### Note 34-02: (MB) Fixed a bug that occurred when designating memory conservation with the MB_ReadSegment function

When a small buffer size was designated with the MB_ReadSegment function and the distribution data was dynamically loaded from the archive, block transfer became unable to proceed. This problem has been fixed.

### Note 34-03: (MB) Improved MP communication effectiveness under adverse conditions

Transfer rates were adversely affected where WM_ERRCODE_SEND_FAILED was issued frequently on the parent device in bad communication environments during block transfers in the MB library. This problem has been fixed.

### Note 34-04: (OS) Changed the CARD_CheckPulledOut function reference page

The ARM946E-S, a CPU on the Nintendo DS, does nothing when the pld instruction is executed. This fact has been added to the function reference page for the DC_TouchRange function, which executes that instruction.

### Note 34-05: (OS) Corrected the OS_CreateThread function

Depending upon the initial value of the thread structure initialized with OS_CreateThread, an access exception error would be raised when the thread was executed. This problem has been fixed.

### Note 34-06: (WBT) Corrected wbt-1 sample demos

A compilation error prevented a correct build when the macro switch NOT_USE_ALLOC in the sample source of the $NitroSDK/build/demos/wbt/wbt-1 sample demo was enabled. This problem has been fixed.

### Note 34-07: (WBT) Corrected a problem with the user callbacks

The value of the result member of the arguments to the user callbacks that indicates command completion was not being set. This problem has been fixed.

### Note 34-08: (WM) Corrected a problem with MP communication parameters

The configuration of each of the MP communication parameters added in 3.0 RC2 was not functioning properly. This problem has been fixed.

### Note 34-09: (WM) Made changes to the method of setting the WH-related parameters

Previously, all of the SDK demos that used WH referenced $NitroSDK/build/demos/wireless_shared/wh/wh_config.h directly and had shared configurations. Now, each demo has its own individual configuration.
Because of this change, the location of wh_config.h has been changed to $NitroSDK/build/demos/wireless_shared/wh/default/.

### Note 34-10: (WM) Improved internal operations during disconnect

Internal operations are sometimes affected immediately after a disconnect. The WM library was modified to address this.

### Known problems with SDK 3.0 RC3

None.

## NITRO-SDK Version 3.0 RC2

(2005/12/05)

### Note 33-01: (CARD) Corrected problem with backup function

CARD_RESULT_TIMEOUT can be returned even if the backup write succeeds if the backup write is small and it executes during wireless communication. This problem has been fixed.

### Note 33-02: (CTRDG) Added access permission functions for AGB cartridges

Added the following group of functions for controlling access permissions to AGB cartridges.

- CTRDG_IsEnabled
- CTRDG_Enable
- CTRDGi_CheckEnableld

### Note 33-03: (DevEnv) Added macro for comparing SDK versions

Added the macro SDK_VERSION_NUMBER for converting the SDK version to a numeric value.
Also added the constant SDK_CURRENT_VERSION_NUMBER to represent the current SDK version.

### Note 33-04: (DevEnv) Added SDK_INLINE, SDK_DECL_INLINE

Added SDK_INLINE and SDK_DCL_INLINE as macros for specifying inline functions.
This allows the format of inline specifications to be changed all at once.
The entire NITRO-SDK must be rebuilt if these macros are changed.
Code size can be reduced by changing these macros from static inline to inline. This applies only when using the environment with the compiler version in which the inline function problem was fixed and only when using functions that changed from inline to static inline.
Since changing these macros could produce uncertain results, base the decision to use them on the needs of the application.

### Note 33-05: (DevEnv) Corrected makebanner tool

Character strings could not be included in a banner file if the start of the game title or descriptive text happened to match a specified parameter described in the bsf file used by the makebanner tool. This problem has been fixed.

### Note 33-06: (DevEnv) Updated ntexconv

$NitroSDK/tools/bin/ntexconv.exe has been updated to the version of netconv.exe inside the latest release of the TXLib package.
Although the functioning of the SDK does not change because ntexconv.exe is used only during the creation of icon images, the version of ntexconv.exe in the SDK can now be used even when creating textures.

### Note 33-07: (DevEnv) Added the packnlf tool

The paknlf tool has been added. This tool collects all file specifications referenced by a .nlf file as absolute paths and outputs them as a ZIP file.
Although this tool was included it NITRO-SDK 3.0 RC, it was not mentioned in the changelog.

### Note 33-08: (MB) Corrected the MBP sample module

The following correction was made to the MBP sample module included in $NitroSDK/build/demos/wireless_shared/mbp:

- The parent device would hang if the parent called MBP_StartRebootAll and the last child still connected cancelled its connection just as the other children were attempting to reboot. This problem has been fixed.

### Note 33-09: (MB) Added MB_FAKE_WORK_SIZE definition

The buffer size required to call the MB_FakeInit function has been defined as MB_FAKE_WORK_SIZE. This value is defined as the size of the data retrieved by the conventional MB-FakeGetWorkSize function.

### Note 33-10: (MB) Corrected problem with the parent beacon flag

Applications could fail to detect that they were sharing the same GGID when using wireless play and download play. This could happen because the WM_ATTR_FLAG_MB flag remained disabled while only the WM_ATTR_FLAG_ENTRY flag was enabled for the first beacon that was sent by an MB parent device.

### Note 33-11: (MI) Added the MI_CompressLZFast function

The function M_CompressLZFast, which requires a work buffer of about 9 kB, has been added to perform LZ compression at rates several times faster than MI_CompressLZ, the function that has been available for LZ compression.

### Note 33-12: (OS) Added an automatic build switch for ARM7 debug output

NITRO_ENABLE_ARM7_PRINT has been added as a build switch for setting the debugger to automatically call the OS_InitPrintServer and OS_PrintServer functions from inside the OS library.
Standard specifications are used if this switch is not specified.
This build switch is enabled only for the OS library. The OS library must be rebuilt if the setting is changed.

### Note 33-13: (OS) Changed the definition of the VBlank wait function

SVC_WaitVBlankIntr does not release resources to low-priority threads. Since this would cause problems depending on how the function was used, a call to SVC_WaitVBlankIntr is now automatically replaced by a call to OS_WaitVBlankIntr. Note, however, that this replacement is made using defines inside a header file. The desired result is achieved only after the first rebuild.
The result of this change is actually a slight increase in overhead until V-blank interrupt wait operations are executed. Although there is almost no effect on application behavior, if you must use conventional system calls for some reason, you can disable this change by defining the environment variable NITRO_SVC_WAITVBLANK_COMPATIBLE. Be sure to verify your code thoroughly since the problem with threads remains unresolved if you do this.
or Note 32-18: Although it was reported in Note 32-18:(OS) Improved V-blank wait function that the SVC_WaitVBlankIntr function could be overwritten by another definition using weak symbols, the original functionality has been restored because the need for weak symbols has now been eliminated.

### Note 33-14: (OS) Deleted OS_InitPrintServer and OS_PrintServer from the sample demo

Deleted OS_InitPrintServer and OS_PrintServer from all NITRO-SDK sample demo source code.

### Note 33-15: (OS) Deleted PXI_Init from the sample demo

Deleted PXI_Init from all NITRO-SDK sample demo source code.
Demo operations are not affected by this change.

### Note 33-16: (OS) Changed SVC_WaitVBlankIntr in the sample demo

The parts of all NITRO-SDK sample demo source code that used to call SVC_WwaitVBlankIntr have been changed to call OS_WaitVBlankIntr.
Demo operations are not affected by this change.

### Note 33-17: (OS) Changed the start location of extended main RAM arena

0x240000 is used for the lcf template definition even though the start address of the extended main memory arena given on the OS arena overview page is 0x23e0000. (If there is an overlay, an even higher address results.)
0x23e0000 is used so as to match the information on the OS overview page.

### Note 33-18: (WBT) Corrected the WFS sample module

We fixed the following problems with the WFS sample module compiled in $NitroSDK/build/demos/wireless_shared/wfs.

- In the case of several functions, better decisions have been made regarding the appropriateness of making calls before initialization and after exiting.

### Note 33-19: (WBT) Changed the WFS-related sample demo

Processing inside the sample demo below, which uses the WFS sample module, has been changed so that parent disconnections during a read by a child calling FS_ReadFile can be detected.

- $NitroSDK/build/demos/wbt/wbt-fs
- $NitroSDK/build/demos/mb/multiboot-wfs

### Note 33-20: (WM) Corrected the 2D_CharBg_3 and Sub_CharBg_3 sample demos

Corrected a problem in the $NitroSDK/build/demos/gx/UnitTours/{2D_CharBg_3,Sub_CharBg_3} sample demo where execution would stop due to an ASSERT if the object was shrunk too much.

### Note 33-21: (WM) Added a timing configuration function for MP communication

Previously, the V alarm count was fixed at 260 for the parent and at 240 for children during frame synchronous communication mode when beginning to prepare the first MP communication of each frame. The WM_SetMPTiming function has been added to effect this setting. Due to restrictions on the implementation, these values must be set either in the range 220 to 260 or the range 0 to 190.
The ARM7 operates actively during communication processing and frequently blocks the ARM9 from accessing main memory. The average operational performance of the ARM9 can sometimes be improved by adjusting communication timing to help alleviate the situation. The conventional setting values are used as defaults unless other settings are explicitly made.

### Note 33-22: (WM) Added a function to configure the send size for MP communications

Until now, the size of transmissions sent using MP communication have been fixed at values given by the parentMaxSize and childMaxSize fields of the WMParentParam structure that the parent sets with the WM_SetParentParameter function before communication starts. The parent send size and child send size can be set using the functions WM_SetMPParentSize and WM_SetMPChildSize.
The send size of the parent and child are initialized to the values set for parentMaxSize and childMaxSize in the WMParentParam structure when the parent executes the WM_StartParent function. Smaller values than these can be set using the WM_SetMPParentSize and WM_SetMPChildSize functions. However, the default initial values cannot be exceeded. Setting the parent send size on the child side is meaningless. However, the setting for the child send size is used to overwrite the child send size setting on the parent side every time MP communications are carried out.
There is not much advantage in changing the setting for parent transmissions since the smaller the amount of data, the shorter the radio signal output. Still, the child side always sends out a radio signal with the number of bytes designated in childMaxSize. Thus, by reconfiguring the necessary size, the transmission time can be reduced and communications can be stabilized. Given the current implementation, if an amount of data larger than the send size (as modified using these functions) has already been configured by the WM_SetMPDataToPort function, that data will not be sent. Instead, it will just continue to collect in the send queue.

### Note 33-23: (WM) Added a spacing control function for MP communication

The function WM-SetMPInterval has been added to allow setting the time interval between one MP communication and the next. This occurs during MP communications in continuous communication mode and beginning from the second transmission in frame synchronous mode. This can be specified independently for the parent and children in units of microseconds.
The default values are 1000 microseconds for the parent and 0 microseconds (no interval) for the children. Throughput can be increased by adjusting this value. However, throughput may also be worsened due to dropped data if the MP communication interval for the parent is shorter than the time it takes the children to process the received data. Generating unnecessary resends will also adversely affect the bandwidth efficiency.

### Note 33-24: (WM) Updated the dataShare-Model sample demo

A feature for displaying information about the parent to be connected to has been added to the parent list window in the sample demo $NitroSDK/build/demos/wm/dataShare-Model.

### Note 33-25: (WM) Corrected the display of the dataShare-Model sample demo

The text output screen displayed at the startup of the sample demo $NitroSDK/build/demos/wm/dataShare-Model would sometimes break. This problem has been fixed.

### Note 33-26: (WM) Added a way to set the maximum number of MP communications per frame.

Although the maximum number of MP communications per frame (including resends) used to be fixed at six, this can now be set to other values. Set WMMMPParam.maxFrequency using WM_SetMPParameter. The processing of the fixFreqMode argument by WM_StartMPEx has been changed so that maxFrequency is also set to the value of mpFreq.

### Note 33-27: (WM) Changed the specification for the receive signal strength level

If a send fails, a correction is applied to the receive signal strength level that can be retrieved by WM_GetLinkLevel. However, this correction is performed differently for the parent than for the children. The receive signal strength level for the parent and for the children can differ greatly even under the same conditions.
To solve this problem, the standard to detect failed transmission of a parent was relaxed. In this way, the reception strength level of the parent became closer to that of the child.

### Note 33-28: (WM) Added an option for disabling the pre-check of the send/receive buffer size

A special option has been added to ignore various validity checks (pre-check of the send/receive size setting value, send/receive buffer size, and communication time limit of 5600 microseconds) that were done in the WM_StartMP function. Set WMMPParam.ignoreSizePrecheckMode to TRUE using the WM_SetMPParameter function before calling WM_StartMP.
Combining this feature with the WM_SetMPParentSize and WM_SetMPChildSize functions allows the send size to be adjusted according to changing conditions, such as the number of children that are connected. In the application, do not to exceed the communication time limits or the send/receive buffer size. If the send buffer size is insufficient and an attempt is made by the parent to start MP communications, this will be detected at execution time. If the condition continues, communication will be cut off because of the timeout on MP lifetime.

### Note 33-29: (WM) Added a note regarding the wireless communication event counters

Unexpected behavior was reported where several event counters were cleared when accessing buffers located in a particular address space in wireless hardware.
Consequently, the event counters may have a value that is less than the actual event counts.
Some event counters retrieved by WM_GetWirelessCounter may not have the correct values.
Information has been added to the Function Reference about this.

### Known problems with SDK 3.0 RC2

None.

## NITRO-SDK Version 3.0 RC

(2005/11/07)

### Note 32-01: (CARD) Changed internal processing of EEPROM device operations

When an EEPROM device was being used for backup, there was an occasional problem with abnormalities in the initial values of the hardware internal status at startup. A process was added to deal with this issue.

### Note 32-02: (CARD) Added removal detection after ROM access

Added detection of whether the card had been removed after every read performed by the CARD_ReadRom function or the CARD_ReadRomAsync function.
As a result, the application will no longer refer to invalid data before it receives a notification of the remove-detection callback.

### Note 32-03: (CARD) Made Card Library compatible with new backup devices.

Modified the Card Library to support the 4 MB Flash Backup Device. Added CARD_BACKUP_TYPE_FLASH_2MBITS to the CARDBackupType enumerated type.
The Function Reference and sample demos were updated accordingly.

### Note32-04: (DevEnv) Corrected the #pragma define_section parameters

The #pragma define_section parameters were incorrectly written as being delimited by commas, namely:
“#pragma define_section DTCM ".dtcm",".dtcm",abs32,RWX.”
They were changed to be delimited by a space, namely:
“#pragma define_section DTCM ".dtcm" abs32 RWX.”
Correct any other erroneous descriptions like the one above in the same way.

### Note 32-05: (DevEnv) Added a resource data conversion tool for the ENV library

Added the xml2env tool to convert resource data for the ENV library written in XML format to the C source file format. Also added the init2env tool for converting resource data for the ENV library written in INIT format to the C source file format.

### Note 32-06: (DevEnv) Corrected the NITRO-SDK Package creation script

In the NITRO SDK 3.0 PR - 3.0 PR4 packages, there was a flaw in the script used when creating packages that resulted in the THUMB version ichneumon components not operating correctly.
This problem has been fixed.

### Note 32-07: (DevEnv) Changed the version of CodeWarrior used for SDK package build

(DevEnv) Changed the version of CodeWarrior used for the SDK package build to 1.2SP1.
Also made it so that the build numbers of the CodeWarrior compiler and linker used to build to $NitroSDK/include/nitro/version.h are recorded.

### Note 32-08: (DevEnv) Added a reference to the compilation target

Added an explanation of the compilation target to the function information in the Function Reference.

### Note 32-09: (ENV) Added a reference to the ENV library

Added a reference to the ENV library

### Note 32-10: (ENV) Changed the ENV library

Changed the ENV_Init function. Added the function ENV_AppendResourceSet. Previously, ENVResource was passed as an argument to the ENV_Init function. Now, several ENVResources can be registered.

### Note 32-11: (GX) Corrected the G3BS_LoadMtx43 function

The condition parameters of the ASSERT used by G3BS_LoadMtx43 were wrong. This problem has been fixed.

### Note 32-12: (GX) Further corrections to Sub_Double3D sample demo.

The following correction was made to the `$NitroSDK/build/demos/gx/UnitTours/Sub_Double3D` sample demo:
The correction described in Note 29-02 was not complete and the same symptoms still appeared occasionally. The problem was corrected again and explanations were added as comments to the SwapBuffers command and the geometry engine.

### Note 32-13: (MATH) Corrected problem with the MATH_QSort function.

There was a bug in the MATH_QSort function. It was possible that some values would not be sorted properly in either ascending or descending order after being sorted.
This problem has been fixed.

### Note 32-14: (OS) Corrected the HI address calculations for the ARM7-specific WRAM arena

If the IRQ stack size on the ARM7 side was set to 0 or was negative, the domain was determined by the first position in WRAM. The cause was a mistake in the HI address calculations of the ARM7-specific WRAM arena.
It should have been based on the end of a program domain which occupies the first position of WRAM.
After the fix, the calculations were correct.
However, since the stack area specification was defined with a positive value in the previous mongoose and ichneumon, there functioning is the same whether before or after the correction.
Since the mongoose and ichneumon SDK attachments are used in typical game applications, they are not influenced by this change.

### Note 32-15: (OS) Created the OS_GetTotalOccupiedSize function

Added the OS_GetTotalOccupiedSize function, which gets the memory size used in the heap.
The existing OS_GetTotalAllocSize function totaled the size of the data area of the memory block being used. The OS_GetTotalOccupiedSize function, on the other hand, also adds in the size of the header portion of the memory block.

### Note 32-16: (OS) Corrected the OS_PutString function.

When the FINALROM is built, the OS_PutString function was replaced with unreachable code, but the dead code stripping of the argument was not executed. This problem has been corrected. Now, none of this function is executed and the dead code stripping of the argument is performed.

### Note 32-17: (OS) Added SDK_COMPILER_ASSERT

Conditions are inspected when compiling. The SDK_COMPILER_ASSERT macro was added to generate a compilation error if those conditions are not met.

### Note 32-18: (OS) Improved the VBlank wait function

When waiting for a VBlank interrupt using the SVC_WaitVBlankIntr system call, the thread called for this function does not stop. There is thus a problem that resources are not obtained by lower priority threads while waiting for the interrupt. The cause is in the system call. The OS_WaitVBlankIntr function was created as an alternative that stops the thread while waiting for a VBlank interrupt. Also, the SVC_WaitVBlankIntr function which calls the system call was made into a weak symbol. It was also modified so that it could be overwritten by another definition.

### Note 32-19: (OS) Changed the argument const of the cache function

In functions that take as an argument a pointer to a cache operation function that starts with DC or IC, use const for internal operations that do not change the content.
The functions that were changed are:

- DC_StoreRange
- DC_FlushRange
- DC_TouchRange
- DC_LockdownRange
- DC_CleanRange
- DC_CleanAndInvalidateRange
- IC_PrefetchRange
- IC_LockdownRange

### Note 32-20: (OS) Corrected the stack overflow check function

In the check stack overflow functions OS_SstIrqStackWarningOffset and OS_SetThreadStackWarningOffest that set the check code in the middle of the stack, the overflow check code set at the bottom of the stack was being overwritten. For this reason, the stack check was not operating correctly. This problem has been fixed.

### Note 32-21: (OS) Support for the argument data buffer switch

In the ROM image, you can get argument data embedded with the tool command buryarg from the program using functions such as OS_GetArgv function and OS_GetOpt. This argument data buffer can now be changed at run time. See the OS_SetArgumentBuffer function and the OS_GetArgumentBuffer function.
Also, we have made available the OS_ConvertToArguments function for converting a character string to an argument data buffer.

### Note 32-22: (OS) Corrected the actual time and the check value conversion macro

The macro that changes both actual time and tick values in functions such as OS_SecondsToTicks and OS_TicksToSeconds was corrected.
Calculations were being done with 32-bit accuracy. When too large argument was given, overflow occurred and the correct value was not returned.
The correction is as follows.
-Internal operations in existing macros have been changed to use 64 bits.
-If you explicitly want to use 32-bit internal operations, the following functions are available:

- OS_SecondsToTicks32 Function
- OS_MilliSecondsToTicks32 Function
- OS_MicroSecondsToTicks32 Function
- OS_TicksToSeconds32 Function
- OS_TicksToMilliSeconds32 Function
- OS_TicksToMicroSeconds32 Function

### Note 32-23: (OS) Updated the Chinese version’s startup screen

The Chinese version startup screen, which is displayed with OS_InitChina, has been updated.

### Note 32-24: (OS) Corrected thread queue operations, including threads about to terminate

When a certain thread registered with the thread queue was terminated by functions such as OS_DestroyThread or OS_KillThread, the information about the thread was removed from the thread queue. This information includes when that thread terminates another thread while waiting for that thread to end in the OS_JoinThread function.
Until now, deleted thread information remained in the thread queue. As a result, when the OS_WakeupThread function was executed to make all threads in the queue executable, the deleted threads were included also. This caused a bug in the thread list status. This problem has been fixed.

### Note 32-25: (PRC) Corrected the sample tool “pdic2c.pl”

The pdic2c.pl sample tool used with the PRC demo was in an old format. This has been corrected. Also, an option has been added to output header files and source files to separate files.

### Note 32-26: (RTC) Changed the method for getting RTC day of the week information

When data including the day of the week is read from the RTC, the day of the week calculated from the date is now returned. Previously, the value stored in the RTC was returned as is. However, after passing the last date that can be displayed by the RTC -- 12/31/2099 23:59 -- the day of the week information was wrong until the the RTC was reset.

### Note 32-27: (SND) Corrected a problem where the SND_CalcDecibel function would not return a suitable value when the argument 0 had been entered

With the function SND_CalcDecibel (or SND_CalcDecibelSquare), -723 was returned when the argument was set at 0. This was corrected to return -32768.
Up until this correction, when using the volume modulation, sound could still be heard even if the player volume had been set to 0.
This problem has been fixed.

### Note 32-28: (STD) Added STD library

Created an STD library to handle the string operation related to the API group. The following functions are included in the STD library:

- STD_CopyString [STD_StrCpy]
- STD_CopyLString [STD_StrLCpy]
- STD_SearchString [STD_StrStr]
- STD_GetStringLength [STD_StrLen]
- STD_ConcatenateString [STD_StrCat]
- STD_CompareString [STD_StrCmp]
- STD_CompareNString [STD_StrNCmp]
- STD_CompareLString [STD_StrLCmp]
- STD_TSScanf
- STD_TVSScanf

Note that the functions listed on the right inside brackets are alternate names for the functions listed to their left. For example, STD_StrCpy is an alternate name for STD_CopyString.

### Note 32-29: (WBT) Corrected a problem with GetBlock request notifications

The system callback notification WBT_CMD_REQ_GET_BLOCK_DONE, which should be generated only when a partner's WBT_GetBlock function finishes, was also being generated by WBT_GetBlockInfo. This problem has been fixed. Applications that do not use this notification are unaffected.

### Note 32-30: (WBT) Corrected the WFS sample module

We fixed the following problems with the WFS sample module compiled in $NitroSDK/build/demos/wireless_shared/wfs.

- When WFS_Init was called multiple times, the function still be in the interrupts prohibited state when it returned. This problem has been fixed.
- Changed the internal work memory that was statically resident so that it is now allocated from the allocator when the WFS_Init function is called.
- This was corrected because WM_PORT_BT, which is reserved by the SDK as a port number, was being used in the various sample demonstrations using WFS.

### Note 32-31: (WM) Updated the WM test tool

Made the channel information on the same parent device change when WMTestToll.srl scans.

### Note 32-32: (WM) Corrected the description on the WM_SetLifeTime Function Reference page

There was a mistake in the description on the WM_SetLifeTime Function Reference page. This problem has been fixed. The description said that the frame lifetime default value was "no lifetime". However, the correct description is "beacon interval x 5."

### Note 32-33: (WM) Improved mongoose components

When mongoose is used as an ARM7 component, access to the ARM9 main memory during the asymmetric operation of transitioning the state of the WM library is largely inhibited. This problem has been solved by improving the mongoose component. Note that this problem was not necessarily solved, merely improved.

### Note 32-34: (WM) Added information in the notification to the port receive callback

Added the connectedAidBitmap field to WMPortRecvCallback. The AID bitmap during the current connection is stored there.

### Note 32-35: (WM) Added notification when the port receive callback initializes

WM_STATECODE_PORT_INIT was added to WMStateCode. It was changed so that the port receive callback in this state code is called when WM_SetPortCallback is called. This assumes that the initialization operation is run using the connectedAidBitmap field or the myAid field of WMPortRecvCallback. In order to maintain connection notification consistency, keep in mind that the callback call by WM_STATECODE_PORT_INIT also happens during an interrupt prohibited state.
Due to this change, there is a possibility that a similar incompatibility with Note 32-38 might occur.

### Note 32-36: (WM) Added API for tests

The test API in the WM library has been expanded. This API is used for testing and is otherwise not normally used. Despite this new API, WMlibrary operations have not been altered when this library is used normally. However, the WMApiid listing type has been extended by the addition of this API. Bear in mind that programs which depend on the row order of the listing may be affected.

### Note 32-37: (WM) Corrected a problem where the wireless connection function stops when a child device calls the WM_EndMP function

When the parent device maintained an MP connection, the wireless communication feature was stopped after a child device called the WM_EndMP function at a specific time. This problem has been fixed. This bug appears in the SDK after version 3.0. When wireless communication has finished, the termination callback for asymmetric functions related to wireless communcations will no longer be called. We know the bug occurs when several child devices are connected using fake_child. Further, when communication is terminated by an operation from the parent device, this bug is not an issue.

### Note 32-38: (WM) Added a disconnection notification when the local player disconnects

Previously, when WM functions (such as WM_DisconnectChildren) were called and communication was disconnected, a disconnection notification was not generated. WM_STATECODE_DISCONNECTED_FROM_MYSELF has now been added to WMStateCode in the parent to provide a disconnection notification.
Because of this change, there is a chance that an incompatibility may arise.
The state codes that can go into the state field of WMStartParentCallback, WMStartConnectCallback, and WMPortRecvCallback are increasing. Therefore, use caution when stopping the execution of programs when a state code other than one of the known WM_STATECOD_* state codes has been received.
Also, even if DataSharing explicitly disconnects the child from the parent using this notification, DataSharing will not stop.
The following functions were added as a result of this change.

- WM_GetAID function
- WM_GetConnectedAIDs function

### Note 32-39: (WM) Fixed internal operations again for connecting and disconnecting

The fixes described in Note 31-24 and Note 30-07 did not fully address the problems. As a result, these problems have been fixed again.

### Known issues in SDK 3.0 RC

- The ntexconv in this SDK ($NitroSDK/tools/bin/ntexconv.exe) is an older version than the ntexconv in the TXLib package of the current release. Since the SDK uses ntexconv only to create icon images, using an older version does not pose a problem. However, there would be a problem if ntexconv were used to create textures. You are encouraged to use the ntexconv that is in the latest TXLib package.

## ¦ NITRO-SDK Version 3.0 PR4

(2005/09/08)

### Note 31-01: (CARD) Added CARD_CancelBackupAsync function

Added the CARD_CancelBackupAsync function for aborting the asynchronous process on the backup device.
As a result, added CARD_RESULT_CANCELED to the CARDResult enumerated values for processes that were aborted with this function.

### Note 31-02: (CARD) Corrections to internal processing of FRAM device operations

When a FRAM device was being used for backup, there was an occasional problem with inconsistency of the hardware internal status. A process was added to deal with this issue.

### Note 31-03: (CARD) Added CARD_RESULT_NO_RESPONSE error code

Added CARD_RESULT_NO_RESPONSE to the CARDResult enumerated values as a result value for backup manipulation functions.
This is an error value that was split off from CARD_RESULT_TIMEOUT. It is returned when contact with the card appears to be poor.

### Note 31-04: (DevEnv) Support for overlay groups in lsf files

Added support for overlay groups.
The linker assumes that overlays belonging to the same group are located in the same memory region.
By specifying mutually exclusive overlay modules as belonging to the same group, it is possible to use function calls between overlays to detect errors during linking.
To maintain compatibility, the group with the same name as the current section name is set if the overlay group specification is omitted.

### Note 31-05: (DevEnv) Fixed bug in certain section names of makelcf

In some cases, if the section description in an lsf file had sections named "<existing section name>" + "_bss," such as "main"and "main_bss," problems would occur.
In addition to "_bss," the same problem occurred with some text strings, such as "_DATA," "_BSS."
This is a lcf.template file problem.
We fixed the `*.lcf.`template files under `$NitroSDK/include/nitro/specfiles`.
As a result, you can no longer directly reference symbol information about overlays that existed in previous versions.
Because there may be problems with applications that directly reference symbols, the *.lcf.template files for the older version are for now included in $NitroSDK/include/nitro/specfiles/2.x.
Overwrite the files in $NitroSDK/include/nitro/specfiles as needed.
(When building with make, specify the LCFILE_TEMPLATE variable.)
The official way to obtain information about overlays is to reference the overlay table using the overlay ID as an index.

### Note 31-06: (DevEnv) Corrected makelcf

When an overlay was placed in DTCM, a bug occurred with the arena configuration of the main memory area. This problem has been fixed.
We also fixed the ITCM arena configuration for use with a ITCM overlay.
We added support for overlays of the extended main memory region, which was not possible previously.

### Note 31-07: (DevEnv) Added loadrun and nitrorun tool commands

loadrun is a command that downloads and runs binary data to the IS-NITRO-EMULATOR.
It can be terminated with a timeout or a call to the OS_Exit function.
nitrorun is a script that calls the buryarg command, which embeds argument data in the binary and the loadrun command at the same time.
This allows execution of the binary in a manner that is similar to passing arguments from the command line.

### Note 31-08: (ENV) Added libenv*.a environment resource library

Added the ENV library, which retrieves a value corresponding to a resource from its resource name. This is used to provide the program with operating environment parameters. Although the library must be recompiled, it is convenient for rewriting parameters and configuring an environment common to several programs.

### Note 31-09: (FS) Corrections to the FS_EndOverlay function.

Due to the operation changes noted in Note 28-03, the destructor for the global object array in the overlay would not start correctly when unloading the overlay. This problem has been fixed.

### Note 31-10: (FS) Corrections to document

Made numerous corrections to the following document explaining the FS library:

- $NitroSDK/docs/TechnicalNotes/AboutFileSystem.pdf

### Note 31-11: (FX) Corrected the FX_FX64C_TO_F32 macro

There was a bug in the FX_FX64C_TO_F32 macro, which converted from fx64c to f32 types. It did not return a precise value.
This problem has been fixed.

### Note 31-12: (FX) Corrected problem with FX_InvSqrt function

When the argument passed to the `FX_InvSqrt` function was greater than a certain value, the calculation would be incorrect. This problem has been fixed.

### Note 31-13: (MB) Added the MB_GetMultiBootDownloadParameter function

In conjunction with the features added in Note 27-22, the `MB_GetMultiBootDownloadParameter` function was added to reference the user definition expanded parameters when downloading.

### Note 31-14: (NVRAM) Fixed bug with error determination when loading data from NVRAM

When reading data from NVRAM, the read failed when the target read buffer address was greater than 0x02400000.
This problem has been fixed.

### Note 31-15: (OS) Added debug output functions on ARM7 side to the Function Reference.

Added information to the Function Reference about the `OS_InitPrintServer` and `OS_PrintServer` functions, which are used for ARM7 debug output. Also added that it is not necessary to use these functions in the application.

### Note 31-16: (OS) Fixed bug in upper address of DTCM arena

There was a problem where the upper address of the DTCM arena is determined.
This was caused when a negative value was specified for the stack size in the rsf file.
This problem has been fixed.

### Note 31-17: (OS) Added information about the NitroStaticInit function to the Function Reference.

Added an explanation of the `NitroStaticInit` function to the Function Reference, in line with the addition made in Note 27-31.

### Note 31-18: (OS) Organized const type arguments in function related to OSThread

In functions related to OSThread, we determined and changed some "OSThread*" type arguments to be defined as "const OSThread*."
These are the functions that were changed.

- OS_IsThreadTerminated function
- OS_CheckStack Function
- OS_GetThreadPriority Function
- OS_GetThreadDestructor Function
- OS_GetThreadParameter Function
- OS_GetStackStatus Function
- OS_DumpThreadCallTrace Function

### Note 31-19: (OS) Added OS_GetOpt function.

Added the OS_GetOpt function, which makes it convenient to obtain strings that start with '-' as program execution options from argument data in binary files (e.g., srl files that were embedded using the buryarg tool command).
Parameters should come after the options. Added code that uses the OS_GetOpt function in the $NitroSDK/build/demos/os/argument-1 sample demo.

### Note 31-20: (SND) Optimized the cache disabling process.

At the place where the `DC_InvalidateRange` function is called from the Sound library, the specified range was larger than necessary. This was corrected to be of an appropriate size. This correction reduces the load on the sound process.

### Note 31-21: (WM) Corrected problem in process that detects disconnection during MP communication.

If an MP communications partner disappears (for example, the power gets cut), there is a timeout, after which notification is sent regarding the disconnection. Because of a bug in the timeout process, notification of the disconnection did not occur sometimes. This problem has been fixed.

### Note 31-22: (WM) Added scan types that are performed by specifying the matching length of SSID

Added WM_SCANTYPE_ACTIVE_CUSTOM and WM_SCANTYPE_PASSIVE_CUSTOM to WMScanExParam.scanType. These support special usage that limits SSID matching confirmations performed with the WM_StartScanEx function to certain lengths.
When these scanTypes are used, SSID match confirmations will be made only up to the length specified with WMScanExParam.ssidMatchLength.
As a result, we changed the WMScanExParam structure.

### Note 31-23: (WM) Corrected scan SSID matching length in infrastructure mode

In infrastructure mode, by specifying SSIDs using WM_StartScanEx during scans, matching confirmation was performed for only the first eight bytes.
We modified it so that matching confirmation is performed for the length specified by WMScanExParam.ssidLength.

### Note 31-24: (WM) Fixed internal process related to connecting to child.

In environments where communications status was extremely bad and the child repeatedly tried to connect to the parent, the parent was put into an abnormal internal state. This problem has been fixed.

### Note 31-25: (WM) Added interface that indicates more detailed information about causes of connection failure time

We added a feature that notifies the status code of the communication partner. This partner uses a callback function to help analyze the cause of failure when a connection fails that is attempting to use WM_StartConnect[Ex].
Specifically, we added the wlStatus member to the WMStartConnectCallback structure.
Under normal circumstances there is no need to reference this from the application.

### Known problems with SDK 3.0 PR4

- We did a test release of the STD library as a library that is compatible with C standard functions. Currently, only some of the functions can be used. However, these are not included in the Function Reference.

## NITRO-SDK Version 3.0 PR3

(2005/08/10)

### Note 30-01: (CARD) Corrected documentation on CARD_CheckPulledOut function.

Added a statement to the `CARD_CheckPulledOut` Function Reference page indicating that the `CARD_LockRom` function must be called and CARD-ROM bus needs to be locked before calling `CARD_CheckPulledOut`.

### Note 30-02: (CARD) Argument restriction for CARD_IdentifyBackup function.

Added a restriction so that `CARD_BACKUP_TYPE_NOT_USE` cannot be specified as the device type passed to the `CARD_IdentifyBackup` function. This change was added in 3.0 PR, but it was left out of the changelog.

### Note 30-03: (MB) Made corrections to the sample demo.

The following correction was made to the `$NitroSDK/build/demos/mb/cloneboot` sample:

- When the `ConnectMain` function on the parent failed, a reattempt was made without ending the WH module. This problem has been fixed.

### Note 30-04: (OS) Added the OS_SetThreadDestructorStack function

Added the `OS_SetThreadDestructorStack` function, which specifies the stack used when a thread destructor is executed.
If jnone is specified, the stack pointer does not change when its own thread is destroyed. When the thread is destroyed by other threads, the pointer changes to the stack's top address.

### Note 30-05: (OS) Alarm cancel process used in OS_Sleep function

When a thread that was paused with the `OS_Sleep` function is destroyed by another thread, the alarm set for the `OS_Sleep` function is canceled.
Previously, because the alarm was not canceled, the alarm handler was sometimes called needlessly or the alarm list was overwritten.

### Note 30-06: (WM) Changed process during overload on child

We changed the processing during overload on the child because of internal processing conditions. This is related to Note 29-08.
Previously, when the child side ARM was overloaded and the transmit data settings were not on time, a null response was generated. This was changed to no response.
As a side effect, when a child machine is overloaded, the receive processing is skipped. This impairs communication efficiency slightly but reduces the load.

### Note 30-07: (WM) Changed internal operations during disconnection process.

As mentioned in Note 25-22, internal operation was changed to wait for the required signal strength to send the disconnection notification when disconnecting. This was changed to time out after a set period of time. This corrects those cases where the process did not end when `WMTestTool.srl` was used to set the Noise rate to 100%.

### Known problems with SDK 3.0 PR3

None.

## ¦ NITRO-SDK Version 3.0 PR2

(2005/08/04)

### Note 29-01: (DevEnv) Corrected path for ISD_NITRO_DEBUGGER.

Corrected the path location that `ISD_NITRO_DEBUGGER` indicates. This is defined in `$NitroSDK/build/buildtools/commondefs.emtype.ISD`.

### Note 29-02: (GX) Further corrections to Sub_Double3D sample demo.

The following correction was made to the `$NitroSDK/build/demos/gx/UnitTours/Sub_Double3D` sample demo:
The correction described in Note 27-15 was not complete and the same symptoms still appeared occasionally. The problem was corrected again.

### Note 29-03: (GX) Added the qualifier 'const' to the arguments of the functions that get the status of the display list.

The contents of the pointer passed to the arguments of the following functions have not been rewritten. However, the `const` qualifier has been added to them.

- `G3_GetDLStart`
- `G3_GetDLLength`
- `G3_GetDLSize`

### Note29-04: (OS) Added OS_GetLowEntropyData function.

We added the `OS_GetLowEntropyData function`, which generates and returns different data each time it is executed based on the system status.
We also added $NitroSDK/build/demos/os/entropy-1 as a demo.

### Note 29-05: (PM) Corrected the return process after LCD has transitioned from OFF state to sleep mode.

After the transition from the LCD Off state to sleep mode and then back, a discrepancy arose between the actual state and the internal state of the GX library. This problem has been fixed. (Reference:Note 22-23:(PM) Changed the recovery process after transitioning from LCD OFF state to sleep mode.)

### Note 29-06: (WM) Added notification to WM_SetIndCallback function callback

Added WM_STATECODE_INFORMATION for notification of the callback of WM_SetIndCallback. This provides a notification containing information about the events occurring internally.
The contents of the notification are found in the WMIndCallback.reason callback argument. WM_INFOCODE_FATAL_ERROR is defined as a reason value. This value is used when ignoreFatalError in the WM_StartMPEx function is set to TRUE and a fatal error occurred, .

### Note 29-07: (WM) Added WM_SetPowerSaveMode function

Added the WM_SetPowerSaveMode function, which switches to power save mode during infrastructure communication.

### Note 29-08: (WM) Corrected problems with return process when ignoreFatalError has been set.

When the `ignoreFatalError` argument of the `WM_StartMPEx` function is set to TRUE, there should be no auto-disconnect even if a fatal error occurs with the child. Despite this, communication would still become unavailable. This problem has been fixed.

### Note 29-09: (WM) Changed receive process on child.

Previously, when a child received an MP frame not addressed to it, the `WM_StartMP` function would receive a notification that the "state" was `WM_STATECODE_MP_IND` and the `errcode` was `WM_ERRCODE_INVALID_POLLBITMAP`. This was changed so that no notification is sent at all.
The MP ACK frame's `WM_STATECODE_MPACK_IND` notification was changed in a similar way.
This change does not affect sending and receiving using ports.

### Note 29-10: (WVR) Corrected problem with the thumb build version of the ichneumon component

It was confirmed that programs do not operate when the thumb build version of the ichneumon component is used. This problem has been fixed.

### Known problems with SDK 3.0 PR2

None.

## NITRO-SDK Version 3.0 PR

(2005/07/22)

### Note 28-01: (Cht) Added Pictocatch demo

Added a sample demo that uses the Pictocatch process to `$NitroSDK/build/demos/cht/catch-min`.
This sample implements only the bare minimum functionality so that it has less code than the previous PictoCatch sample demos.

### Note 28-02: (DevEnv) Support for nitro.h precompiled headers

We added support for precompiled headers for `$NitroSDK/include/nitro.h`.
The build system precompiles `$NitroSDK/include/nitro.h` before the build and reads the result while building the file.
This should result in a faster build.
If you want to stop the compilation temporarily, set a value for NITRO_NO_STD_PCHDR.

### Note 28-03: (FS) Changed the operations of the overlay functions.

When there was a global object in an overlay to be unloaded that required a destructor, the destructor was called automatically. This has been changed so that the destructor is not called.

### Note28-04: (GX) Corrected sample demos

In the `$NitroSDK/build/demos/gx/UnitTours/2D_Oam_256_16` sample demo, a bug made the +Control Pad unusable in the FINALROM build.
This problem has been fixed.

### Note 28-05: (MATH) Accelerated the MD5 functions

Replaced the implementation of the MD5 functions. The code size is about half of what they were before and the functions operate approximately 20% faster compared to the previous implementation. The interface has not been changed. This change was added in 2.2 PR but it was left out of the changelog.

### Note 28-06: (OS) Added mechanism to check for stack overflow in IRQ stack.

Added a mechanism to check for stack overflow in the IRQ mode stack, similar to that in the thread stack.
A check code is written at the top and bottom of the stack (or between, if necessary). By checking if these sections are rewritten, it helps to determine if the stack is filled up to those points.
Below are the functions that were added for this purpose:

- OS_SetIrqStackChecker
- OS_SetIrqStackWarningOffset
- OS_CheckIrqStack
- OS_GetIrqStackStatus

### Note 28-07: (OS) Added argument support using OS_GetArgc function and OS_GetArgv functions

Added a mechanism that allows you to pass argument data to the ROM file and then obtain this data in the program.
You can use the `$(NitroSDK)/tools/bin/buryarg` tool to embed argument data. You can then use the data in a program by calling the `OS_GetArgc` and `OS_GetArgv functions`. By using this feature, you can change the program's execution conditions without recompiling.
We added a demo that uses this feature called `$NitroSDK/build/demos/os/argument-1`.
This feature is provided for debugging purposes and is invalid in FINALROM builds.

### Note 28-08: (OS) OS_KillThread and OS_KillThreadWithPriority functions added

We added the `OS_KillThread` and `OS_KillThreadWithPriority` functions. These functions terminate other threads. You select which function to use based on whether you want to set the thread priority when terminating the thread.
The difference between `OS_KillThread` and `OS_DestroyThread` is whether the thread destructor of the terminated thread is called.
We added a demo that compares these two functions. It is called `$NitroSDK/build/demos/os/thread-9`.

### Note 28-09: (OS) Implementation of thread destructors

We implemented thread destructors that call preset functions when a thread is terminated.
The destructors are set using the `OS_SetThreadDestructor` function.
Thread destructors are called under the following circumstances:

- A thread's task has executed all the way to the end.
- A thread has been terminated with the OS_ExitThread function.
- A thread has been terminated by another thread with the OS_KillThread* function.
- A thread has terminated itself using the OS_KillThread* function.

Thread destructors are not called under the following circumstances:

- A thread has been terminated by another thread with the OS_DestroyThread function.
- A thread has terminated itself using the OS_DestroyThread function.

We added a thread destructor demo. It is $NitroSDK/build/demos/os/thread-7.

### Note 28-10: (OS) Added user parameters to thread structure

We added a user parameter member to the OSThread thread structure.
The system does not reference or change this area.
This may be used for any purpose in each application.
The following functions are for setting and getting thread parameters.

- OS_SetThreadParameter
- OS_GetThreadParameter

### Note 28-11: (OS) Removed limit on maximum number of threads

Previously, the maximum number of threads that could be used by the OS at the same time was 16. (Normally the maximum was 16. However, by rewriting the header definitions, it was possible to vary the maximum from 8 to 32.) This limit has been removed.
The thread-related APIs have not changed.
Reflecting this change, we have added two sample demos that create large numbers of threads: `$NitroSDK/build/demos/os/thread-8` and `$NitroSDK/build/demos/os/thread-10`.

### Known issues in SDK 3.0 PR

None.

## NITRO-SDK Version 2.2 PR

(2005/07/15)

### Note 27-01: (CARD) Added the CARD_CheckPulledOut function.

Added the `CARD_CheckPulledOut` function, which determines status directly from ARM9. In other words, it does not wait for the notification of the result of the card removal detection process that the ARM7 performs periodically. This function is not needed for normal scenes where the Card is not being accessed. However, in scenes where you need to know without delay that the Card has been removed, you can use this function instead of `CARD_IsPulledOut`.

### Note 27-02: (CARD) Made Card Library compatible with new backup devices.

Added `CARD_BACKUP_TYPE_EEPROM_512KBITS` and `CARD_BACKUP_TYPE_FRAM_256KBITS` to the enumerated type `CARDBackupType` so the CARD library can support 512 kB EEPROM and 256 kB FRAM as backup devices.

### Note 27-03: (CTRDG) Corrected cache operations when getting cartridge information

Corrected the cache operations involved in the reading of the cartridge information region during the execution of the `CTRDG_Init` function. Up until now, when the cartridge information such as the maker and game code was obtained, incorrect values were sometimes returned. This problem has been fixed.

### Note 27-04: (DevEnv) Added the bin2obj tool

Added the bin2obj tool for converting binary files into object files. This tool operates the same way as the BinToElf tool in the CodeWarrior for NINTENDO DS package. You can use either one.

### Note 27-05: (DevEnv) Provided support for CYGWIN cygdrive prefix that is not /cygdrive.

When a build was performed from the CYGWIN command line, the build would fail if the cygdrive prefix was not `/cygdrive`, the default setting . Builds are now possible even if the cygdrive prefix has been changed to another value.

### Note 27-06: (DevEnv) Corrected the LCF template.

In programs that used the LCF template in `$NitroSDK/include/nitro/specfiles/ARM9-TS-cloneboot-C.lcf.template`, the `.sinit` sections were not linked and the features of the static initializer could not be used. This problem has been fixed.

### Note 27-07: (DevEnv) Corrected problem with the StackSize specification for rsf.

With `StackSize` specified in `rsf` (linker spec file), subtracting the absolute value from the maximum possible specified size when a negative number was provided as the first parameter was not valid. This problem has been fixed.

### Note 27-08: (DevEnv) Changed the default value for TS_VERSION.

Changed the default value of the `SDK_TS_VERSION` constant that indicates the PMIC version. The value was 100; it has been changed to 200. `SDK_TS_VERSION` = 200 appears in versions E and later for the IS-NITRO-EMULATOR hardware. It corresponds to the PMIC version embedded in the Nintendo DS retail product. This change does not alter the internal operations of the NITRO-SDK features. However, this could affect applications that use this constant as a build switch for changing behavior (such as sample demos that use the microphone) . When `NITRO_TS_VERSION` is specified as the environment variable, `SDK_TS_VERSION` takes the specified value, not the default value.
NITRO-SDK has an OS and an SPI library prepared for every TS_VERSION.
This is relevant when the development environment uses the TS breadboard, etc. and has owner information in an old save format. However, when the save format is the same as that used for the retail DS system, the library is exactly the same.
When the make system is used, the library for linking is selected automatically based on the environment variable. But in a development environment using an IDE, you need to manually select which library to link.
Nonetheless, except in cases where the development environment used the TS breadboard, etc., there is really no meaning to selecting a library. Consequently, it is all right to use the library that is linked by default.

### Note 27-09: (DevEnv) Changed the #include search path.

Changed the `#include` search path when building with `Makefile` to include the directory of the file that called `#include`. If the previous search path is required, enter a directive such as `MACRO_FLAGS += -cwd proj` inside `Makefile`.

### Note 27-10: (FS) Added the functions FS_CreateFileFromMemory and FS_CreateFileFromRom.

Added the `FS_CreateFileFromMemory` function and `FS_CreateFileFromRom` function to treat a specific memory region or Card as a temporary file to open it. Also added the sample demo `$NitroSDK/build/demos/fs/file-3` that demonstrates the operation of these functions.

### Note 27-11: (FS) Added the FS_End function.

Added the `FS_End` function to return the state to what it was before the FS library was initialized.

### Note 27-12: (FS) Corrected problem with the FS_WaitAsync function.

When the `FS_WaitAsync` function was called for a file handle and an asynchronous command was not yet processing in the archive, the archive processing would stop. This problem has been fixed.

### Note 27-13: (FS) Corrected problem during overlay unloading.

When the `FS_UnloadOverlay` or `FS_EndOverlay` function unloaded an overlay, the destructor was not called correctly. This problem has been fixed. This applies to objects when both of the following are true:

- Placed in the overlay's `*.data` section.
- The entity of the destructor is not placed in the overlay.

### Note 27-14: (FX) Corrected problem with the arctangent functions.

The arctangent functions below returned incorrect values when the (x,y) slope was extremely close to 1. This problem has been fixed.

- FX_Atan2
- FX_Atan2Idx

This applies to (x,y) when the following conditions are met:
((x != y) && (FX_Div(y, x) == FX32_ONE))

### Note 27-15: (GX) Corrected the Sub_Double3D sample demo.

The following correction was made to the `$NitroSDK/build/demos/gx/UnitTours/Sub_Double3D` sample demo:
When double screen 3D and a heavy load process were put together, the image on the upper screen would occasionally instantly wrap around to the bottom screen (or vice versa). This problem has been fixed.

### Note 27-16: (GX) Corrected problem with ASSERT inside functions that manipulate display lists.

When the `G3C_UpdateGXDLInfo` and `G3B_UpdateGXDLInfo` functions were called from inside functions that manipulate display lists, ASSERT would be applied when a display list was being created that was the same size as the buffer. This problem has been fixed.

### Note 27-17: (MATH) Corrected problem with the MATH_QSort function.

When sorting with the `MATH_QSort` function, the function would sometimes access the target array out of bounds. This problem has been fixed.

### Note 27-18: (MATH) Accelerated the SHA-1 functions.

Replaced the implementation of the SHA-1 functions. The code size has hardly changed, but they run approximately twice as fast as before. The interface has not been changed.

### Note 27-19: (MATH) Added Fast Fourier Transform functions.

Added functions that perform fast Fourier transforms. Also added the demos `$NitroSDK/build/demos/math/fft-1` and `fft-2` to confirm the operation of these functions.

### Note 27-20: (MB) Added multiboot-wfs sample.

Added `$NitroSDK/build/demos/mb/multiboot-wfs` as a sample of a child in Single-Card Play using the file system over wireless communication.

### Note 27-21: (MB) Released the debug use expanded memory region.

For a child booted with the MB protocol, there was a restriction that prevented the use of expanded memory and forcibly set main memory to 4 MB. This restriction has been removed, thus enabling the use of expanded memory by IS-NITRO-EMULATOR and other hardware that has 8 MB of main memory.

### Note 27-22: (MB) Added user definition expanded parameters.

Added the `userParam` member to the `MBGameRegistry` structure. Store as much as 32 bytes of any kind of data in this buffer. Use the `MB_RegisterFile` function to allow a Single-Card Play child to reference this data after startup.

### Note 27-23: (MI) Corrected problems with the MI_CompressHuffman function and Hufmann compression by ntrcomo.exe.

The `MI_CompressHuffman` function and `ntrcomp.exe` had a bug that sometimes caused abnormal compression of data that was filled with a single value. This problem has been fixed.

### Note 27-24: (OS) Corrected internal operation of `OS_Sleep` function

If the `OS_WakeupThreadDirect` function was called for a thread that was in the wait state after a call to the `OS_Sleep` function, there would be problems with the alarms. This problem has been fixed.

### Note 27-25: (OS) Corrected problem with the OS_TryLockMutex function.

There were errors in the list operations on the mutex stored in the OS when the mutex was locked by the `OS_TryLockMutex` function. As a result, sometimes the `OS_UnlockMutex` function would cause exceptions. Problems would also arise when a thread ended while the mutex was still locked. This problem has been fixed. Note that the `OS_LockMutex` function (which is different from the `OS_TryLockMutex` function just mentioned) works correctly and has no problems.

### Note 27-26: (OS) Added the OS_YieldThread function.

Added the `OS_YieldThread` function. This function performs thread rescheduling. It also gives executable threads with the same priority level as the current thread an opportunity to execute.

### Note 27-27: (OS) Made internal corrections to initialization process at startup time.

Corrected the internal processes that confirm that the cache has been cleaned/invalidated at program startup for autoload and at the initialization of each segment.

### Note 27-28: (OS) Expanded the startup screen process for Chinese language version.

The startup screen display process for Chinese language applications can be modified with `SDK_WEAK_SYMBOL` and made public with the `OS_ShowAttentionChina` function. Its implementation can be changed with external definitions.
In conjunction with this, added the sample `$NitroSDK/build/demos/os/forChina-fs` to show how to load the data for images that are used only at startup from the file system without a static link.

### Note 27-29: (OS) Corrected problems with flushing the data cache.

The cause of the bugs mentioned in Note 24-10 and Note 25-16 has been clarified. Along with this, the internal implementation of the functions `DC_FlushRange` and `DC_FlushAll` have been changed so that the CPU flush command is works properly. Specifically, a command to wait for the write buffer to be empty had been inserted immediately before the flush command and when returning from the interrupt handler. This was done in order to avoid the symptoms of the problem, which was that a clean cache line would be invalidated when the flush command was executed if the write buffer was full. The function specifications have not changed.

### Note 27-30: (OS) Corrected problem when multiple OSMutexes are locked.

There was a problem with the list processing of mutexes stored in OSMutex. Specifically, a problem arose when a thread used the `OS_LockMutex` or `OS_TryLockMutex` function to lock more than one `OSMutex` at the same time. This problem has been fixed.
The problem does not occur if a thread locks only one OSMutex at a time.

### Note 27-31: (OS) Added information about header files to the Function Reference.

Added explanations about the main items and the special features of the NITRO-SDK header files in the OS category of the Function Reference. Explanations were added about the following files:

- `nitro.h`
- `nitro_win32.h`
- `nitro/sinit.h`
- `nitro/code32.h, nitro/code16.h, nitro/codereset.h`
- `nitro/dtcm_begin.h, nitro/dtcm_end.h`
- `nitro/itcm_begin.h, nitro/itcm_end.h`
- `nitro/parent_begin.h, nitro/parent_end.h`
- `nitro/version_begin.h, nitro/version_end.h`
- `nitro/wram_begin.h, nitro/wram_end.h`
- `nitro/version.h`

### Note 27-32: (RTC) Added functions to convert back and forth between date/time and total elapsed time in seconds.

Added functions to the RTC category that convert between type `RTCDate` and `RTCTime` date/time data and the total number of seconds that have elapsed since January 1, 2000. Also added functions that convert between type `RTCDate` data and the total number of days that have elapsed. The demo that can be used to confirm these operations is `$NitroSDK/build/demos/rtc/convert-1`.

### Note 27-33: (RTC) Added restrictions to functions for changing date and time.

Functions have been created for debugging purposes that can change the RTC's date and time. To avoid incorrect use of these APIs in non-debugging applications, a restriction has been introduced that causes any request to write to the RTC to fail if `NITRO_FINALROM` has been specified. Following are the functions whose operations have been changed:

- RTC_SetDateTimeAsync
- RTC_SetDateTime
- RTC_SetTimeAsync
- RTC_SetTime
- RTC_SetDateAsync
- RTC_SetDate

### Note 27-34: (WBT) Corrected wbt-fs sample demo

The following correction was made to the sample demo `$NitroSDK/build/demos/wbt/wbt-fs`:
Table memory processed with the FS_LoadTable function would not be released with every connection and disconnection, thus causing memory leaks. This problem has been fixed.

### Note 27-35: (WBT) Corrected WBT sample demos

The following changes were made to the `$NitroSDK/build/demos/wireless_shared/wc` sample module and the `$NitroSDK/build/demos/wbt/wbt-1` demo:
During continuous MP communications, the wireless parent would unconditionally overwrite the Send buffer when a new child was connected. Depending on the timing, data would be sent to wireless hardware while data was being loaded to the Send buffer. This would result in WBT packet mismatches. This problem has been fixed.
To fix the problem, a process was added to `$NitroSDK/build/demos/wbt/wbt-1/src/main.c` that defines one of three actions for the WBT parent to take based on the information it has on the current child connection situation:
1) If it is the first child, begin MP communications.
2) If it is the second or later child, do nothing. (It is all right to do nothing, since continuous MP communications are taking place.)
3) If there is no child, terminate continuous MP communications.
Since the above process requires information about the disconnection of child units, `$NitroSDK/build/demos/wireless_shared/wc/wc.c` has been changed so that a callback is called on the sample side when a child is disconnected.

### Note 27-36: (WM) Clarified the specification changes and planned deletion of Key Sharing functions.

In order to reduce the amount of memory used by WM, the specifications have been changed for these three functions that are almost never used: `WM_StartKeySharing`, `WM_EndKeySharing` and `WM_GetKeySet`. Along with this change, a fixed buffer for Key Sharing is now obtained when WM is initialized. In addition, since the Key Sharing features are scheduled to be deleted at a later date, a section was added to the document asking that programmers instead use the functions `WM_StartDataSharing`, `WM_EndDataSharing`, and `WM_StepDataSharing`.

### Note 27-37: (WM) Changed the internal operations of the WM_StartScanEx function.

It has been determined that when an SSID filter is specified by the `WM_StartScanEx` function, the SSID inside the discovered parent information sometimes has invalid data that differs from the specified SSID. To deal with this problem, a process has been added inside the WM library that, when necessary, overwrites the filter-specified SSID with the SSID inside the discovered parent information.
Note that this happens only when the parent is using infrastructure mode communications and is hiding its SSID.

### Note 27-38: (WM) Updated WMTestTool.srl

Updated the tool that is used for testing wireless communications: `NitroSDK/bin/ARM9-TS/Rom/WMTestTool.srl`. Previously, when an access point was discovered during scanning, the message "WLAN AP" was displayed. This has been changed so that now the SSID is displayed. This was was implemented for both Scan Test mode and ScanEx Test mode.

### Note 27-39: (WM) Deferred MP communication when child not connected.

Previously, when the wireless communications parent called the `WM_StartMP` function, it would send an MP frame even if no child was connected. This has been changed so the parent does not do this. The basic behavior of the port's send/receive callbacks has not changed.

### Note 27-40: (WM) Corrected problem with notification when child disconnects

During MP communications, when the child responded with nothing but NULL and the communication timed out, the notification `WM_STATECODE_DISCONNECTED` would be posted multiple times to the parent's callback `WMStartParentCallback`. This problem has been fixed.
This problem occurred mainly when a child was started by IS-NITRO-DEBUGGER and was paused for a long time during MP communications.

### Note 27-41: (WM) Added restriction on number of MP communication transmissions per frame.

Previously, during continuous communications mode and after communications failed repeatedly, transmissions would continue. However, in a situation where only empty data is being sent and received, the number of MP communication transmissions grows rapidly and the child's data-receiving process cannot keep up. This can trigger problems. To mitigate this problem, a restriction has been set that limits the number of MP communication transmissions that the parent can send in a single frame to 6 (including resends). This restriction is not placed on normal communications.

### Known issues in SDK 2.2 PR

None.

Nintendo Technical Support Center

CONFIDENTIAL