OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Games => Topic started by: Paul Smedley on March 13, 2022, 02:11:21 am
-
Hi all,
Again thanks to Martin for the suggestion, I spent a few hours building OpenTTD v12.1 (https://www.openttd.org/)
https://smedley.id.au/tmp/openttd-12.1-os2-20220313.zip - please see the readme.os2 for installation instructions - including where to download the required additional files.
Cheers,
Paul
-
Hi Paul
I'm trying again OpenTTD from scratch on real hardware.
- Got openttd-12.1-os2-20220313.zip
- Installed sdl2, sdl2_mixer, sdl2_ttf & sdl2_image (from RPM)
- Downloaded opengfx, opensfx, openmsx and located the files on ./baseset
-- First I put the unzipped file directly on ./baseset and later I just set the .tar files there.
If I run openttd I get an exception. Here it is the log file.
What else can you see I may be missing, because I got it working on my VM yesterday.
Regards
-
Hey Martin,
That's a very different trap to what we were getting yesterday - appears to stem from SDL. I have no real idea on how to resolve.
Cheers,
Paul
-
The crash is happening in LIBCN.
@Paul: did you explicitely link LIBCN to OpenTTD? My observation is, that it is often needed. I guess, some startup code is needed.
@Martin: Which SDL2 version you are running with?
-
Hey Paul,
I can get it to run, but the small window updates only once per second, so is very difficult to use. Tried changing refresh rate but it doesn't seem to make any difference. After a short while I get a trap in DIVE.DLL (attached).
Regards,
-
Updated to v12.2
Full package - SDL2 based - https://smedley.id.au/tmp/openttd-12.2-os2-20220416.zip
openttd.exe only - SDL1.2 based - https://smedley.id.au/tmp/openttd-12.2-os2-20220418-sdl12.zip
I'm interested to hear if the SDL1.2 build performs better than the SDL2 build.
-
Hi Paul
Both gave me an exceptq trap on my Thinkpad L420. (not a VM)
Regards
-
Hi Martin, I had the same, fixed by downloading and installing the graphics etc from openttd.org as described in the readme.os2
Hi Paul, tried both, both really slow and I lost interest. This is a 3.1Ghz I5 with lots of memory.
-
Hey Dave,
Hi Paul, tried both, both really slow and I lost interest. This is a 3.1Ghz I5 with lots of memory.
Interesting - I remember older versions (I'm talking 5+ years ago) being playable - I wonder what has changed.
Cheers,
Paul
-
Hey Dave,
Hi Paul, tried both, both really slow and I lost interest. This is a 3.1Ghz I5 with lots of memory.
Interesting - I remember older versions (I'm talking 5+ years ago) being playable - I wonder what has changed.
Cheers,
Paul
Maybe expects 3D acceleration?
-
Revisiting, it seems to be the mouse pointer that's the problem. Freshly booted system to a Panorama install (last test was SNAP), CPU usage is about zero, as soon as the mouse pointer hovers over the OpenTTD window, the mouse pointer changes to orange and things become unusable in the OpenTTD window with one core at about 2% cpu.
I guess see if there's an option to disable the mouse pointer grab, it would fix things.
-
Hi Martin, I had the same, fixed by downloading and installing the graphics etc from openttd.org as described in the readme.os2
Thanks Dave, I forgot about the baseset files.
Both run, but pointer is very slow, just like everyone else is reporting. I don't notice any difference between SDL 1 or SDL2.
Regards
-
Hey guys,
Both run, but pointer is very slow, just like everyone else is reporting. I don't notice any difference between SDL 1 or SDL2.
Interesting - I'll have to see if I can disable the code that changes the mouse cursor and see if that improves things.
Cheers,
Paul.
-
I'm trying to run OpenTTD (the SDL v1.2 version can still be downloaded) but here it just ... finish without anything apparent on screen almost right away. No errors seen and nothing else that tell me what's going on.
I've placed the three .tar files in a sub folder \baseset relative to openttd.exe
-
I'm trying to run OpenTTD (the SDL v1.2 version can still be downloaded) but here it just ... finish without anything apparent on screen almost right away. No errors seen and nothing else that tell me what's going on.
I've placed the three .tar files in a sub folder \baseset relative to openttd.exe
Did you check console output?
openttd.exe 2>&1 | tee openttd.log
-
Yes, there no output visible or hidden as i run it on the command line.
with or without redirecting stderr with 2>&1 and/or to a text file.
Ordinary applications woulld complain about missing .dlls and configuration files etc. but this one doesn't even show usage.
So if I add -h it output text on the console... OpenTTD 12.2 ... Seem as if it find the files downloaded and list those, but trying random parameters doesn't start anything. It just finish right away.
The version v1.4 from 2014 start up without parameters and offer to download stuff (before it freeze).
-
Hello Paul
Do you think you can please give it a try to port OpenTTD 14.1 or 15 beta?
https://www.openttd.org/
Regards
-
Probably...... based on older ports - does SDL1 or SDL2 work better?
-
Hello
I would prefer to try SDL2.
Regards
-
one complication - https://github.com/OpenTTD/OpenTTD/pull/11018
In spite of the above, I got an openttd.exe with 14.1. BUT for me, it just gives an empty black window. Nothing obvious from enabling a debug log. Perhaps an SDL2 issue?
Anyhow, don't expect muc, but https://smedley.id.au/tmp/openttd-14.1-os2-20250712.zip
-
Thanks Paul
Here it is running on my 5.1.1. VM. It asked to download some files, no sound for the moment, and I only tested windowed mode.
Let me try it a little but more.
Regards
-
Hello again
The game seems playable from here. I even max it up to HD resolution and I can play with it.
- Full screen support is not working, maybe a limitation of the SDL2 port
[2025-07-12 09:56:32] dbg: [driver:0] SDL_SetWindowFullscreen() failed: SDL_SetP
ixelFormatPalette() passed a palette that doesn't match the format
I'm still trying to work out if I need to download some sounds to have some audio.
Regards
-
It works here too. You need to download sound effects and base music separately (from the 'Check online content' menu). The sound effects work fine here, but I can't get music to play (is it MIDI). Pretty good overall though!
Regards,
EDIT: looks like it need a 'music driver' defined but none of the offered ones worked - and it is MIDI. Wonder if Kai could be used for this...
-
Hello
I can not produce sound here. My ArcaOS 5.1.1 (VBox guest) has Uniaud driver and system sounds works fine.
SDL2 and SDL2_mixer are installed. (from netlabs RPM)
On OpenTTD I went to "Check Online Content" and make sure Installed
- Base Music - OpenMSX
- Base sounds - OpenSFX
- Base Graphics - OpenGFX were installed on the first run and are also listed there as "installed"
Regards
-
Martin,
Yes, I am using UniAud and ArcaOS 5.1.1 in a VBox session too. Did you go into 'Game Options'-> 'Sound' and choose 'OpenFSX' in the 'Base Sounds' drop-down box? Same with 'Base Music' drop-down and 'OpenMSX', but that doesn't seem to work. You can also edit the openttd.cfg file in \Home\OpenTTD by hand. I set my resolution to 1280x960 there to get a larger game screen...
This is the best OpenTTD I've used yet.
Regards,
-
It works here.
No sound but graphics are loaded.
Roderick
-
As I mentioned, all of the OS2 specific code was removed before the release of OpenTTD 14. This has just the vare minimum changes needed to make it compile.
Did music work in older releases?
-
I think music required midi support. I think audio samples did work. I am not certain its so long ago ? :-)
Martin can you confirm if the audio effects worked ?
-
Seems there was OS/2 specific music code previously - https://github.com/OpenTTD/OpenTTD/pull/11018/files#diff-2b985361d061fae37a541d5260f215c55753a6ad06a8cdb8f9c3dae20f55421a
-
Did you go into 'Game Options'-> 'Sound' and choose 'OpenFSX' in the 'Base Sounds' drop-down box? Same with 'Base Music' drop-down and 'OpenMSX',
Thanks David. I was missing that. Now I have sound effects.
About the Music. I installed the "OpenMSX", enabled it on the Game settings, have an ArcaOS that can runs MIDI (Timidity and Timidity MCD) and I got no music. Maybe the issue is what Paul is saying, that some part of the code was removed.
But for me this game port is a keeper !!!
Regards
-
Glad it works for you too. Besides the music, the only other thing I found that doesn't work is on the 'Help and Manuals' dialog, on the 'Websites' column everything there will lock the process - I presume because there needs to be a way to open a browser that is not implemented for OS/2.
I'm using KSoftSeq for MIDI, but maybe SDL doesn't recognize MIDI on OS/2?
Regards,
-
It's probably easy enough to backport the changes to allow the browser to work, same with the music code. Seems the music doesn't use SDL - I didn't look at the old code closely, but seems it calls the OS/2 api directly:
https://github.com/OpenTTD/OpenTTD/blob/release/13/src/music/os2_m.cpp
-
Seems OS/2 never supported the browser.... https://github.com/OpenTTD/OpenTTD/blob/release/13/src/os/os2/os2.cpp#L208
https://smedley.id.au/tmp/openttd-14.1-exe-os2-20250714.zip is a new openttd.exe that should fix music (if the sound hardware supports midi)
-
Hey Paul,
Thanks for this! It seems OK, but I still can't get music to play. I do have a MIDI object for WPS playing and I can play the MIDI files for the game from the WPS. Do I need to specify a 'music driver' in openttd.cfg for OS/2?
Regards,
EDIT: I had the idea to try the SoundBlaster 16 emulation and driver because it had MIDI support natively. The SB16 PNP driver from the 5.1.1 install CD installed OK, but on boot it says the SB16D2.SYS driver was not initialized. Anybody ever get the SoundBlaster driver working with VirtualBox?
-
Hello David,
how do one run it?
what do one need to use it? (yum /y install SDL2)
any need to manually download the 3 game packages from the site?
-
Jan-Erik,
I have SDL2 installed, but version 2.0.18 (which is not the most recent - that one I had trouble with). I think you need SDL2_Mixer as well, but I have all the SDL2 items installed so not sure.
The 3 packages can be downloaded from within OpenTTD. The graphics will be downloaded the first time you run OpenTTD. The 2 sound files have to be selected from the 'Check Online Content' dialog to download them. Then you need to go into 'Game Options -> 'Sound' and choose the sound effects and music to use from their drop-down menus.
Just double-click on openttd.exe to run...
Regards,
-
Hello David,
how do one run it?
what do one need to use it? (yum /y install SDL2)
any need to manually download the 3 game packages from the site?
Hello
You can use RPM/YUM
- yum install SDL2
The graphic resource files will be automatically download at the first run of the program with user confirmation
Go to "Check Online Content" and select to download:
- Base Music OpenMSX
- Base Sounds OpenSFX
Go to "Game Options" and in the "Sound" tab select "Base Sound set = OpenSFX".
Regards
-
Hello Paul
I tried the 2025-07-14 version and works fine. Still not MIDI sound, but it is working good.
Let me know if you like this packaging for it, with the updated readme and icons.
Regards
-
Can anyone confirm that mido sound worked in older versions?
-
No never tested that with MIDI.
Sorry
Roderick
-
Hello Paul
I tried OpenTTD 12.1 and MIDI and sound does not work. I can not run older version of OpenTTD because there are some SDL1 incompatibilities.
My personal opinion is that MIDI never worked.
What you may want to check is that PRBoom+ (Doom Port) can run MIDI but uses the fluidsynth library.
Regards
-
You might be overestimating my interest levels in getting midi working ;)
-
For new user trying it output:
[D:\OpenTTD]openttd
Error: No available language packs (invalid versions?)
the important thing to look for is to check what version you're trying of OpenTTD and download the Windows-32-bit .zip (for OpenTTD 14.1: "openttd-14.1-windows-win32.zip") package that contain all the files needed, unpack them (except openttd.exe) next to openttd.exe by Paul.
-
You might be overestimating my interest levels in getting midi working ;)
For most OS/2 installations (except if you are in a VM). Midi with Tmidity will not work anyway as uniaud only supports one audio channel.
So you can not have wave audio and MIDI active at the same time.
Thank you Paul for getting this work!
Roderick
-
For new user trying it output:
[D:\OpenTTD]openttd
Error: No available language packs (invalid versions?)
the important thing to look for is to check what version you're trying of OpenTTD and download the Windows-32-bit .zip (for OpenTTD 14.1: "openttd-14.1-windows-win32.zip") package that contain all the files needed, unpack them (except openttd.exe) next to openttd.exe by Paul.
Hmmm trying setting the set lang to en_us....
It might fix it :-)
Roderick
-
For new user trying it output:
[D:\OpenTTD]openttd
Error: No available language packs (invalid versions?)
the important thing to look for is to check what version you're trying of OpenTTD and download the Windows-32-bit .zip (for OpenTTD 14.1: "openttd-14.1-windows-win32.zip") package that contain all the files needed, unpack them (except openttd.exe) next to openttd.exe by Paul.
Hmmm trying setting the set lang to en_us....
It might fix it :-)
Roderick
Hahaa, If one just download the huge openttd.exe from here and try it, one get that message. One has to also get the Win32 .zip and unpack the files to the same folder and to actually make it work. Language doesn't matter, the message is misleading that way.
I would like to get a screen captures of how to retrieve audio and music in german, english, french, italian, dutch and swedish to complete the wpi I've put together. The problem here is that screen capture doesn't work with sdl2 window, so someone that run it in a virtual machine can get it?!
-
Earlier in the thread was a full zip, which hopefully includes the executables (ie https://smedley.id.au/tmp/openttd-14.1-os2-20250712.zip)