Author Topic: Games with older SDL and FSLIB  (Read 94055 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #135 on: January 08, 2026, 04:32:03 pm »
I hacked configure.in to remove the sdlimage and sdlmixer tests. Pushed the updated auto files, and a brief note on how I built. "make 'LIBS=-lsdlimage -lsdlmixer -lsdl12'"
I never did test for sound, did you?

There is no sound here. FYI: The .exe does not reference/requiere SDLMixer.dll. (Checked with PMDLL)

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #136 on: January 08, 2026, 05:27:06 pm »
Hmm, my bad. Try this one.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #137 on: January 08, 2026, 06:39:06 pm »
Great.

This is the winner, it has music, sound. Nice.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #138 on: January 08, 2026, 08:59:18 pm »
Good, pushed last changes to enable sound.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #139 on: January 08, 2026, 10:03:01 pm »
Thanks Dave

Can you please check SDLRoids?
- https://github.com/OSSGames/GAME-SDL-ACTION-SDLRoids

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #140 on: Today at 12:37:13 am »
First try attached. Can't seem to get it to use sdlmixer, I'll look more. It is supposed to fall back to SDL for sound but may be *nix centered.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #141 on: Today at 03:23:26 am »
Hello

It runs fine, no sound. It is very good that the Alt+Enter works great to switch between windowed and full screen.

Is there a way not to show the command console when it runs? (Picture attached).

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #142 on: Today at 04:50:18 am »
Try,
Code: [Select]
exehdr /PMTYPE:PM sdlroids.exe

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #143 on: Today at 06:01:10 am »
I enabled sound but,
Code: [Select]
[H:\tmp\GAME-SDL-ACTION-SDLRoids]sdlroids

Killed by SIGFPE
pid=0x3627 ppid=0x029e tid=0x0001 slot=0x00c4 pri=0x0200 mc=0x0001 ps=0x0010
H:\TMP\GAME-SDL-ACTION-SDLROIDS\SDLROIDS.EXE
cs:eip=0003:00000008      ss:esp=0000:20000000      ebp=1f380053
 ds=2003013c      es=0000      fs=0013fc14      gs=0000     efl=20000218
eax=0013fd28 ebx=1ffc9d7c ecx=0013fd3c edx=0013fd60 edi=00000000 esi=0013ff9c
Creating 3627_01.TRP
Moved 3627_01.TRP to W:\var\log\app\69601a22-3627_01-SDLROIDS-exceptq.txt

And I can't see why it crashes.
Did sound work on the original? I had to add #define HAVE_LIBSDL_MIXER 1 to config.h. It seems it was dead code before I added it as it was only in sdlsound.c while I would expect it to get defined by configure.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #144 on: Today at 08:47:35 pm »
Did sound work on the original?

I can not run the older sldroids.exe (because of it depends on SNAP), but I see it references to SDLMIXER.DLL with PMDLL.

Regards
« Last Edit: Today at 09:43:12 pm by Martin Iturbide »
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #145 on: Today at 10:24:33 pm »
Ok, edited the makefile's LDFLAGS instead of trying to pass the libs in the environment and seems to work, almost gave the wife a heart attack as I had the volume up :) You'll need to use exehdr to make it a PM program though I could add a def.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5585
  • Karma: +50/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #146 on: Today at 11:12:26 pm »
It works fine, with sound. Thanks Dave. Apologies to your wife, sometimes it happens the same with mine while I'm testing software at night.

About the console showing, I run "c:\os2Tk45\bin\exehdr /PMTYPE:PM sdlroids.exe"

Code: [Select]
[C:\PROGRAMS\SDLROIDS]c:\os2Tk45\bin\exehdr /PMTYPE:PM sdlroids.exe

Operating System/2 Executable File Header Utility
Version 4.01.003 Dec 11 2003
Copyright (C) IBM Corporation 1988-2003
Copyright (C) Microsoft Corp. 1988-1992.
All rights reserved.

Module:                         sdlroids

Module type:                    Program
Number of memory pages:         0000000b (11)
Initial CS:EIP:                 object 1 offset 00000000
Initial SS:ESP:                 object 3 offset 00100000
Automatic data object:          2
Stack allocation:               00100000 (1048576) bytes

 no. virtual  virtual  map      map      flags
     address   size    index    size
0001 00010000 00009850 00000001 0000000a EXECUTABLE, READABLE, 32-bit
0002 00020000 0001cbe0 0000000b 00000001 READABLE, WRITEABLE, 32-bit
0003 00040000 00100000 0000000c 00000000 READABLE, WRITEABLE, 32-bit


I zipped both for you to check it.  On the unchanged exe I did the trick to put it as "Start Minimized" to don't show the console.

I also created the OS/2 fork for you to upload any changes:
-- https://github.com/OS2World/GAME-SDL-ACTION-SDLRoids

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5640
  • Karma: +143/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #147 on: Today at 11:41:22 pm »
I don't like editing generated makefiles so trying to build just by passing arguments to configure, like so.
Code: [Select]
configure CFLAGS=-DHAVE_LIBSDL_MIXER 'LDFLAGS=-Zomf -Zhigh-mem -Zmap' 'LIBS=-lSDL_mixer'
Doesn't make a difference if I use -Zhigh-mem and/or -Zmap.
This results in this when running make,
...
Code: [Select]
gcc  -DHAVE_LIBSDL_MIXER -Ih:/tmp/SDL/h -Ih:/tmp/SDL/h/SDL  -Zomf -Zhigh-mem -Zmap -o sdlroids.exe hyperoid.o roidsupp.o sdlsound.o sdl.o petopt.o getargs.o rand.o  -lm -lSDL_mixer -Lh:/tmp/SDL/lib -Zomf -lsdl12
...
Code: [Select]
Error! E2028: _ifloor is an undefined reference
Error! E2028: _SDL_GetPixel is an undefined reference
Error! E2028: _iceil is an undefined reference
Error! E2028: _MoveTo is an undefined reference
Error! E2028: _LineTo is an undefined reference
Error! E2028: _drawline is an undefined reference

These symbols are all in sdl.o and in common are all inline in sdl.c. Weird, especially that without the CFLAGS entry the build succeeds, though without sound.
« Last Edit: Today at 11:44:40 pm by Dave Yeo »