Skip to content

Releases: devkitPro/libctru

libctru 2.3.1

05 Nov 11:45
8a877e5
Compare
Choose a tag to compare
  • remove 3dstypes.h include from poll.h
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

libctru 2.3.0

28 Oct 20:14
bf4a24a
Compare
Choose a tag to compare
  • Fix typo in docs by @DeltaF1 in #525
  • Add GPU_DOT3_RGBA texture combiner function by @oreo639 in #528
  • FSUSER_GetLegacyBannerData: Fix documentation typo by @Tekito-256 in #526
  • Add CTR_ prefix to ALIGN,PACKED,DEPRECATED macros by @glebm in #532
  • Buffer console control sequences by @piepie62 in #522
  • Prevent CPU from postponing threadOnException memory writes
  • Add SSID-related ac:i functions
    • ACI_LoadNetworkSetting, ACI_GetNetworkWirelessEssidSecuritySsid and acGetSessionHandle.
  • Prevent double call of destructors on exit.
  • Added experimental support for standard threading APIs (pthread, C threads, C++ std::thread)
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

New Contributors

libctru 2.2.2

28 Oct 18:58
a9a9d9a
Compare
Choose a tag to compare
  • archive_dev: Ensure path seperator for local path by @oreo639 in #524

libctru 2.2.1

08 May 13:03
8d90551
Compare
Choose a tag to compare
v2.2.1

add define for curl

libctru v2.2.0

05 Apr 08:42
032f3da
Compare
Choose a tag to compare
  • apt: add deliver arg support to chainloader

libctru v2.1.2

