OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Games => Topic started by: Martin Iturbide on February 24, 2019, 03:46:29 am

Title: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on February 24, 2019, 03:46:29 am
Hi

These are the SDL games I checked to have some issues:
- 2 Pong (http://hobbes.nmsu.edu/h-search.php?key=2pong)       0.6      SDL / SDD   GNU GPL      *** Require SDD
- Amoebax (http://hobbes.nmsu.edu/h-search.php?key=Amoebax)   0.2.1   SDL              GNU GPL      *** Old SDL12.DLL
- Barrage (http://hobbes.nmsu.edu/h-search.php?key=Barrage)            SDL / SDD   GNU GPL      *** SDD dependency
- Dave Gnukem (http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=Dave+Gnukem)   0.56      SDL / SDD   GNU GPL             *** Requires SDD
- Fish Fillet (http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=Fish+Fillet)   1.0.1      SDL              GNU GPL      *** No run
- Lopan (http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=lopan)      0.9      SDL / SSD           GNU GPL      *** Require SDD
- Marryampic2 (http://hobbes.nmsu.edu/h-search.php?key=Marryampic2)   0.6      SDL / SDD   GNU GPL      *** Requires SDD
- Primate Plunge (http://hobbes.nmsu.edu/h-search.php?key=Primate Plunge)      SDL              Freeware           *** OLD SDL12.DLL / Hangs
- QNetWalk (http://hobbes.nmsu.edu/h-search.php?key=QNetWalk)   1.4      SDL /KSDL12.DLL GNU GPL   *** OLD SDL12.DLL
- Rocks n Diamonds (http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/games/puzzle&file=rocksndiamonds-3.2.4.zip)   3.2.4 SDL              GNU GPL      *** Can not load Joystick

If someone wants to test these with the latest SDL and make those works without the SNAP driver, please let me know.
For the moment these ones looks like good candidates to be recompiled with the latest SDL.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on February 24, 2019, 06:14:27 am
Hi Martin,
I probably have the environment to rebuild these and am willing given the spare time.
Questions,
What do you mean by the latest SDL? The RPM version is missing some of its supporting DLLs. Need at least sdlgfx.dll, sdlimg.dll sdlmix.dll, sdlnet.dll and sdlttf.dll (names might vary, eg sdl_gfx.dll). I'm also unsure if the RPM version was built with OpenWatcom or GCC, or if it matters. I guess the source is available to look at :)
There is also SDL2 along with corresponding versions of the above DLLs. As SDL is depreciated, perhaps if simple, we should be using SDL2?
There's also the problem of missing source code. I looked at the source of Lopan IIRC, it needed more then simply recompiling, including decisions which way to port, the Windows way or the Linux way. Where to keep configuration files, high scores and such.
Others such as Rocks'n'Diamonds should just need a small makefile patch (it was the first thing I ever ported, X11 version), but might as well as update to the latest source. Rocks'n'Diamonds is a good example of a game that really needs the joystick to play.
Now there's the question of whether to link against libc+libcx or lbcn.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on February 24, 2019, 06:25:01 am
More complications. I looked at https://www.artsoft.org/rocksndiamonds/ (https://www.artsoft.org/rocksndiamonds/) and wonder how much of the new stuff can be simply supported? eg Drag'n'Drop. Might be stuck on older versions.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on February 24, 2019, 02:02:21 pm
First of all, thanks for the help Dave.

What do you mean by the latest SDL?
I mean using SDL-1.2.15-20160303.zip (http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/dev&file=SDL-1.2.15-20160303.zip)  and/or SDL2-2.0.4-20160225.zip (http://hobbes.nmsu.edu/h-viewer.php?dir=/pub/os2/dev&file=SDL-1.2.15-20160303.zip), without mixing older/other version of the SDL runtimes to run an specific game. I want to aim to have one version (latest ones not older) of SDL libraries installed on the system.

At the moment I'm ignoring the SDL runtimes files on the rpm repository.

There is also SDL2 along with corresponding versions of the above DLLs. As SDL is depreciated, perhaps if simple, we should be using SDL2?
If that can be possible without big efforts on changing the game source, it would be great !!

Now there's the question of whether to link against libc+libcx or lbcn.
I would go with the rule, which is the latest one first (as version release), and later which one works.
It looks to me that Bitwise is going to put more efforts on "LIBCn" from now on, I would vote for LIBCn. Am I understanding this announcement right (https://www.os2world.com/past-news/80-software/22424-libc-next-klibc-fork-released.html)? . Are the libcn runtimes available on the rpm server? In case that LIBCn is not working to run the game, then we use the older one :)

Dave, if you succeed compiling some of those games, please let me know if you can put the source code somewhere (like github). I'm even having a hard time finding the original source code of some of these open source games. I'm trying to put that source code here (https://github.com/ossgames/) (it is not OS/2 source code it is the original one)

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on February 25, 2019, 01:26:06 am
Here's 2Pong. I pushed the changes to Github. Mostly I fixed warnings and added some OS/2 specific LDFLAGS (-Zomf and -Zbin-files). The LDFLAGS would need commenting out on other platforms
Lightly tested.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 01, 2019, 02:58:18 pm
Sorry, I slipped the topic since I want to focus on my testing of ArcaOS - OS/2 native games (or natively compiled games for the platform).

Thanks Dave, I will be testing 2Pong.
I'm also trying to fins some source code of the other SDL games that are not running or have a SDD dependency.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 01, 2019, 10:37:06 pm
Hi

Was someone able to run this game:
- Fish Fillet (http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=Fish+Fillet)   1.0.1      SDL              GNU GPL      *** No run

It does not run for me. I had run it with "fillets >stderr.txt 2>Whatever.txt"
and I get this error:
Quote
main.cpp:117: ERROR init file not found; path='/fillets/share/games/fillets-ng/script/init.lua'; systemdir='/fillets/share/games/fillets-ng'; userdir='C:\Home/.fillets-ng'; hint='try command line option "systemdir=path/to/data"'

I tried copying the share directory of this game on several locations but I still can not make it run.

Any tips?

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: ivan on March 02, 2019, 12:30:22 am
Hi Martin,

Have you looked at the OS/2 games produced by Daniel F Valot http://dvalot.free.fr/OS2programs.html (http://dvalot.free.fr/OS2programs.html)  He has some nice disk programs there as well.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 03, 2019, 02:59:52 am
Hi Ivan

Yes, I have those games on my map but it is good that you remind me, because I have to check if there are newer versions that I missed for the OS2World Gaming Site (https://www.os2world.com/games/).

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 04, 2019, 06:07:35 pm
Hi

By the way, I'm taking some time to update the OS2World Gaming Site, because since the 2012 HDD crash some files where missing.
The action and adventure categories had been updated: https://www.os2world.com/games/index.php/native-games (https://www.os2world.com/games/index.php/native-games)

I'm missing some files from:
- BLP (https://www.os2world.com/games/index.php/native-games/action-2/29-blp)
- DimKum (https://www.os2world.com/games/index.php/native-games/adventure/100-dinkum)
- Empire (https://www.os2world.com/games/index.php/native-games/adventure/96-empire)

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 06, 2019, 05:19:15 pm
Ouch... too much work.

Action, Adventure, Board, Cards/Dice, Educational, Other categories had been updated, specially the download links. I'm also reorganizing and renaming the files without any respect to the 8.3. It is just a way I prefer, since I have a mess with different versions.

https://www.os2world.com/games/index.php/native-games (https://www.os2world.com/games/index.php/native-games)

If someone wants to help with the OS2World gaming site please let me know.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 06, 2019, 09:22:15 pm
Hi

This is the list of SDL games that presented some problems on the machine.

- Abe's Amazing Adventure   1.0 (https://github.com/ossgames/GAME-SDL-ADVENTURE-Abe-s_Amazing_Adventure)   SDL / SDD   GNU GPL         *** SDD Dependency   
- Alien Blaster (https://github.com/ossgames/GAME-SDL-ACTION-Alien_Blaster)      1.1.0         SDL / SDD   GNU GPL      Old SDL.DLL
- Amoebax (https://github.com/ossgames/GAME-SDL-PUZZLE-Amoebax)      0.2.1         SDL      GNU GPL      Old SDL12.DLL
- Cuyo         2.1.0         SDL      GNU GPL      *** SDD Dependancy?
- Dave Gnukem      0.56         SDL / SDD   GNU GPL     *** SDD Dependancy
- Enigma      0.92         SDD?      GNU GPL      *** SDD Dependancy
- Fish Fillet               SDL      GNU GPL      *** SDD Dependancy?
- Formido      1.0         SDL      GNU GPL      *** SDD Dependency
- UHexen      0.601         SDL      GNU GPL      *** SDD Dependency
- Jump n' Bump               SDL      GNU GPL      *** CANT RUN      
- Kobo Deluxe         SDL / SDD   GNU GPL      *** SDD Dependency
- Kuklomenos   0.4.5   VORBISFI.DLL / SDL GNU GPL    *** Missing lib   
- Lopan         0.9         SDL / SDD   GNU GPL      *** SDD dependecy
- Luola         1.2.6         SDL / SSDD   GNU GPL      *** SDD dependecy
- Marryampic2      0.6         SDL / SDD   GNU GPL      *** SDD Dependancy
- OpenJazz Jazz Jackrabbit          SDL / GCC   GNU GPL      *** Can't run
- Primate Plunge            SDL      Freeware   OLD SDL12.DLL
- QNetWalk      1.4         SDL / KSDL   GNU GPL      OLD SDL12.DLL
- Rock Doger      0.6         SDL      GNU GPL      *** SDD Dependecy
- Rocks n Diamonds   3.2.4         SDL      GNU GPL      *** CANT RUN
- SDL Invaders               SDL      GNU GPL      *** SDD Dependency
- SDL Roids               SDL      GNU GPL      *** SDD Dependency
- SDL Zombies               SDL      GNU GPL      *** SDD Dependency
- Snake Me               SDL      Source Code   *** SDD Dependecy
- Tasteroids      0.6.1      Qt4 / SDL   GNU GPL    *** Can not run
- Tiles World               SDL / SDDOpen Source   *** SDD Dependecy
- Tuxfootball      0.3.1         SDL      GNU GPL      *** Can not run
- Water                  SDL      GNU GPL    *** Do not run
- XRick                  SDL /SDD   Freeware   *** SDD Dependency
-  YAPE                  SDL       GNU GPL      *** Do not run
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 09, 2019, 01:06:25 am
I can not find the freecnc_v03_os2.zip file :(

Update: Found it.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 10, 2019, 04:13:04 pm
Hi

I updated  the links of the native games of the OS2World gaming site. (https://www.os2world.com/games/index.php/native-games) It is not perfect, but I can say not it is decent.

I will be also update the site with some Qt games I'm missing in this month.
You can check the files in case you notice I'm missing a game right here:
- https://www.os2world.com/games/downloads/ (https://www.os2world.com/games/downloads/)

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 10, 2019, 05:29:50 pm
Hi Dave

I have an issue with Barrage on hobbes:
barrage-1.0.4.zip / Zip File, 929.6 KB / 2019/02/25

I can not run it. I got an error that "loading k:\tmp\barrage... Couldn't open k:\tmp.."

Can you please check if any chance the path is hardcoded in any way?

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on March 10, 2019, 06:26:59 pm
It is, sorry. I'll rebuild it later with a relative path.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 15, 2019, 03:03:34 am
Hi

I'm trying to run Drilling Billy on OS/2, the native version (os2billy.exe), under an OS/2 full screen session, and I'm getting this error.
Quote
Vesa ikke initialiseret.fatalfejl
engine.exit without initCEngine::exit() completed succesfully.

Here is the source:
http://drillingbilly.com/1997/uk/os2info.htm

Any tip or idea is welcome.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on March 15, 2019, 04:11:15 am
Try doing SET VESADLL=VESA_IBM or SET VESADLL=VESA_ALL in your full screen session before running os2billy. Can also try vesatest.exe
Still doesn't quite work here. Vesa.txt includes instructions to patch your video bios if you're really adventurous.
PS Running "markexe NOTWINDOWCOMPAT os2billy.exe" will force it to open a full screen session.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 17, 2019, 04:17:09 pm
Hi

Just in case I created the "ONE HUGE FILE OF WARP GAMES (https://archive.org/details/OHFOWG)", where I put all the OS/2 native games (open source, shareware, freeware) I was able to get and organize them alphabetically. It is a 1.33GB size file, it may not make sense, but nothing makes sense these days :) 

Not everything is working, and it may not be complete, some icons are missing, maybe there are thing that you will not like, but feedback is welcome to improving it.

Check:
https://archive.org/details/OHFOWG (https://archive.org/details/OHFOWG)

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 22, 2019, 05:39:52 pm
Hi

I think it is finally time to upload the OS/2 games source code to github. I don't known why I saved that for last.
- OS/2 native games and source code ported to OS/2 are being to be uploaded to: OS2World Github (https://github.com/OS2World)
- OSS Games that I was able to find the source code, but not the OS/2 changes to: OSSGames Github (https://github.com/OSSGames)

The idea of OSSGames Github (https://github.com/OSSGames) is just to try not to lost the source code of some games that had been ported to OS/2. The porter never share the OS/2 part of it, and I also want to see if I can organize myself to try to port a game myself.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: ivan on March 23, 2019, 11:43:44 am
Hi Martin,

You need to check that zip because here all I get is an error message, see attachment.  Also last night the torrent didn't work.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on March 23, 2019, 01:30:41 pm
Hi Ivan.

Thanks for giving it a try. I did a test on a different machine (windows) and tried the torrent  from Internet archive (with Bittorrent tool),  downloaded the file, open it with PeaZip (it took some time) and I was able to see the files and even open the readme to test. This quick test worked for me. But I will need to keep polishing the file, I found some games I was missing.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on April 21, 2019, 06:14:15 pm
Hi

I found this pascal source code, I'm not sure if it is complete, or if it belong or not to a game called MasterMind for OS/2.
Can someome please take a look at it?

Regards

Title: Re: OS/2 - ArcaOS - Native Games
Post by: xynixme on April 21, 2019, 06:53:51 pm
Alright, but only because I'm some ome.

The Sibyl-files are somehow related to a Mastermind for OS/2, but the *.SPR files seems to be nothing but a project/"container" file or makefile. A project file of an IDE.

Dependency36's file seems to be missing. So does any meaningful PASCAL code in the *.PAS files.

I don't have Sibyl, so I don't know if it will understand U_about.pas' "{Private Deklarationen hier einfügen}" (German, "Private declarations here insert", i.e. insert private declarations here). Regardless of that, at least of of the missing and possibly most important source code file may be MAIN1.PAS.

You may have received a copy of a project directory, but not of a directory of e.g. MAIN1.PAS.
Like receiving a back-up of Sibyl's C:\Projects (C:\Projects\SibylProjects\HelloWorld.SPR), but not of the file C:\HelloWorld.PAS of that Sibyl project.

If you are lucky, then your source has got a back-up of all missing non-Sibyl source files, like MAIN1.PAS.

There is a German Mastermind/2. If this is supposed to be that Mastermind/2, then you may also be missing e.g. the IPF source file of the *.HLP files (possibly 2, German and English).

Either way you can open and "study" the *.SPR text file, to see what's mnissing for sure. I assume it's a Win-OS/2 INI-style Sibyl IDE project file.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: xynixme on April 21, 2019, 07:00:34 pm
It is not perfect, but I can say not it is decent.
O, it's better than you suggest it is. All of mine are missing...
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on April 21, 2019, 07:45:59 pm
Thanks for the reply André.

So, it is incomplete and useless, right?

Just in case, I'm almost sure that is it not from the MasterMind/2 (Rene Auberger) (https://www.os2world.com/games/index.php/native-games/strategy/319-mastermind-2), on his archived website (http://web.archive.org/web/20090728202927/http://geocities.com/r.auberger/), he used to share the source code but it was C. I'm still trying to get those files.  (mmind14-source.zip, ../r.auberger/v14/main-c.zip)

I also found "Master Mind for the OS/2 2.x Presentation Manager" by Peter Wansch, but I'm not sure is also from that.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: xynixme on April 21, 2019, 08:22:42 pm
So, it is incomplete and useless, right?

I also found "Master Mind for the OS/2 2.x Presentation Manager" by Peter Wansch, but I'm not sure is also from that.
Strictly it's useless because it's incomplete. Nevertheless the SPR file shows which files are missing, so it's only useless if we cannot obtain those specific missing files anymore.

Later stand-alone games of Wansch became a component of the Entertainment Pack for OS/2.

"ProjectName=E:\PROGRAMIEREN\PROJEKTE\MasterMind\Mastermind.spr" indicates that the author speaks German. The previous quite could have been inserted by any German programmer (e.g. some template of Sibyl itself), but the user has created the subdirectories "PROGRAMMING" and "PROJECTS".

As such Wansch qulaifies as a canddate. There's a Vienna and Austria in his MASTER.EXE (indeed Master Mind, with a space).

If you have an EXE produced with Sibyl, then you could try to open that Sibyl EXE and Wansch's MASTER.EXE with E.EXE or a hex editor to check if the "fingerprint" is about the same. Typically readable text, and where it can be found. MASTER.EXE doesn't contain "sibyl", but e.g. a lxlited pathetic game written by me contains the text "SETUPARG.ASM". That text me be specific for IBM VAC. An extreme positive sample is opening the EXE of Tablica/2 version 1.20 with E.EXE, and next guess the programming language and what the source code was. If I open a FIREFOX.EXE with a hex editor, then page 1 shows a clue ("OS/2 executable
module built for kLIBC v0.6.4+") which indicates that FIREFOX.EXE wasn't produced by a Sibyl compiler.

Please note that a non-negative possible Sibyl footprint of MASTER.EXE doesn't imply that Wansch is the German speaking author of your project files. It just is more likely if Wansch used Sibyl (too). But his final product (now) has that possibly different name, "Master Mind".
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on May 06, 2019, 11:54:49 pm
Hi

I'm still working to upload all the native games source code at Github. I'm on the letter "s", so I hope to finish soon. 

Hopefully after that I will work on some "compiling my first SDL game" article.... if I can pull that off.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on July 03, 2021, 02:35:28 am
Hi

Please, can it be possible for someone to recompile XRick without the SDDHELP$ dependecy? (it requires SDL).
Here it is the source code: http://www.bigorno.net/xrick/download.html (http://www.bigorno.net/xrick/download.html)

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 03, 2021, 07:23:55 am
It builds easy but crashes I believe while initializing the video.
To build, make sure MAKESHELL=sh.exe is in your environment.
Edit the parent makefile in the root directory by adding
Code: [Select]
-Zomf -lcx -Zmap -Zbin-files
to the echo LDFLAGS line at 76, then do make
Should build and leave a xrick.exe in the root directory. Look at the trp report. Make sure the sdl dbg packages are installed as well as the devel ones.
xrick --help does work.
You can edit include/config.h to turn on debugging, change the line #undef DEBUG to #define DEBUG and it will print some stuff.
Do a make clean before rebuilding.
Here's my binary with debugging on and sound disabled.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on July 03, 2021, 07:10:07 pm
Hi

Thanks Dave for giving it a try.  Here it is the TRP file I'm getting.

Are you using Netlabs RPM SDL to compile it (SDL_develop) or are you using the Digi's SDL  (http://os2.snc.ru/product-SDL.html)to compile it?

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 03, 2021, 07:40:17 pm
Yes, it is the same trp. I used the Netlabs RPM to compile, I'll try Digi's later.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 04, 2021, 06:16:26 am
Digi's SDL trps the same.
What I think the bug is, is that it queries the list of possible full screen video modes, which here just returns one, 1680x1050 in my case, and then tries to go through the list of video modes to make sure they will work. At this point it crashes when trying to load the 2nd member of an array of one.
I'm not really a programmer and can't see the simple fix, I'll think on it some more.
The broken code is,
Code: [Select]
  else {
    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says, use these modes:\n"););
    for (i = 0; modes[i]; i++) {
      IFDEBUG_VIDEO(sys_printf("  %dx%d\n", modes[i]->w, modes[i]->h););
according to the trp report. the crash happens here (perhaps actually the 2 lines above?)
Code: [Select]
      if (modes[i]->w <= modes[mode]->w && modes[i]->w >= SYSVID_WIDTH &&
          modes[i]->h * SYSVID_WIDTH >= modes[i]->w * SYSVID_HEIGHT) {
        mode = i;
        fszoom = modes[mode]->w / SYSVID_WIDTH;
      }

Edit, pointed to crashing line.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Jochen Schäfer on July 04, 2021, 10:52:34 am
Hi.

While porting PrBoom+, I fixed some initialization bugs. The fixes are pushed into the BWW repo.
Perhaps, if you compile the repo version, it fixes things.

Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on July 28, 2021, 03:43:32 am
Hi
- Kuklomenos   0.4.5   VORBISFI.DLL / SDL GNU GPL    *** Missing lib   

Does anybody knows where can I get "VORBISFI.DLL" ? It seems that the latest libvorbis on the Netlabs RPM does not has that file.

Update: I found it on libvorbis-1.2.0.zip. But I'm getting this trap on running it.

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Mentore on July 28, 2021, 09:05:13 am
Digi's SDL trps the same.
What I think the bug is, is that it queries the list of possible full screen video modes, which here just returns one, 1680x1050 in my case, and then tries to go through the list of video modes to make sure they will work. At this point it crashes when trying to load the 2nd member of an array of one.
I'm not really a programmer and can't see the simple fix, I'll think on it some more.
The broken code is,
Code: [Select]
  else {
    IFDEBUG_VIDEO(sys_printf("xrick/video: SDL says, use these modes:\n"););
    for (i = 0; modes[i]; i++) {
      IFDEBUG_VIDEO(sys_printf("  %dx%d\n", modes[i]->w, modes[i]->h););

I actually don't like the for cycle written above: (reported below)

Code: [Select]
    for (i = 0; modes[i]; i++) {

It implies that the cycle should stop after cycling through all the items in the "modes" array but I feel this should be written better asking for the actual length of the array. Don't know if this is C-99 or some more modern incarnation (this code uses lambda expressions so I assume is pretty modern, and I'm no expert in this) but this writing leaves me perplexed.

Mentore
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Jochen Schäfer on July 28, 2021, 11:50:09 am
Problem is, that you don't know the size of array in C/C++. That is why APIs almost always give you an list size or a 0 terminated list.
The latter is what this "for" is assuming. But we have a field "num_display_modes" in the display structure, that could be used.
But in BWWs version, I fixed an init error in the display structures, which should be applied to Digis version, if not already done.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 28, 2021, 05:39:01 pm
But in BWWs version, I fixed an init error in the display structures, which should be applied to Digis version, if not already done.

I didn't find your fix.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Lars on July 28, 2021, 06:11:09 pm
But in BWWs version, I fixed an init error in the display structures, which should be applied to Digis version, if not already done.

I didn't find your fix.

https://github.com/bitwiseworks/SDL2-os2/commit/f5057a506716d15c405a545403b316e807d7069e
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Martin Iturbide on July 28, 2021, 10:55:08 pm
Hi

I have a noob question about SDL development. For games that had been developed with SDL 1x, is it possible to recompile those with SDL 2.x? or all the game code (like functions calls, etc) will need to be changed to use the SDL 2.x instead?

Regards
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 29, 2021, 01:50:31 am
But in BWWs version, I fixed an init error in the display structures, which should be applied to Digis version, if not already done.

I didn't find your fix.

https://github.com/bitwiseworks/SDL2-os2/commit/f5057a506716d15c405a545403b316e807d7069e

Thanks, guess I'll try to build it.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 29, 2021, 01:56:57 am
Hi

I have a noob question about SDL development. For games that had been developed with SDL 1x, is it possible to recompile those with SDL 2.x? or all the game code (like functions calls, etc) will need to be changed to use the SDL 2.x instead?

Quickly looking, it seems the video handling has changed, things like no more full screen, rather a large window, perhaps with no menu etc. And the keyboard input also has changed, might mostly affect Unicode, along with changes in the event queue. Seems a lot of games are focused on the hardware rendering.
This is the page I read, https://www.doomworld.com/forum/topic/86368-sdl-1x-vs-sdl-2/ (https://www.doomworld.com/forum/topic/86368-sdl-1x-vs-sdl-2/)
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Dave Yeo on July 29, 2021, 02:01:25 am
Has anyone looked at how hard it would be to add USB Joystick support to SDL? I know next to nothing about it except a little experience with old style joysticks.
Seems basic support would be 2 axis and 2 button support, for many games even joypad support where a couple of buttons and the axis is basically binary or trinary, would be nice.
I ask because I recently revisited Rocks'N'Diamonds (our SDL mixer needs mod support), which reminded me how much more fun it was to play with a joypad rather then the keyboard.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Paul Smedley on July 29, 2021, 04:59:46 am
Hi Dave,
Has anyone looked at how hard it would be to add USB Joystick support to SDL? I know next to nothing about it except a little experience with old style joysticks.
Seems basic support would be 2 axis and 2 button support, for many games even joypad support where a couple of buttons and the axis is basically binary or trinary, would be nice.
I ask because I recently revisited Rocks'N'Diamonds (our SDL mixer needs mod support), which reminded me how much more fun it was to play with a joypad rather then the keyboard.

I haven't looked into it at all, but I'd assume any support would use libusb (which we have) so surely it wouldn't be that difficult.

Cheers,

Paul.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Jochen Schäfer on July 29, 2021, 08:48:43 am
Has anyone looked at how hard it would be to add USB Joystick support to SDL? I know next to nothing about it except a little experience with old style joysticks.
Seems basic support would be 2 axis and 2 button support, for many games even joypad support where a couple of buttons and the axis is basically binary or trinary, would be nice.
I ask because I recently revisited Rocks'N'Diamonds (our SDL mixer needs mod support), which reminded me how much more fun it was to play with a joypad rather then the keyboard.
I have thought about it, and it is on my bucket list. The linux drivers use the hidapi library (it is even part of SDL2). I was thinking about using that code for OS/2.
Title: Re: OS/2 - ArcaOS - Native Games
Post by: Jochen Schäfer on July 29, 2021, 08:55:32 am
Hi

I have a noob question about SDL development. For games that had been developed with SDL 1x, is it possible to recompile those with SDL 2.x? or all the game code (like functions calls, etc) will need to be changed to use the SDL 2.x instead?

Regards
Their migration guide is here: https://wiki.libsdl.org/MigrationGuide.
The compability layer is here: https://github.com/libsdl-org/sdl12-compat