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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #15 on: June 26, 2025, 01:34:18 am »
Reminds me, while looking for the missing files, I found https://wkiri.com/projects/atris/atris-sounds-1.0.1.tar.gz, probably the same as you found.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #16 on: June 26, 2025, 01:38:21 am »
Found a FAQ too, this may be relevant,
Quote
Q: Why am I having so much trouble controlling the pieces?
A: Atris version 1.0.5 introduced the ability to change the keyboard repeat rate. If you find that the pieces move or rotate too quickly for you, consider changing the setting from within the "Special Options" menu. Let us know if you have any other playability problems.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5380
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #17 on: June 27, 2025, 04:58:42 am »
Found a FAQ too, this may be relevant,
Quote
Q: Why am I having so much trouble controlling the pieces?
A: Atris version 1.0.5 introduced the ability to change the keyboard repeat rate. If you find that the pieces move or rotate too quickly for you, consider changing the setting from within the "Special Options" menu. Let us know if you have any other playability problems.

Thanks Dave

I changed on "Special Options" on the Key speed and now it plays perfect for me.

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #18 on: June 27, 2025, 05:28:22 am »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5380
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #19 on: June 28, 2025, 05:25:35 pm »
Hello

I contacted the Alizarin Tetris author, because the page says that latest version is 1.0.7 and the source code there is for version 1.0.6.

She replied:

Quote
Martin,

Thanks for letting me know.  It seems this page wasn't updated correctly, and enough time has passed that I'm having trouble finding the files locally.  I recommend working with version 1.0.6.  The main  change for 1.0.7 (which you can duplicate) was to avoid buffer overruns by changing calls to sprintf() to instead use this macro, added to atris.h:

atris.h:#define SPRINTF(buf, fmt, args...) snprintf(buf, sizeof(buf), fmt, ## args)

I hope this is helpful!

        Kiri

It is not a big change, I guess.
Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #20 on: June 28, 2025, 06:37:04 pm »
Guess if someone is experiencing crashes, it is a big enough change.
Code: [Select]
H:\tmp\GAME-SDL-PUZZLE-Alizarin_Tetris>git diff
diff --git a/atris.h b/atris.h
index 624e611..c48f46c 100644
--- a/atris.h
+++ b/atris.h
@@ -127,6 +127,9 @@ extern Uint16 FastRandom(Uint16 range);
 #define ADJUST_SAME    1
 #define ADJUST_DOWN    2

+/* Avoid a buffer overflow */
+#define SPRINTF(buf, fmt, args...) snprintf(buf, sizeof(buf), fmt, ## args)
+
 #include "atris.pro"

 #endif /* __ATRIS_H */

Updated exe attached.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5380
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #21 on: June 28, 2025, 07:42:52 pm »
Thanks Dave

Seems to be working fine here.

Do you see that "Amoebax" is also compilable? It uses also zlib , libpng, Ogg, Vorbis

https://github.com/OSSGames/GAME-SDL-PUZZLE-Amoebax

Do you use automake for the ones that have "Makefile.am" ?

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #22 on: June 28, 2025, 07:51:26 pm »
Thanks Dave

Seems to be working fine here.

Do you see that "Amoebax" is also compilable? It uses also zlib , libpng, Ogg, Vorbis

https://github.com/OSSGames/GAME-SDL-PUZZLE-Amoebax

I'll try later.

Quote
Do you use automake for the ones that have "Makefile.am" ?

For OS/2, best to rebuild all the auto stuff. Often there is an autogen.sh that takes care of the rebuilding, otherwise autoreconf -sfi usually takes care of running the tools, aclocal, autoconf, automake, libtool, all with the right parameters.
autogen.sh for atris for example of a simple one,
Code: [Select]
#!/bin/sh
#
aclocal
automake --foreign
autoconf

./configure $*

Which actually failed due to missing compile file or such, so I ran autoreconf -sfi to install the scripts and afterwards if needed, ran autogen.sh. Reason for needing to fix was, IIRC, a macro that used #include <SDL.h> while newer SDL such as ours needs #include <SDL/SDL.h>. Source needed adjusting the same way.
Edit: add bottom section.
« Last Edit: June 28, 2025, 08:02:27 pm by Dave Yeo »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #23 on: June 29, 2025, 04:19:01 am »
Do you see that "Amoebax" is also compilable? It uses also zlib , libpng, Ogg, Vorbis

https://github.com/OSSGames/GAME-SDL-PUZZLE-Amoebax

Do you use automake for the ones that have "Makefile.am" ?

Regards

I played with this quite a bit, the build system seems really screwed up and I give up.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #24 on: June 29, 2025, 11:48:15 pm »
Do you see that "Amoebax" is also compilable? It uses also zlib , libpng, Ogg, Vorbis

https://github.com/OSSGames/GAME-SDL-PUZZLE-Amoebax
I played with this quite a bit, the build system seems really screwed up and I give up.
So said fsck it and tried building with the original configure etc. With the correct config.site and configure arguments I got the attached which seems to work on a quick test. Needs further testing, and I installed to /amoebax, I think it will work install to amoebax, untested.
To do, write an INSTALL.OS/2 and clean up the config.site and include it. There's currently no source changes.
« Last Edit: June 29, 2025, 11:50:39 pm by Dave Yeo »

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5380
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #25 on: June 30, 2025, 05:42:22 am »
Hello Dave

Thanks for giving it a try.
In my case I have a problem that can not found the menu.ogg file. (error attached) I tried located the files in different paths and I can not make the .exe find the files. Is there something I'm missing?

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

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #26 on: June 30, 2025, 07:29:53 am »
I got that error before I installed it. You are running amoebax.exe from amoebax\bin?
BTW, I tested installing in a non-root spot and it worked here retested by unzipping to tmp\amoebax, cd to bin and ran amoebax and it worked here.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #27 on: June 30, 2025, 07:42:19 am »
Hmm, tried on a different drive, only worked when unzipped to \amoebax and ran from \amoebax\bin

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5484
  • Karma: +133/-1
    • View Profile
Re: Games with older SDL and FSLIB
« Reply #28 on: June 30, 2025, 08:03:38 am »
Here's a binary that will work if ran from /usr/local/bin if you copy the contents of the previous package's share/ directory to /usr/local/share.
Tomorrow I'll try to figure out how it sets things up for looking for the data and see about changing it

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5380
  • Karma: +45/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Games with older SDL and FSLIB
« Reply #29 on: June 30, 2025, 04:27:05 pm »
Hello Dave.

Thanks, it worked here putting the /share folder in "/usr/local/". It is working fine, windowed and full screen, sounds work and I think that controls and speed are fine.

Just wonder if it can be more easy to the user like having the .exe and the directories on the same folder to ship it in a simple way in the package. I'm attaching the picture of the older build for an idea.

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