This is not the long-awaited PR that adds complete SPI bus and MDEC support. I did not want to open a PR until full MDEC support was in place but, since I am going to be busy with other things in the next few months, I'd rather provide a fix for the linker script bugs right now along with some of the things I have been working on.
Quick summary of the most notable changes:
Build system
MSVC/MSBuild can now be used to build the tools and mkpsxiso while still using Ninja or make to compile the libraries and examples (as MSBuild does not support custom toolchains). The LIBPSN00B_GENERATOR option can be used to select which CMake generator to use for cross compiilng.
Binary files can now be trivially embedded into executables using the psn00bsdk_target_incbin() CMake function.
Continuous integration
The Windows build pipeline has been upgraded to use MSVC on Windows Server 2022.
An older version of the GitHub Actions cache API is used instead of v2 due to a long-standing bug that can't be worked around easily anymore.
Examples
demos/n00bdemo is now System 573 compatible (if compiled with the relevant #define uncommented) and has a frame rate counter.
mdec/mdecimage shows how to feed uncompressed bitstream data into the MDEC and retrieve a decoded image. A simple Python script to encode images into the format expected by the MDEC is included.
Library fixes and improvements
A critical section alignment bug in the linker scripts has been fixed. Previously this bug would cause built executables to crash immediately under some circumstances (e.g. when embedding binary files whose size was not a multiple of 4).
A partial implementation of libpress has been added. All MDEC and DMA APIs are present, however DecDCTvlc() and its helpers are still missing.
DL_CALL() has been replaced with DL_PRE_CALL(), allowing values returned by DLL functions to be accessed.
The C standard library's assert() is now properly implemented, while stdint.h has been removed as GCC provides a better version of it already.
hwregs_c.h has been added, providing C macros for accessing most hardware registers.
This is not the long-awaited PR that adds complete SPI bus and MDEC support. I did not want to open a PR until full MDEC support was in place but, since I am going to be busy with other things in the next few months, I'd rather provide a fix for the linker script bugs right now along with some of the things I have been working on.
Quick summary of the most notable changes:
Build system
make
to compile the libraries and examples (as MSBuild does not support custom toolchains). TheLIBPSN00B_GENERATOR
option can be used to select which CMake generator to use for cross compiilng.psn00bsdk_target_incbin()
CMake function.Continuous integration
Examples
demos/n00bdemo
is now System 573 compatible (if compiled with the relevant #define uncommented) and has a frame rate counter.mdec/mdecimage
shows how to feed uncompressed bitstream data into the MDEC and retrieve a decoded image. A simple Python script to encode images into the format expected by the MDEC is included.Library fixes and improvements
libpress
has been added. All MDEC and DMA APIs are present, howeverDecDCTvlc()
and its helpers are still missing.DL_CALL()
has been replaced withDL_PRE_CALL()
, allowing values returned by DLL functions to be accessed.assert()
is now properly implemented, whilestdint.h
has been removed as GCC provides a better version of it already.hwregs_c.h
has been added, providing C macros for accessing most hardware registers.