A patch for SDL-1.2.0 to support Microwindows 0.89pre7 is avaliable. Please go here to download: ftp://ftp.setabox.com/pub/sdl/sdl-nanox-patch.0.8.tgz
-------------- next part --------------=================================================================
Patch version 0.8 of SDL(Simple DirectMedia Layer) for Nano-X API
Author: Hsieh-Fu Tsai, clare at setabox.com
There are two patch files in this package.
- The first patch file, nanox.patch, is to fix a bug in Nano-X.
This patch is proposed by Gary James (gjames at twcny.rr.com).
It fixes the client side GrClose(). In the original version,
GrOpen() can only be called once. When the GrOpen() is called at
the second time, the program will terminate. In order to prevent
this situation, we need to insert “nxSocket = -1” after
"close(nxSocket)" in GrClose(). If you do not have this problem,
you may skip this step.
- The second patch file, sdl.patch.0.8, is to enable SDL 1.2.0
running under Microwindow 0.89pre7.
In this patch, five files are patched in order to insert nano-X
options. They are SDL/configure.in, SDL/include/SDL_syswm.h,
SDL/src/video/Makefile.am, SDL/src/video/SDL_sysvideo.h and
SDL/src/video/SDL_video.c. A new directory SDL/src/video/nanox
is created to contain all the necessary video drivers for nano-X.
- download ftp://ftp.setabox.com/pub/sdl/sdl-nanox-patch.0.8.tgz
- copy the tarball file to the directory containing SDL-1.2.0
- tar zxvf sdl-nanox-patch.0.8.tgz
- patch -p1 -d SDL-1.2.0 < sdl.patch.0.8
- cd SDL-1.2.0
- ./configure --disable-video-x11 --disable-video-fbcon \
- make clean
- make install (as root)
If the wrong pixel type is used, the program will crash when the
sub-routine updates the screen. This option depends on SCREEN_PIXTYPE
which is defined in Microwin0.89pre7/src/config. SCREEN_PIXTYPE
is used to define the pixel type in Microwindows/Nano-X.
I only test the program when the pixel type is in “rgb”
(Microwin under X11) or “888” (framebuffer in 24-bit).
–enable-nanox-debug Show debug messages
–enable-nanox-share-memory Use shared-memory to speed up
Some programs can be used to test this patch.
- http://www.cs.berkeley.edu/~weimer/atris (a tetris-like game)
- Create hardware surface
- Create YUVOverlay on hardware
- Use OpenGL
- Gamma correction
- Hide/Change mouse pointer
Many thanks to go to Setabox Co., Ltd. and CML (Communication and
Multimedia Laboratory, http://www.cmlab.csie.ntu.edu.tw/) in the
Department of Computer Science and Information Engineering of
National Taiwan University for supporting this porting project.