OS/2, eCS & ArcaOS - Technical > Programming

[SDL2] SDL_ListModes and emulation

<< < (2/3) > >>

Dave Yeo:
Looking at your package, fuse.exe uses SDL120.DLL

Dave Yeo:
So I tried building fuse. For spectrum I used these configure arguments,

--- Code: -----without-libgcrypt --prefix=/@unixroot/usr/local LDFLAGS="-Zomf -Zhigh-mem -lcx"

--- End code ---
and for Fuse,

--- Code: --- --prefix=/Fuse-160 --without-x --without-gtk --disable-gtk3 --with-sdl  LDFLAGS="-Zomf -Zhigh-mem -lcx" LIBS="-lbz2 -lz"  LIBSPECTRUM_CFLAGS=-I/@unixroot/usr/local/include LIBSPECTRUM_LIBS=-l/@unixroot/usr/local/lib/spectrum.a 2>&1 | tee configure.log

--- End code ---
and had to add to peripherals/ttx2000s.c, in the include area around line 37,

--- Code: ---#ifdef __OS2__
#include <libcx/net.h>
#endif

--- End code ---

I see configure output,

--- Code: ---checking whether SDL UI requested... yes
configure: WARNING: SDL 2 not supported for the UI, using SDL 1 instead
checking for sdl-config... /@unixroot/usr/bin/sdl-config
checking for SDL - version >= 1.2.4... yes

--- End code ---
and at the end,

--- Code: ---****************************
*** Libspectrum features ***
****************************

Internal GLib replacement: no
zlib support: yes
bzip2 support: yes
audiofile support: no

********************
*** Fuse options ***
********************

User interface: sdl
Using SDL 2: no
Joystick support: yes
Using libjsw for joystick support: no
zlib support: yes
libxml2 support: yes
libpng support: yes
Available audio drivers: sdl  null
Selected audio driver: sdl
Spectranet support: yes
SpeccyBoot support: no
TTX2000 S support: yes
Desktop integration: no

Type 'make' to compile Fuse

--- End code ---

Unluckily, it crashes while, I think, trying to show the settings. fuse --help does work. Perhaps due to lack of utilities? All I feel like doing right now as I'm not really interested in the emulator.

Mentore:

--- Quote from: Dave Yeo on October 31, 2024, 04:04:56 am ---So I tried building fuse. For spectrum I used these configure arguments,

--- Code: -----without-libgcrypt --prefix=/@unixroot/usr/local LDFLAGS="-Zomf -Zhigh-mem -lcx"

--- End code ---
and for Fuse,

--- Code: --- --prefix=/Fuse-160 --without-x --without-gtk --disable-gtk3 --with-sdl  LDFLAGS="-Zomf -Zhigh-mem -lcx" LIBS="-lbz2 -lz"  LIBSPECTRUM_CFLAGS=-I/@unixroot/usr/local/include LIBSPECTRUM_LIBS=-l/@unixroot/usr/local/lib/spectrum.a 2>&1 | tee configure.log

--- End code ---
and had to add to peripherals/ttx2000s.c, in the include area around line 37,

--- Code: ---#ifdef __OS2__
#include <libcx/net.h>
#endif

--- End code ---

I see configure output,

--- Code: ---checking whether SDL UI requested... yes
configure: WARNING: SDL 2 not supported for the UI, using SDL 1 instead
checking for sdl-config... /@unixroot/usr/bin/sdl-config
checking for SDL - version >= 1.2.4... yes

--- End code ---
and at the end,

--- Code: ---****************************
*** Libspectrum features ***
****************************

Internal GLib replacement: no
zlib support: yes
bzip2 support: yes
audiofile support: no

********************
*** Fuse options ***
********************

User interface: sdl
Using SDL 2: no
Joystick support: yes
Using libjsw for joystick support: no
zlib support: yes
libxml2 support: yes
libpng support: yes
Available audio drivers: sdl  null
Selected audio driver: sdl
Spectranet support: yes
SpeccyBoot support: no
TTX2000 S support: yes
Desktop integration: no

Type 'make' to compile Fuse

--- End code ---

Unluckily, it crashes while, I think, trying to show the settings. fuse --help does work. Perhaps due to lack of utilities? All I feel like doing right now as I'm not really interested in the emulator.

--- End quote ---

Thanks a lot Dave, I skipped the network support and some other things in order to obtain something working.
Quite possibly you are experiencing my same problem - SDL initialization fails due to SDL_LoadModes returning a 3 value array but with only one mode valid (the other two crash initialization).
I'll surely take your work into account as soon as I can.

Mentore

Lars:

--- Quote from: Pete on October 30, 2024, 03:11:43 pm ---Hi Mentore

I have not played any ZX Spectrum games in many years, would not mind having another go at pacman as I think the Speccy version was the best.

Starfighter (downloaded from hobbes) is an SDL2 game that runs in a window so SDL2 for OS/2 should not be fullscreen only.

However, Starfighter does not work with SDL2 files installed by ANPM - currently at 2.0.18-3 -   but requires an earlier package http://hobbes.nmsu.edu/download/pub/os2/dev/SDL2-2.0.4-20160225.zip in order to run.

So, I guess the question is: Are you using the right variant of SDL2?


Regards

Pete

--- End quote ---

Hi Pete,

1) I downloaded "Project_Starfigher_1-6.zip" from Hobbes
2) I have SDL2 version 2.28.1-1 installed, so that is newer than what you have. I got this either from Netlabs or Netlabs experimental as an RPM, you should be able to also install it.

That works just fine with USB audio as well as on board audio (UNIAUD). I can switch back and forth the default audio device and that also works just fine.

Pete:
Hi Lars

I deleted the sdl2*.dll files that starfighter definitely uses and updated SDL2 to 2.28.1-1 then tried running Starfighter.
Result: Error window displayed stating Cannot start J:\Games.eCS\StarFighter\starfighter.exe ...

Dropped starfighter.exe onto the PMdll object which shows starfighter needs the following files to run
sdl2.dll
sdl2mix.dll
sdl2img.dll

The above are not included in SDL2 2.28.1-1
Maybe you already have those somewhere on the libpath? - Or am I missing some sort of "forwarder" dll file where calls to sdl2*.dll files get passed to sdl2200.dll?


Regards

Pete



Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version