09 Feb 19:13
98324d4
Compare
Choose a tag to compare
  • Added cdc:CHK service wrappers
  • Added support for clock_gettime (#495)
  • svc: Fixed svcGetDmaState writing out-of-bounds data
  • svc: Changed svcCreateCodeSet address parameters to pointer-sized integers, improve documentation
  • fspxi: Fixed FSPXI_CreateFile and FSPXI_WriteFile (#496)
  • ndsp: Added various ndspGet* and ndspChnGet* methods (#505, #506, #507)
  • ir: Added IRU_GetSend/RecvFinishedEvent (#513)
  • errf: Added ERRF_SetUserString and clarify documentation
  • mcuhwc: Added mcuHwcGetSessionHandle
  • apt: Fixed dirty homebrew chainload bug (used when Home Menu hasn't been started)
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

libctru v2.1.1

22 May 21:13
d4e08aa
Compare
Choose a tag to compare
  • FPSCR is now initialized with a predictable value in all threads (including the main thread).
  • Added gspGetSessionHandle and gspLcdGetSessionHandle.
  • Fixed bugs related to uninitialized data in srv/errf service wrappers.
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

libctru v2.1.0

28 Jan 01:59
Compare
Choose a tag to compare

Version 2.1.0

The #define for the 3DS platform has been changed to __3DS__ (previously it was _3DS) - please update your Makefiles and your code

graphics

  • Refactored VRAM allocators:
    • Added proper handling for VRAM banks (A and B, 3 MiB each)
    • Allocations no longer cross VRAM bank boundaries
    • Added vramAllocAt, vramMemAlignAt
  • Add gspIsPresentPending.
  • Add return value to gspPresentBuffer.
  • libctru console now supports SGR 38 and 48 escape sequences (needed by fmtlib).
  • Fixed GPU_TEXFACE enum.

filesystem

  • Changed rename to replace existing files, for better compatibility with POSIX (#483)
  • Added SDMMC speed info types, and more clock rates (#480).

miscellaneous

  • Added support for 3dslink stdio redirection (#488).
  • Added ptm:gets, ptm:sets and more ptm service commands.
  • Added AM_ContentInfo, AM_ContentInfoFlags structs.
  • Added AMAPP_GetDLCContentInfoCount, AMAPP_ListDLCContentInfos.
  • Fixed bug in Huffman decoder.
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

libctru v2.0.1

19 Dec 16:17
e996cef
Compare
Choose a tag to compare
  • Added CFG_SystemModel enum.
  • Fixed bug in condvar code.
  • Fixed bug in srvpm code.
  • Fixed const correctness issues in gspgpu code.
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.

libctru v2.0.0

16 Jul 14:42
958e0c7
Compare
Choose a tag to compare

This is a major release. Many essential components have been overhauled, although breaking changes are minimal and only affect rarely used functionality.

system

  • Added support for userAppInit/userAppExit (backported from libnx).
  • Changed default heap allocation logic to be more robust:
    • Resource limit SVCs are now used to detect available memory.
    • The heap size calculation algorithm was tweaked so that 32MB of linear heap are available for normal apps running under the default appmemtype layout on Old 3DS, as it was the case prior to libctru 1.8.0.
  • SVC enhancements:
    • Added svcControlPerformanceCounter with corresponding enums.
    • Overhauled support for DMA related SVCs:
      • Added svcRestartDma.
      • Added enums and structures needed for DMA SVCs.
      • Added dmaDeviceConfigInitDefault, dmaConfigInitDefault.
    • Added svcArbitrateAddressNoTimeout (minor ABI optimization for the svcArbitrateAddress syscall when the timeout parameter is not used).
    • Changed process memory SVCs to use u32 parameters instead of void* for foreign-process addresses.
  • Major refactor of OS related functions:
    • Added defines for Arm11 userland memory region addresses/sizes.
    • Added struct definitions for the kernel/system shared config pages: osKernelConfig_s, osSharedConfig_s.
    • Added macros to access the kernel/system shared config pages: OS_KernelConfig, OS_SharedConfig.
    • Fixed return type of osGetMemRegionUsed, osGetMemRegionFree (s64 -> u32).
    • Refactored osConvertVirtToPhys and added support for the missing linearly mapped memory regions.
    • Rewritten RTC time reading support to improve accuracy and match official logic more closely.
      • Time drift correction is now implemented.
      • Added osGetTimeRef function for reading the current reference timepoint published by the PTM sysmodule.
    • Fixed osStrError to actually work properly.
    • Cleaned up osGetSystemVersionData implementation.
    • Other miscellaneous internal cleanup.

synchronization

  • Improved safety of usermode synchronization primitives when used in intercore contexts.
  • Added CondVar synchronization primitive implementation.
  • Added syncArbitrateAddress, syncArbitrateAddressWithTimeout.
    • These functions replace __sync_get_arbiter (which has been removed).
  • Added __dmb (Data Memory Barrier) intrinsic.
  • Added LightEvent_WaitTimeout.
  • Added LightSemaphore_TryAcquire.
  • Changed LightLock to support 0 as a valid initial (unlocked) state.
    • This effectively adds support for trivially initialized/zerofilled locks.
  • Fixed bug in LightSemaphore_Acquire.

graphics

  • Major refactor of the GSP service wrapper. It should now be possible to use GSP directly without the gfx API, if the user so desires.
  • Major internal refactor of the gfx wrapper API that increases maintainability.
  • Added support for 800px wide mode with non-square pixels on the top screen - usable on every 3DS model except for Old 2DS (but including New 2DS XL).
  • Added support for 800px wide mode to the libctru console.
  • Transferred most of the GSP initialization duties to gspInit/gspExit (previously done by the gfx wrapper).
  • Added defines for screen IDs and screen dimensions.
  • Added gspPresentBuffer for pushing a framebuffer to the internal GSP swap queue (previously this was an internal function in the gfx wrapper).
  • Added gspGetBytesPerPixel, gspHasGpuRight.
  • Added gfxScreenSwapBuffers, with support for duplicating left->right eye content during stereoscopic 3D mode.
  • Fixed LCD configuration mode when using framebuffers on VRAM with the gfx wrapper.
  • Changed gfxExit to set LCD force-black status to true.
  • Changed the gfx wrapper to always use gspPresentBuffer during swap. This means the immediate parameter of gfxConfigScreen no longer has any effect, and gfxSwapBuffers/gfxSwapBuffersGpu now do the same thing - that is, present the rendered content during the next VBlank.
  • Renamed GSPGPU_FramebufferFormats enum to GSPGPU_FramebufferFormat.
  • Deprecated gfxConfigScreen (use gfxScreenSwapBuffers instead).
  • Removed gspInitEventHandler, gspExitEventHandler (now handled automatically inside gspInit/gspExit).
  • Removed sharedGspCmdBuf param from gspSubmitGxCommand (now uses the proper GSP shared memory address automatically).
  • Removed GSPGPU_REBASE_REG define (leftover from early 3DS homebrew).
  • Removed numerous internal fields that were previously publicly accessible.

audio

  • DSP access rights are now managed using a hook mechanism, similar to the APT hook.
    • This fixes audio playback during libapplet invocations, as they no longer relinquish DSP rights.
  • Changed NDSP to use the DSP hook instead of the APT hook.
  • Added dspIsComponentLoaded, dspHook, dspUnhook.
  • Fixed and improved robustness of wavebuf handling in NDSP code.
  • Fixed and refactored NDSP sleep/wakeup code to improve accuracy compared to official logic.

filesystem

  • Reduced TLS footprint of the archive/romfs devices by sharing buffers.
  • Reduced the maximum number of concurrently registered archive devices from 32 to 8 in order to save memory.
  • Backported multi-mount romfs system from libnx, with additional optimizations (breaking API change).
  • Added romfsMountFromTitle.
  • Fixed stat for romfs device to return -1 for non-existent files/directories.

applet

  • Major internal refactor of the APT service wrapper that should improve accuracy compared to official logic.
  • Fixed sleep handling when the app is inactive (i.e. app is suspended).
  • Added support for screen capture during libapplet transitions.
  • Added support for proper DSP access right management.
  • aptLaunchLibraryApplet no longer calls aptMainLoop internally. Library applet calls no longer return a bool value, users are advised to check APT state manually afterwards.
  • Added functions for checking APT state: aptIsActive, aptShouldClose, aptShouldJumpToHome, aptCheckHomePressRejected (replaces aptIsHomePressed).
  • Added functions for handling incoming requests: aptHandleSleep, aptHandleJumpToHome.
  • Added aptJumpToHomeMenu.
  • Changed aptMainLoop to use the new wrapper functions (this means aptMainLoop can now be replaced by custom logic if desired).
  • Changed APTHOOK_ONEXIT to be invoked during aptExit instead of during aptMainLoop.
  • Added aptClearChainloader, aptSetChainloaderToSelf.

miscellaneous

  • Fix decompress out-of-bounds access.
  • Added NDM_ prefix to NDM enum members in order to avoid name collisions.
  • Corrected parameter type in several CFGU functions.
  • Corrected return value of GSPLCD_GetBrightness.
  • Removed obsolete support for ninjhax 1.x's fake hb:HB service.
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.