Version 1.3.0
-
libnds:
-
New touchscreen driver:
- The touchscreen driver has been rewritten from the ground up.
- A new routine for filtering measurements is now used for both TSC (NTR) and CDC (TWL) touch inputs. This should provide more accurate results, particularly on more worn down displays and screen protectors. More testing is required, however.
- On TSC (NTR),
tscMeasure()
now uses the 16-clock-per-conversion method to speed up measurement readouts. - The duration of the critical (interrupt-blocking) section of the touch driver has been reduced, and the TSC (NTR) driver has had its performance optimized on top of that compared to 1.2.0 and below.
- On the ARM7 side,
touchApplyCalibration
andtouchReadData
have been added to allow more granular access to the touchscreen driver's logic. - As these commands were only intended for TSC (NTR),
touchRead
andtouchReadTemperature
were moved to a new header,tsc.h
, and renamed totscRead
andtscReadTemperature
respectively.
-
Interrupt handling:
- The interrupt dispatcher has been optimized to use
O(1)
as opposed toO(n)
lookups. This is always faster on ARM9, and faster for more than 2-3 defined IRQ handlers on ARM7, which is the common scenario. - Fixed a bug where
irqClearAUX()
would disable the non-auxillary interrupt of the same bit mask on ARM7. - Fixed behaviour in setting and clearing of multiple interrupt handlers at a time (bit masks with more than one bit set). Now, setting multiple bits at once with
irqSet()
orirqClear()
acts the same as setting one bit at a time.
- The interrupt dispatcher has been optimized to use
-
Memory usage:
- ITCM use has been reduced by about 320-380 bytes, depending on your codebase's use of libnds.
- DTCM use has been reduced by 192 bytes - the size of the reserved section at the end of memory is now 64 bytes by default and can be controlled with the
__dtcm_reserved_size
linker
symbol. - ARM7 IWRAM use has been reduced by 192 bytes - the size of the reserved section at the end of memory is now 64 bytes by default and can be controlled with the
__iwram_reserved_size
linker symbol. - The size of the supervisor and IRQ stack can now be controlled by defining the
__svc_stack_size
and__irq_stack_size
linker symbols.
-
Graphics:
- A new function has been added to set the object mode (regular, bitmap, window, blended):
oamSetBlendMode()
. - A new function has been added to get a SpriteSize entry from the size of a sprite in pixels:
oamDimensionsToSize()
. Also,SpriteSize_Invalid
has been introduced to represent dimensions that aren't valid 2D sprite sizes. - New definitions have been added for the bit fields of the
BLDALPHA
andBLDY
registers. - The following functions now return error codes:
glBindTexture()
,glAssignColorTable()
,glGetColorTableParameterEXT()
, andglTexParameter()
, making it easier to handle errors gracefully when using them. - There has been a big refactor in videoGL to handle allocation errors gracefully (or at least crash with an assertion if the code can't recover from the error).
- A new function has been added to set the object mode (regular, bitmap, window, blended):
-
Code refactoring:
RTC_CR
,RTC_CR8
andHALT_CR
have been renamed toREG_RTCCNT
,REG_RTCCNT8
andREG_HALTCNT
, respectively.- GL2D now uses existing
videoGL.h
helpers instead of reimplementing its own copies. - Many fields and functions have been documented, including firmware flash commands, DLDI driver structures.
- Missing
DMA_START
constants have been added. - The constants used in
tscReadTemperature
have been documented. SerialWaitBusy
has been renamed tospiWaitBusy
.oamSetGfx()
has been moved away from the header to fix C++ builds.
-
Other:
- ARM7 SPI bus helper functions have been added:
spiExchange
,spiRead
andspiWrite
. consoleLoadFont()
has been cleaned up. Note that theconvertSingleColor
option has been removed, as 1bpp fonts are now supported.- Decompression of Huffman-compressed data has been implemented. To faciliate this,
decompressStreamStruct()
has been added. - Decompression utility functions are now available in both the ARM9 and ARM7 build of libnds.
glCallList()
andcardStartTransfer()
now use the safe helper functiondmaSetParams()
.- wf-fatfs has been updated, bringing minor performance improvements to directory lookups.
- The magic numbers used to represent MPU memory regions have been replaced by definitions.
- A missing include has been added to
grf.h
.
- ARM7 SPI bus helper functions have been added:
-
-
SDK:
-
New examples:
- Added an 8-bit bitmap background loading example.
- Added an example of combining 3D, 2D sprite, and 2D background display.
- Added an example of loading sprites of all graphics types from GRF files.
- Added an example of loading bitmap sprites.
- Added an example of loading and using affine sprites.
- Added examples of using regular windows and windows using objects as mask.
- Added examples of using extended palettes for sprites and backgrounds.
- Added an example of using a text console in an extended affine background.
- Added an example of using the mosaic effect in sprites and backgrounds.
- Added an example of animating 2D sprites by updating frames in real time or by pre-loading all frames to VRAM from the start.
- Added an example of using 2D alpha blending and fade effects.
- Added a BIOS decompression example.
- Added a NitroFS paletted texture loading example.
- Added a touch input test, and two examples.
- Added an example of creating graphics effects using the horizontal blanking interrupt.
- Added a sample minigame based on Space Invaders.
-
Changes to examples:
- OAM memory and textures is now freed in all examples that allocate them. While this isn't needed in examples as short as ours, it's good practice to show developers how to free resources when they aren't needed anymore.
- The names of the ROMs and the titles and subtitles in the ROM header have been modified to make them consistent across all examples.
- Background IDs returned by
bgInit()
are now used instead of hardcoded layer numbers. videoSetMode()
is no longer used to enable sprites or to set sprite mapping modes, that should be done by thelibnds
sprite API.- Tilemaps are now explicitly excluded from grit generation in all the grit files that are used to convert sprites.
-
grit:
- Fixed reading data from assembly files as input.
- Fixed uninitialized memory use when loading a picture with an odd width.
-
picolibc:
- The bundled version of picolibc has been updated.
- Added an implementation of
funopen
. - Added bounds checking to
asctime_r
andctime_r
. - Added implementations of
fgetpos
andfsetpos
. - Added stub implementations for POSIX unlocked file functions.
- Fixed
fgetwc
andfputwc
not setting the file stream to wide orientation. - Fixed
regex.h
not being usable when compiling C++ code.
-
Other:
- Fixed NitroFS generation in the combined ARM7+ARM9 ROM template.
- The BlocksDS SDK now depends on the
wf-nnpack
package, which provides standalone, command-line compressors for the decompression methods supported by the console's BIOS. - The code style of
libteak
andDSWiFi
has been changed usingclang-format
to improve readability. - The documentation has been updated with additional notes about migrating from older and current versions of devkitARM, covering further potential issues.
- The Teak LLVM toolchain is no longer mentioned in the Windows setup instructions, as it is not available there.
-