SDL for Hitachi-SH4

Hi all
I’ve successfully cross-compiled the SDL library version 1.2.5 for an Hitachi SH4 architecture. I’ve then tried to run some test programs (like testwin, testbitmap and testhread); they seem to run correctly, but I can see no output onto the TV display.
I’ve compiled SDL with just the fbcon video driver enabled, because it is the only one video driver supported by my machine.
Here are the configure script options:
./configure --prefix="/mnt" --build="./config.guess" --host=“sh4-linux” --without-x --disable-joystick --disable-cdrom --disable-esd --disable-esdtest – disable-alsa --disable-arts --disable-nas --disable-diskaudio --disable-mintaudio --disable-video-dga --disable-video-dummy --disable-video-directfb --disable-video-photon --disable-video-ps2gs --disable-video-x11 --disable-video-xbios --disable-video-opengl --disable-video-gem --enable-dlopen --x-includes="/sh4/target/usr/X11R6/include" --x-libraries="/sh4/target/usr/X11R6/lib"

Has anyone ever tried to use SDL on such a system? What could be wrong with my SDL on fbcon?

I’ve a second question to ask: what about this patch?

diff -urN SDL/include/SDL_syswm.h new/SDL_syswm.h
— SDL/include/SDL_syswm.h 2002-11-14 21:16:11.000000000 +0100
+++ new/SDL_syswm.h 2003-02-03 13:39:21.000000000 +0100
@@ -50,7 +50,7 @@

/* This is the structure for custom window manager events */
#if (defined(unix) || defined(unix) || defined(_AIX) || defined(OpenBSD)) && \

  • (!defined(DISABLE_X11) && !defined(CYGWIN32) && !defined(ENABLE_NANOX))
  • (defined(ENABLE_X11) && !defined(CYGWIN32) && !defined(ENABLE_NANOX))
    /* AIX is unix, of course, but the native compiler CSet doesn’t define unix */
    #include <X11/Xlib.h>
    #include <X11/Xatom.h>

I used ENABLE_X11 because this is the variable that is set by the configure script; on the contrary, if I use DISABLE_X11, my machine is configured as an X-machine (since DISABLE_X11 is not defined by the configure), even if it isn’t.

Thanks____________________________________________

Nicola Franchi

CEFRIEL - Politecnico di Milano ~ Image & Audio Processing Unit
Via Fucini 2 - 20133 Milano - Italy
Phone: +39 02 23954 284, Fax: +39 02 23954 484
E-mail: @Nicola_Franchi