A hello world on libyaul.
Nothing better than a simple hello world to get the feet wet on a new hardware.
My goal, as of April 2021, is to get a simple demo (as in demoscene demo) done by October, for Inercia Demoparty , for the sega saturn.
I’ve already had a USB dev cart for the sega saturn that I’ve brought from cafe-alpha, but had been gathering dust for several years.
Toolchains
As toolchains for the sega saturn I’ve found :
- Libyaul : available for windows and linux. Tools such as emulators to test the code are already included.
- Saturn SDK : SDK, libs and documentation.
- Jo Engine : an open source 2d and 3d engine.
The list is not complete.
I´ve decided to stick to libyaul. On windows it was simple to setup, examples could be easy compiled out of the box, and it has a helpful and active community on discord , where the author of libyaul is also part of.
Hello World
Makefile
The make file was just a modified makefile already available from the exemples provided with libyaul.
Code
#include <yaul.h> #include <stdio.h> #include <stdlib.h> void main(void) { //init the subsystem to print debug text to the screen dbgio_dev_default_init(DBGIO_DEV_VDP2_SIMPLE); dbgio_dev_font_load(); dbgio_dev_font_load_wait(); //enable vdp2 vdp2_tvmd_display_set(); while(1) { dbgio_printf("\x1b[H\x1b[2J"); // clears the screen dbgio_printf("Hello World\n"); // actual text dbgio_flush(); // flush vdp_sync(); // required at the end of each frame } }
