You guys, something interesting here.
First of all the good news: I
FINALLY got to compile a working release of FUSE, one of the best ZX Spectrum emulators available as open source
https://sourceforge.net/projects/fuse-emulator/.
Configure and Make went successful but I encountered two major problems:
- the font file fuse.font used in the SDL version got broken during compilation. I solved it replacing the broken one with a pre-compiled version from a Debian distribution. OK, I cheated, but too little time to investigate on this;
- The executable crashed during SDL graphic mode initialization.
In the source file
ui/sdl/sdldisplay.c there's a function named
uidisplay_init( int width, int height )which calls
SDL_ListModes like this:
modes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_SWSURFACE);where
modes is of type
SDL_Rect **modes; as per documentation.
I noticed that
SDL_ListModes returns three available modes but only the first one seems somehow valid.
Trying to access modes[1] or modes[2] immediately crashed the program. SDL documentation was not helpful as I hoped.
The obvious solution was to force selecting
modes[0] like this
#if defined (__OS2__)
mn = 0; // Remove useless warning
mw = modes[0]->w;
mh = modes[0]->h;
fprintf (stderr, "OS/2 system: resolution is %d x %d\n\r", mw, mh);
#else
...rest of original code follows...
I'm currently uploading everything on Hobbes, with source and utilities.
Did someone else encounter this problem? It seems almost like SDL2 under OS/2 works only in full screen mode. This may also explain why I can't start sUQLx (a Sinclair QL SDL emulator) in windowed mode, even if I try to force it.
Mentore