libyaul
libyaul copied to clipboard
An open source SEGA Saturn development kit
Yet Another Useless [Saturn] Library
About
Yaul is an open source development kit for the SEGA Saturn. The SDK as a whole aims to minimize the painful experience that is developing for the Saturn by providing lightweight abstractions between your program and the hardware.
Documentation
Visit yaul.org.
Installation
Windows
MSYS2
If you already have MSYS2 installed, follow the directions below to setup access to the package repository. If not, download and install MSYS2 here first, then continue to follow the instructions below.
-
From the Start menu, open MSYS MinGW 64-bit.
-
Open
/etc/pacman.confand at the end of the file, add the following:[yaul-mingw-w64] SigLevel = Optional TrustAll Server = http://packages.yaul.org/mingw-w64/x86_64 -
Go back to the shell and sync and refresh the databases.
pacman -Syy -
Install everything.
pacman -S \ yaul-tool-chain-git \ yaul-git \ yaul-emulator-yabause \ yaul-emulator-mednafen \ yaul-examples-git -
Once all the packages have been installed, close the existing shell and start a new one.
-
Test your environment by building an example.
Linux
Arch
Follow the directions below to setup access to the Arch Linux package repository, or build the packages yourself.
-
As
root, open/etc/pacman.confand at the end of the file, add the following:[yaul-linux] SigLevel = Optional TrustAll Server = http://packages.yaul.org/linux/x86_64 -
Sync and refresh the databases.
pacman -Syy -
Install everything.
pacman -S \ yaul-tool-chain-git \ yaul-git \ yaul-emulator-mednafen \ yaul-emulator-kronos \ yaul-examples-git -
Once all the packages have been installed, close the existing shell and start a new one.
-
Test your environment by building an example.
Debian based
There are currently no .deb packages available. You will
need to build Yaul.
MacOS X
There are currently no packages available. You will need to build Yaul.
Docker
A Dockerfile file is available.
Building tool-chain from source
Follow the instructions found in the build-scripts/ directory. Please
note that you still need to build Yaul.
Setting and building Yaul manually
Cloning the repository
-
Clone the respository
git clone "https://github.com/ijacquez/libyaul.git" -
Initialize the submodules
git submodule init -
Update the registered submodules
git submodule update
Setting up the environment file
-
Copy the template
$TOOL_CHAIN_PREFIX/sh2eb-elf/yaul.env.into your home directory as.yaul.env. This is your environment file.Note,
$TOOL_CHAIN_PREFIXis/opt/tool-chainsif theyaul-tool-chain-gitpackage is installed. Otherwise, if the tool-chain was built manually, it's$HOME/x-tools. -
Read the environment file
.yaul.envinto your current shell.source $HOME/.yaul.env -
Reading the environment file needs to be done every time a new shell is opened. To avoid having to do this every time, add the line below to your shell's startup file.
echo 'source $HOME/.yaul.env' >> $HOME/.bash_profileIf
.bash_profileis not used, use.profileinstead. This is dependent on your set up.
Configuring the environment file
Open $HOME/.yaul.env in a text editor and change the following to define your environment:
- Set the absolute path to the tool-chain in
YAUL_INSTALL_ROOT. - If necessary, set
YAUL_PROG_SH_PREFIXandYAUL_ARCH_SH_PREFIX. - Set the absolute path to where the
libyaulsource tree is located inYAUL_BUILD_ROOT. - Enable RTags/Irony/ccls support by setting
YAUL_CDBto 1. To disable, set to 0 (zero).
Setting the wrong values may result in compilation errors.
Building
-
Build and install the supported libraries.
SILENT=1 make install-debugIf any given library in Yaul is being debugged, use the
install-debugtarget instead. Either release or debug can currently be installed at one time. It's possible to switch between the two in the same installation.To find more about other targets, call
make list-targets. -
Build and install the tools.
SILENT=1 make install-tools -
Test your environment by building an example.
Building and running an example
-
If you've built Yaul manually, check out any example in the
examplessubmodule. Otherwise, go to/opt/yaul-examples/. -
Copy the
vdp1-zoom-spritedirectory to your home directorycp -r /opt/yaul-examples/vdp1-zoom-sprite $HOME/ -
Build
vdp1-spritecd $HOME/vdp1-zoom-sprite SILENT=1 make clean SILENT=1 make -
Use Mednafen to test the example.
mednafen vdp1-zoom-sprite.cueIf Mednafen is unable to find the Sega Saturn BIOS image, please confirm that,
-
The file is named
mpr-17933.binand that it exists relative to thefirmwaredirectory under the Mednafen base directory. -
The calculated MD5 hash of the file is
3240872c70984b6cbfda1586cab68dbe.
-
-
Success! :tada:
Contact
You can find me (@mrkotfw) on Discord.