Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Dave Yeo

Pages: 1 [2] 3 4 ... 364
16
Article Discussions / Re: Games with older SDL and FSLIB
« 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.

17
Article Discussions / Re: Games with older SDL and FSLIB
« 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.

18
Article Discussions / Re: Games with older SDL and FSLIB
« 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.

20
Article Discussions / Re: Games with older SDL and FSLIB
« 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.

21
Article Discussions / Re: Games with older SDL and FSLIB
« 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.

22
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 25, 2025, 05:44:37 am »
Found the missing files. Built fine, keys seem jerky, perhaps needs sdl.ini.
I committed some changes including the missing .protos/

23
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 25, 2025, 04:45:59 am »
Hello Dave

Please, if you got the time check also Alizarin Tetris.
- https://github.com/OSSGames/GAME-SDL-PUZZLE-Alizarin_Tetris

Regards

Seems to be missing some pieces,
Code: [Select]
config.status: error: cannot find input file: '.protos/Makefile.in'

Edit:
Removing the reference from configure.in results in,
Code: [Select]
Makefile.am:50: error: required directory ./.protos does not exist
make: *** [Makefile:120: Makefile.in] Error 1

24
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 25, 2025, 04:34:10 am »
Thanks a lot Dave.

Let me know if it is fine how I packed Rock Dodger.

I had the sdl DLLs in the source for testing, they should be removed and also do a make clean to shrink the size.
Edit: Otherwise fine

Quote
I hope I uploaded the source code correctly on Github:
- https://github.com/OS2World/GAME-SDL-ACTION-RocksnDiamonds

Regards

Update: Corrected version on the file.

It is rockdodger, not RocksnDiamonds which is a completely different game.

25
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 24, 2025, 05:58:31 pm »
So tried Abes Amazing Adventure, https://github.com/OSSGames/AbesAmazingAdventure.
It uses configure so need to run "sh autogen.sh". Configure failed looking for SDL.h, patched the macro to look for SDL/SDL.h (source will need the same), reran autogen.sh and it dies here,
Code: [Select]
checking for sdl-config... h:/tmp/sdl/bin/sdl-config
checking for SDL - version >= 1.0.1... yes
checking for SDL_JoystickOpen... no
*** This version of SDL doesn't have joystick support.
*** Configuring without joystick support.
checking for Mix_OpenAudio in -lSDL_mixer... no
*** SDL_mixer not found.  Configuring without audio support.

I don't think any SDL1 has joystick support and the SDL_mixer error is,
Code: [Select]
configure:7448: checking for Mix_OpenAudio in -lSDL_mixer
configure:7477: eval gcc -o conftest.exe    conftest.c -lSDL_mixer    -ldl -lm -Lh:/tmp/SDL/lib -Zomf -lsdl12 &5
Error! E2028: _Mix_OpenAudio is an undefined reference

Of course the OW build has Mix_OpenAudio as a symbol, wrong calling convention.


26
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 24, 2025, 07:31:08 am »
Here's sdl-config, I put in h:\tmp\SDL\bin and did "set PATH=h:\tmp\SDL\bin;%PATH%
You need to adjust the prefix to reflect where you installed Valerie's SDL package, rename some of the libs as mentioned, and I had to patch h/SDL/SDL_config_os2.h like so,
Code: [Select]
H:\tmp\SDL\h\SDL>diff -u SDL_config_os2.h.orig SDL_config_os2.h
--- SDL_config_os2.h.orig       2025-06-23 22:24:50.000000000 -0700
+++ SDL_config_os2.h    2025-06-23 22:17:58.000000000 -0700
@@ -34,7 +34,9 @@
 typedef signed int          int32_t;
 typedef unsigned int        uint32_t;
 typedef unsigned int        size_t;
+#if !defined (__EMX__)
 typedef unsigned long       uintptr_t;
+#endif
 typedef signed long long    int64_t;
 typedef unsigned long long  uint64_t;

Perhaps all the typedef's should be wrapped in the #if defined (__EMX__).
With these changes to the SDL package, rockdodger compiles fine with the original makefile. Changes could still be made, EXENAME=rockdodger.exe so make clean cleans it and trying make pkg failed looking for /usr/bin/install, should be /@unixroot/usr/bin/install, like similar changes can be made.
Many a SDL game should compile for you with these.

sdl-config
Code: [Select]
#!/bin/sh

# Edit the prefix below to reflect your environment

prefix=h:/tmp/SDL
exec_prefix=$prefix
exec_prefix_set=no
libdir=$prefix/lib

usage="\
Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
#usage="\
#Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | LC_ALL="C" sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 1.2.15
      ;;
    --cflags)
      echo -I$prefix/h
      ;;
    --libs)
      echo -L$prefix/lib -Zomf -lsdl12
      ;;
#    --static-libs)
##    --libs|--static-libs)
#      echo -L/@unixroot/usr/lib  -lSDL   -lm
#      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

