Dreamcast Port

From DirectFBWiki

Table of contents

About the Port

DirectFB already ran on Dreamcast. well ... on Dreamcast running Linux. This port would would use KallistiOS, which seems to be a free and mature embedded operating system for the Dreamcast.

What KallistiOS already does for us

From the README:

 What KallistiOS is primarily:
 - Processor manager (threads, MMU, store queues, DMA, exceptions, etc) 
 - Pseudo-POSIX/ANSI layer (printf, files, threads, etc)
 - HAL (hardware abstraction layer)

This is great, lots of DirectFB's requirements are already covered. Including threads :-)

More from the README:

 What KallistiOS provides optionally:
 - Dynamic module loading
 - Ported addon modules, through kos-ports

The kos-ports includes libz, libpng and libjpeg. And freetype for KallistiOS seems to be available here: http://sourceforge.net/project/showfiles.php?group_id=23791

How to build a toolchain and KallistiOS

Here is a great step-by-step guide on how to build the toolchain ans KallistiOS: http://cadcdev.sourceforge.net/softprj/kos/setup.php

It is really easy to set up, worked even on Mac OS X, without any patches.

How to build DirectFB

It does not build yet. but you can start the build process you'll have to

  • type ". environ.sh", your "environ.sh" is in your kos folder
  • in the DirectFB folder run the following command:

RANLIB=kos-ranlib AR=kos-ar STRIP=kos-strip CC=kos-cc LD=kos-ld AS=kos-as CFLAGS=$KOS_CFLAGS LDFLAGS=$KOS_LDFLAGS ./autogen.sh --host=sh-elf --target=sh-elf --enable-static --disable-shared --disable-debug --disable-trace

compilation will fail. But that's how far we got. ;-)

Status

libdirectfb compiles when uncommenting some code. Some workaround are already in CVS kos system not even started.

Missing from KallistiOS:

Function Workaround in CVS Comment
pthread_mutexattr_settype() yes, do nothing instead recursive mutexes are not supported on KallistiOS
killpg() yes, do nothing instead we dont need to kill or clean up anything, its just a game console, it runs a game until power is switched off.