Releases: blocksds/sdk
Version 1.8.1
-
libnds:
- Add a helper to convert UTF-16LE text (like the firmware player name and message) to UTF-8.
- Modify
assert()
on the ARM7 to send the information to the ARM9 instead of displaying it on the no$gba console. - Added
swiIntrWaitAUX()
for the ARM7. - The Doxygen documentation of interrupt functions has been fixed.
- The documentation of the firmware personal data has been improved with a warning saying that the struct may not be initialized right af the beginning of
main()
on the ARM9. - Always use
fake_heap_start
andfake_heap_end
insbrk()
. - Some assertions in the timer functions were missing checks for values lower than zero, this has been fixed.
- All instances of
sassert()
in common ARM7 and ARM9 code have been replaced byassert()
.
-
DSWifi:
- Add player name information to beacon packets, and add it to the
Wifi_AccessPoint
struct so that clients can see it. This name can be replaced by any string defined by the developer if required. - Add way to get the RSSI of the AP we're connected to. It can be done by calling
Wifi_GetData(WIFIGETDATA_RSSI)
. @snowshoe - Always include
ASSOCSTATUS_STRINGS
array in builds. It used to be removed in builds without sgIP. - Some minor documentation fixes.
- Add player name information to beacon packets, and add it to the
-
grit:
- Update documentation (command line interface and changelog).
- Let the build system define the version string compiled in the binary.
-
SDK:
-
Examples:
- In DSWifi examples, print multiplayer access points in color red when they aren't accepting new connections. Also, display the player name provided by the beacon frames.
- There's a new test to verify that
sbrk()
works correctly in both the ARM7 and ARM9. - Update the asserts example to show that asserts that happen in the ARM7 are sent to the ARM9 and displayed on the screen.
-
Documentation:
- Document flag used for "twl" sections in ndstool and the linkerscripts.
-
Other:
- Remove duplicated
__end__
entries in ARM7 linkerscript files. - The fake heap pointers are now setup on the ARM7, not only the ARM9.
- The fake heap limit setup has been documented.
- The R4RF DLDI driver included in the SDK has been updated.
- Update CMake build system to link the debug version of libnds in debug builds.
- Remove duplicated
-
Version 1.8.0
-
libnds:
- videoGL now tracks the number of textures using a palettes correctly. Previously, palettes would be deleted even when there were textures using them. @sillysagiri
scanf()
has been fixed so that it doesn't record modifier keys on the output string.- Fix
readFirmware()
andwriteFirmware()
on the ARM9. They would silently fail when the source or destination buffer wasn't in main RAM (for example, when the buffer was in the stack in DTCM) because the ARM7 can't access other memory regions. Now, the functions will allocate temporary buffers to transfer data between the ARM7 and ARM9. Also, now they use a mutex so that they are thread-safe. - FatFs has been updated to version R0.15ap1.
- The values used by
ledBlink()
have been documented as an enum. - There's a new define for the WiFi hardware in
REG_POWERCNT
. - There are new definitions for GRF files to specify background types.
consoleVprintf()
is now exposed on the ARM7.- In the GRF struct there used to be a byte of padding in the struct that wasn't documented. It has now been explicitly documented as padding.
- A helper has been added to check if a buffer is inside of main RAM.
- Some unused internal FIFO command names have been removed.
-
DSWifi:
- Local multiplayer support has been added (NiFi). One DS acts as a multiplayer host (Access Point) and the other consoles connect to it.
- The old operation mode has been renamed "Internet mode". It is possible to switch between Internet and local multiplayer modes depending on the needs of the application.
- Scan mode now works differently. In Internet mode it shows all Access Points. In local multiplayer mode it only lists multiplayer hosts, in Internet mode the behaviour remains unchanged.
- CMD/REPLY packet transmit support has been added to the library. This is a way to transfer data between a host and many clients more efficiently. However, regular data packets can still be sent between multiplayer clients and the host if the CMD/REPLY system isn't adequate for the application.
- Beacon packet transmission is now properly supported and documented. The packets advertise the number of players currently connected to a host DS and whether the host accepts new connections or not. It also shows the game ID defined by the user, which is used to identify the right AP for a game.
- When connecting to an Access Point, DSWifi is now honest about the transfer rates supported by the DS. If the AP rejects the connection, it will retry with all the rates defined in the IEEE 802.11b standard (even though only the first 2 out of the 4 are supported), which helps the AP accept the DS.
- Many new multiplayer-related functions have been added to the library.
- New documentation has been added, which explains how the library works internally, and how to use DSWifi in Internet and local multiplayer mode.
- Huge refactor of ARM7 code and the corresponding ARM9 code that communicates with the ARM7. sgIP has been largely untouched. The code has been split into several files, and there is now a clearer split between sgIP and the rest of DSWifi.
- The helper functions to read the firmware and to set the LED blink status have been removed. Now DSWifi calls the libnds functions instead.
- Functions have been documented, IEEE 802.11 frame formats have been documented.
- There are new defines for hardware registers based on GBATEK, and new defines for the fields in the hardware registers that are in used. The melonDS forums have a lot of information (by @Arisotura) that has also been used as source when documenting register fields (like
W_RXFILTER
andW_RXFILTER2
). - Debug messages have been added to the ARM7 code of the library. They are only available in debug builds.
- WEP password usage has been documented. It wasn't clear how to use Hex/ASCII passwords.
- Some unused fields of the
WifiData
struct have been removed. - Private definitions have been removed from public headers.
-
grit:
- Update GRF export code to use the new background type definitions proposed by @Garhoogin in ptexconv.
-
SDK
-
Examples:
- New DSWifi examples have been added, including local multiplayer examples that show how to send CMD/REPLY packets and regular data frames of arbitrary sizes.
- The WEP password input in the AP list example has been improved. The output of the example has also been improved.
- The "get website" example now uses socket-related functions the way DSWifi expects them (
closesocket()
instead ofclose()
). - The templates and examples now use the new LED defines.
-
Documentation:
- The documentation of DSWifi now explains how to use the Internet and local multiplayer modes, as well as how the library works internally.
- The licensing requirements of some libraries (picolibc, libstdc++) has been clarified by @asiekierka.
-
Other:
- New debug ARM7 cores have been added. They use the debug versions of libnds and DSWifi.
- The CMake build system now uses a linker group for the standard libraries to prevent linking errors due to circular dependencies. Also, banner title formation has been improved.
-
Version 1.7.3
-
libnds:
- Use custom version of
swiSoftReset()
instead of instructionswi #0
to prevent crashes on DSi mode, whereswi #0
isn't implemented. swi*()
functions that don't actually useswi
instructions (because of bugs in the implementation in the BIOS) have been documented.nitroFSInit()
now setserrno
correctly if there is no NitroFS filesystem in the ROM.- The DSi mode checks of
soundExtSetFrequencyTWL()
have been moved out oftwl
sections so that this function can be safely called even in DS mode (even if it doesn't have any effect). - Calling
irqSet(flags, NULL)
orirqSetAUX(flags, NULL)
is now safe. Previously, this would causeNULL
to be used as interrupt handler instead of disabling the interrupt handler as expected. - The type
IntFn
has been deprecated in favour ofVoidFn
. Even theinterrupts.h
header didn't useIntFn
, it was only used internally ininterrupts.c
.
- Use custom version of
-
SDK:
-
Docker:
- The Docker images are now built in a GitHub Actions pipeline in the SDK repository instead of locally in the computers of the developers.
-
Examples:
- In the LibXM7 example that uses NitroFS, set pointer to
NULL
when it stops being used so that the program keeps track of whether songs are playing or not. This fixes a crash when trying to start a song after stopping a song.
- In the LibXM7 example that uses NitroFS, set pointer to
-
Documentation:
- Document the release process for new BlocksDS versions.
- Document the existence minimal ARM7 core.
- Remove references to scripts related to the release process used before using GitHub Actions.
- Add link to
ndslib-archive
repository so that it can be used as reference to understand old NDS homebrew source code. - Clarify how to build examples in the setup instructions.
-
Other:
- Use the right system header in
dldipatch
to fix a compiler warning. - PAlib is now available as a pacman package:
blocksds-palib
- Use the right system header in
-
Version 1.7.2
-
libnds:
- Fix compilation error due to incorrect names of slot-2 rumble functions.
- Add debug assertions to check that
cothread_yield_irq()
is never called with interrupts disabled (whenIME
is 0). - Small optimization in
cothread_yield_irq()
wait loop on the ARM9. - Add helper constants for
swiUnpackBits()
. - Implement
getBatteryLevel()
on the ARM7 to mirror the ARM9 implementation. - Add function to check if FatFs cache has been initialized or not.
- Fix code to read official cartridges from the ARM7. The previous code wasn't able to read data when the destination was in the stack (DTCM isn't visible by the ARM7).
- Add error checks on the ARM7 to crash if DLDI is used before being setup.
- Fix undefined C behaviour with some left shifts.
- Add missing system include to ARM7 console header.
-
SDK:
-
ARM7:
- Restructure default ARM7 code to allow for multiple built-in ARM7 cores. Add
ARM7ELF
to the default makefiles to easily select the ARM7 core. Thanks, @GalaxyShard.
- Restructure default ARM7 code to allow for multiple built-in ARM7 cores. Add
-
Documentation:
- Document the new pre-built ARM7 cores.
-
Examples:
- Use the new pre-built ARM7 core in LibXM7 examples instead of custom ARM7 cores.
- Update the BIOS bit unpack example to use the new constants introduced to libnds.
-
Other:
- In the makefiles of DSWiFi, LibXM7 and Maxmod use
ar
from the ARM toolchain rather than the host to build the library. - Improve scripts to release new SDK versions.
- In the makefiles of DSWiFi, LibXM7 and Maxmod use
-
Version 1.7.1
-
libnds:
- Fixed a bug where some assembly functions would be removed by the linker. This happened when a function is supposed to fall through the following one, but it is in a different section. If this other section isn't referenced anywhere, the linker would remove it.
- A new system to send formatted text messages from the ARM7 to the ARM9 has been implemented. This works by using a ring buffer in main RAM that is allocated from the ARM9, so the user can adjust its size easily. This is still being tested and it may change.
-
SDK:
-
Docker:
- Install BlocksDS from pacman packages instead of building it from source. This will make it easier to install other third-party packages. It won't be needed to build them from source and install them, you will be able to simply install the package. The slim image only has the
blocksds-toolchain
package, the dev image has all theblocksds-*
packages.
- Install BlocksDS from pacman packages instead of building it from source. This will make it easier to install other third-party packages. It won't be needed to build them from source and install them, you will be able to simply install the package. The slim image only has the
-
Documentation:
- Update setup instructions.
-
Examples:
- New example of how to use the ARM7 console to print text on the screen.
-
Version 1.7.0
IMPORTANT NOTICE
If you're updating your previous BlocksDS installation with wf-pacman
, run this command twice instead of once:
wf-pacman -Syu
This is required because of the new repository that contains the BlocksDS pacman packages.
Changelog
-
libnds:
- An exception handler has been added to the ARM7. This one is a lot less useful than the ARM9 one because it's only called on undefined instructions and internal libnds errors.
- Add
dldiRelocate()
, which allows relocating a DLDI driver to a different memory address. - Fix DLDI memory pointers not being relocated for non-BSS/noinit areas.
- Update FatFs to R0.15a.
glColorSubTableEXT()
now supports allocating empty palettes by passing a NULL pointer in thetable
argument. This is a small compatibility break because this used to free the palette. However, the old behaviour stays as long aswidth
is 0. In most cases,table
would be NULL andwidth
would be 0, so this change is only a problem in unusual cases.- Disable MPU safely before calling the exit-to-loader ARM9 hook in case the hook doesn't do it properly.
-
maxmod:
- Remove non-standard
.struct
directives.
- Remove non-standard
-
SDK:
-
picolibc:
- Add
asnprintf()
andvasnprintf()
, matching newlib. - Fix memory leak in
asprintf()
andvasprintf()
.
- Add
-
-
ndstool:
- Add a default icon for new
.nds
files, preventing the generation of invalid banners. - Add support for extracting static
.nds
icons as.bmp
files. - Allow specifying
-bt
without a language ID. - Fix the
-n
(latency) argument being a no-op, add corresponding-n1
argument. - Fix the
-fh
(fix header CRC) command not working with TWL-enhanced.nds
files.
- Add a default icon for new
-
Docker:
- curl has been added to both the development and slim images.
- Add new BlocksDS pacman repository during setup.
-
pacman:
-
The pacman server of BlocksDS is now independent from Wonderful Toolchain.
-
The repository with the package build files is now in the BlocksDS GitHub organization in this URL: https://github.com/blocksds/packages
-
BlocksDS still uses Wonderful Toolchain as source for the compiler and the standard C and C++ libraries. It will keep using wf-pacman for the forseeable future as well.
-
Special thanks to asie for all his help.
-
Updating old installations requires the user to run the following commands:
wf-pacman -Sy wf-pacman wf-pacman -Syu wf-pacman -Syu
-
-
New libraries are now available as pacman packages (µLibrary, libwoopsi, dsmi) as well as the tool ptexconv.
-
The GitHub pipeline of the SDK repository has been removed and added to the packages repository.
-
-
Documentation:
- Update documentation with the instructions to use the new pacman repository.
- Some outdated licensing information has been updated.
- The docs generation script has been split into a script that generates it and a script that pushes the built documentation to the repository.
- The updating guide has been updated for versions between 1.3.0 and 1.7.0.
-
Examples:
- New example of gesture recognition using the $N Multistroke Recognizer.
- New example of how to use CMake to build a project with BlocksDS.
- Update the exception handler example to also support triggering ARM7 exceptions.
-
Other:
- BlocksDS now has a dedicated URL (https://blocksds.skylyrac.net/) which means that it doesn't rely on GitHub URLs anymore. This main page redirects to the documentation, GitHub organization, and a NDS homebrew development manual.
- A new prototype CMake build system has been added to the repository.
CC
makefile variables have been renamed toHOSTCC
when they refer to building host tools. This will make it possible to overwrite the host toolchain without also overwriting the ARM toolchain.- Use standard C types and fix includes in mkfatimg.
- bin2c now has an option (
--noext
) that lets it export files excluding the extension from the name, the way some very old homebrew projects expect it. - Some sample defines have been added to the makefiles of the templates to clarify its syntax.
Version 1.6.3
-
libnds:
- Add compile-time warnings about unused result values to various library methods.
- Ensure
nitroFSInit()
checks for successful FAT initialization. - Protect the alternate vector base region (
0x0000000
onwards) from writing and, if said base is not explicitly enabled, reading. This allows catching null pointer accesses at runtime as data aborts.
-
SDK:
-
crt0:
- Fix thread-local storage not being initialized properly during global constructor initialization.
- Fix thread-local storage not being initialized at all on ARM7.
-
picolibc:
- Add
memset_explicit()
. - Improve wctype compatibility.
- Update ctype case conversion table to Unicode 15.1.0 .
- Add
-
Other:
- Add regression test for
setVectorBase()
. - Modify templates to use toolchain
gcc-ar
over hostar
for packaging libraries; this ensures correct operation on systems withoutbinutils
installed, as well as when building libraries with link-time optimized objects. - Update ARM assembly code to always use UAL syntax.
- Update official Docker image to Ubuntu 24.04.
- Add regression test for
-
Version 1.6.2
-
libnds:
-
Filesystem:
- Fixed a bug involving incorrect reads of recently written sectors.
-
-
SDK:
-
Changes to examples:
- Clean the 8-bit double-buffered bitmap example.
-
Other:
- Improve FAQ and updating guide.
-
Version 1.6.1
-
libnds:
-
Filesystem:
- This version was supposed to include a fix for a bug involving incorrect reads of recently written sectors, but the submodule wasn't updated correctly so the fix was left out.
-
Version 1.6.0
-
libnds:
-
Peripherals:
- Add support for the "retail" (ATTiny-based) Motion Pack accelerometer to the DS Motion Card/Pak driver.
- Clean up the DS Motion Card/Pak driver.
- Fix the DS Motion Card driver not working on DSi consoles.
- Fix the solar sensor not being detected on Boktai 1 cartridges.
- Fix
peripheralSlot2SolarScanFast()
not working correctly.
-
GL2D:
- Fix off-by-one errors when drawing textures with GL2D when the textures aren't flipped.
- Reorganize GL2D setup code to reduce code duplication.
-
Other:
- Fix return types and improve performance of integer square root helpers.
- In
initSystem()
, fix video register clearing ranges and remove redundant VRAM configuration. - The GRF "HDR" RIFF chunk has been deprecated and it has been replaced by a new chunk called "HDRX", which is exactly the same, but it includes a version field so that it is future-proof.
- Fix some issues that prevented LLVM from building the library. Add missing arguments to UDF instructions in the codebase. Add some explicit casts. Use
inttypes.h
definitions inprintf()
instead of explicit size modifiers. - Fix undefined behaviour warnings due to left shifts of signed integers.
-
-
grit:
- Update GRF export code to match the new format used by libnds.
-
ndstool:
- Use
git describe
output as version string instead of a hardcoded outdated version number.
- Use
-
SDK:
-
crt0 and linker script files:
- It is now possible to place DTCM variables and data at the end of DTCM instead of the beginning. This means the stack can grow downwards without affecting the variables at the beginning of DTCM. This is done by setting the value of the new symbol
__dtcm_data_size
to a non-zero value. The linker will helpfully point out if the data area is too small for a given program. - The user-configurable symbol
__shared_wram_size
has been added. - Assertions have been added to check that the user-defined sizes produce a valid executable.
- Support for
.noinit
sections has been added. - Missing copyright notices have been added to linker scripts.
- Minor cleanups and adjustments have been done to the crt0 code.
- It is now possible to place DTCM variables and data at the end of DTCM instead of the beginning. This means the stack can grow downwards without affecting the variables at the beginning of DTCM. This is done by setting the value of the new symbol
-
picolibc:
- Add implementation of
<uchar.h>
. - Improve
powf()
accuracy.
- Add implementation of
-
Documentation:
- Provide information about the build process of .nds files.
- Add a FAQ to the documentation.
- Add IRC channels to the support channels page.
- Add notes about what to do after installing BlocksDS.
- Credit all known contributors to all repositories of BlocksDS.
-
Examples:
- Add NDS Motion card example.
- Add example of scaling and rotating GL2D sprites.
- Add
inttypes.h
include in some examples that require it after picolibc changes.
-