27
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 24, 2025, 06:46:02 am »
Curious if they would work with GCC/LIBC as they're compiled with OpenWatcom. So did a quick hack to test. The original rockdodger failed to compile with an incomplete struct error and a lot of warnings, so I tested the newer one I referenced. It is a quick hack so the only changes I made to rockdodger was,
Code: [Select]
--- Makefile.orig 2025-06-23 21:18:06.000000000 -0700
+++ Makefile 2025-06-23 21:25:26.000000000 -0700
@@ -41,13 +41,13 @@
 NEWD=$(PACKAGENAME)-$(VERSION)
 COMPILEDATE=$(shell date --date=@$${SOURCE_DATE_EPOCH:-$$(date +%s)} '+%Y-%m-%d')
 TARPKGNAME=$(NEWD).pkg.tgz
-OPTIONS=-DVERSION=\"$(VERSION)\" -DCOMPILEDATE=\"$(COMPILEDATE)\" -Wall `$(SDL_CONFIG) --cflags`
-EXENAME=rockdodger
+OPTIONS=-DVERSION=\"$(VERSION)\" -DCOMPILEDATE=\"$(COMPILEDATE)\" -Wall -I../SDL/h
+EXENAME=rockdodger.exe
 
 SOUNDLIBRARIES=-lSDL_mixer
 SDL_CONFIG=sdl-config
 
-LIBRARIES=`$(SDL_CONFIG) --libs` -lSDL_image $(SOUNDLIBRARIES) -lm
+LIBRARIES=-L../SDL/lib -lSDL_image -lsdl12 $(SOUNDLIBRARIES) -lm
 OBJECTS=SFont.o guru_meditation.o signal_handling.o random_gen.o datafun.o sound.o input_functions.o scroller.o display_subsystem.o \
  game_state.o highscore_io.o sprite.o \
  blubats.o greeblies.o powerup.o rocks.o spacedots.o ship.o engine_exhaust.o laser.o \
@@ -78,7 +78,7 @@
 ifeq ($(profile),1)
  $(CC) -pg -o $(EXENAME) $(OBJECTS) $(LIBRARIES)
 else
- $(CC) $(LDFLAGS) -o $(EXENAME) $(OBJECTS) $(LIBRARIES)
+ $(CC) $(LDFLAGS) -Zomf -o $(EXENAME) $(OBJECTS) $(LIBRARIES)
 endif
 
 clean:

More work should be done on it, including install, uninstall and pkg.
Actually some of my changes can be reverted if Andrey's SDL package is adapted for GCC. Need sdl-config and renaming the lib names. eg sdlimage.lib --> SDL_image.lib. sdl-config would take care of setting -I and -L so the includes and libs can be found.
Anyways, here's the result, only tested to see if it runs and it needed sdl.ini, included in the package. Please test.

28
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 24, 2025, 03:21:04 am »
Found a newer rockdodger, its build dies due to no SDL-image. Readme also says SDL_mixer is a requirement.
https://bitbucket.org/rpkrawczyk/rockdodger/src/master/

29
Article Discussions / Re: Games with older SDL and FSLIB
« on: June 24, 2025, 02:55:39 am »
In theory, recompiling should be easy. In practice, I randomly chose rockdodger. The compile died at,
Code: [Select]
H:\tmp\rockdodger>make
cc -c -g sound.c `sdl-config --cflags` -DVERSION=\"0.6\" -DCOMPILEDATE=\"28/7/02
\"
sound.c:5:10: fatal error: SDL/SDL_mixer.h: No such file or directory
    5 | #include <SDL/SDL_mixer.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make.exe: *** [Makefile:35: sound.o] Error 1

We don't have an RPM SDL_mixer and rockdodger uses mods for music.
I can build SDL_mixer, possible dependencies include, timidity for midi support, mikmod for mod support, smpeg or libmad-gpl for MP3 support, as well as flac and ogg which we have RPM's. Actually we also have libmikmod.
Seems there are SDL_mixer ports already floating around as well the other dependencies which can lead to DLL hell.
I also saw a SDL2 port, the repository was gone.

30
Virtualization / Re: Win-OS/2 - Open vbesvga.drv video driver
« on: June 22, 2025, 12:35:33 am »
One thing I discovered was that the X VESA driver failed on a UEFI install, to quote myself.
Code: [Select]
So out of curiosity, I tried opening a VESA xsession on a UEFI install. It failed, this seems to be the problem,
...
(EE) VESA(0): V_BIOS address 0x98000 out of range
...
On a BIOS install, it succeeds with,
...
(II) VESA(0): Primary V_BIOS segment is: 0xc000

Developer answered,

Code: [Select]
   BIOS at C000 can only be emulated in VDM. XFree86 definitely uses a
mini-VDM that lacks any functionality. "VGA BIOS" at 9xxx is an emulation
for system boot time and for panorama/gengradd.

So possibly the fact that the VGA BIOS is at a non-standard location on a UEFI install.

I also discovered that the changes that were made to SNAP broke the X VESA driver subtly, namely system hung when returning to the PM from X.
Another interesting discovery when reviewing the X source code was that X actually uses the SNAP code for its mini-VDM.

Pages: 1 [2] 3 4 ... 364