Skip to content

Version 1.3.0

Compare
Choose a tag to compare
@AntonioND AntonioND released this 06 Jul 11:56
· 129 commits to master since this release
  • 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 and touchReadData have been added to allow more granular access to the touchscreen driver's logic.
      • As these commands were only intended for TSC (NTR), touchRead and touchReadTemperature were moved to a new header, tsc.h, and renamed to tscRead and tscReadTemperature respectively.
    • Interrupt handling:

      • The interrupt dispatcher has been optimized to use O(1) as opposed to O(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() or irqClear() acts the same as setting one bit at a time.
    • 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 and BLDY registers.
      • The following functions now return error codes: glBindTexture(), glAssignColorTable(), glGetColorTableParameterEXT(), and glTexParameter(), 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).
    • Code refactoring:

      • RTC_CR, RTC_CR8 and HALT_CR have been renamed to REG_RTCCNT, REG_RTCCNT8 and REG_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 to spiWaitBusy.
      • oamSetGfx() has been moved away from the header to fix C++ builds.
    • Other:

      • ARM7 SPI bus helper functions have been added: spiExchange, spiRead and spiWrite.
      • consoleLoadFont() has been cleaned up. Note that the convertSingleColor 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() and cardStartTransfer() now use the safe helper function dmaSetParams().
      • 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.
  • 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 the libnds 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 and ctime_r.
      • Added implementations of fgetpos and fsetpos.
      • Added stub implementations for POSIX unlocked file functions.
      • Fixed fgetwc and fputwc 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 and DSWiFi has been changed using clang-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.