How does one run OpenTTD in DOS?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
TheDOSManiac
Engineer
Engineer
Posts: 3
Joined: 28 Oct 2017 08:06
Skype: No.
Location: District 12

How does one run OpenTTD in DOS?

Post by TheDOSManiac »

Hello fellow players (or so I assume) of the game OpenTTD.
I'm new around these parts, so this has probably been asked a billion and one times already, but how does one go about compiling OpenTTD for DOS?
And I mean actual DOS, not an emulator.
I am aware of https://wiki.openttd.org/OpenTTD_DOS and the link to the forum page, but the forum page leads me to the Wiki page and the Wiki page has no useful information on how to compile it. It just says (and I quote):
There is no official port, thus you need to download the source and build it yourself; See the TT-Forums thread for more information.
And the TT-Forums thread (would you believe it!) leads me back to the Wiki with NO information on how to even start compiling it!
Look, I'm not a programmer, coder or anything like that, but I am experienced with IT, so I would like some info on how I could compile this for DOS.

Also, sorry if this is in the wrong place; as said, I am new.
Also also: If there's an answer in this in one of the threads, the Search function needs to be vastly improved.
User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: How does one run OpenTTD in DOS?

Post by Benny »

Did you read the readme?

http://svn.openttd.org/tags/1.7.1/readme.txt
DOS:
A build environment with DJGPP is needed as well as libraries such as
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
website. Compilation is straight forward: use make, but do a './configure'
before the first build. The build binary will need cwsdpmi.exe to be in
the same directory as the openttd executable. cwsdpmi.exe can be found in
the os/dos/cwsdpmi subdirectory. If you compile with stripping turned on a
binary will be generated that does not need cwsdpmi.exe by adding the
cswdstub.exe to the created OpenTTD binary.
Image
TheDOSManiac
Engineer
Engineer
Posts: 3
Joined: 28 Oct 2017 08:06
Skype: No.
Location: District 12

Re: How does one run OpenTTD in DOS?

Post by TheDOSManiac »

Benny wrote:Did you read the readme?

http://svn.openttd.org/tags/1.7.1/readme.txt
DOS:
A build environment with DJGPP is needed as well as libraries such as
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
website. Compilation is straight forward: use make, but do a './configure'
before the first build. The build binary will need cwsdpmi.exe to be in
the same directory as the openttd executable. cwsdpmi.exe can be found in
the os/dos/cwsdpmi subdirectory. If you compile with stripping turned on a
binary will be generated that does not need cwsdpmi.exe by adding the
cswdstub.exe to the created OpenTTD binary.
Erm... No, I didn't see it but I don't know what it means. Can you put it into Layman's terms?

Also, I never read the readme.
User avatar
Benny
Tycoon
Tycoon
Posts: 2185
Joined: 25 Aug 2007 17:03
Location: ~/

Re: How does one run OpenTTD in DOS?

Post by Benny »

I was born after DOS went obsolete so I can't help you. I suggest reading some documentation to get comfortable.

http://www.delorie.com/djgpp/doc/ug/
https://wiki.openttd.org/Category:Compiling_OpenTTD
Image
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: How does one run OpenTTD in DOS?

Post by Alberth »

Woow, djgpp, that's a long time ago!

djgpp is a c++ compiler for dos, it's a g++ port. xlib, libpng etc are libraries, pieces of code that provides supporting functionality. Look them up.

Given that you don't understand all this, I'd suggest you start by getting familiar with the command-line compilation process using modern Linux. It also uses g++, and you will encounter many of the same tools there.
Being a retired OpenTTD developer does not mean I know what I am doing.
Baldy's Boss
Tycoon
Tycoon
Posts: 1396
Joined: 23 Feb 2014 22:02

Re: How does one run OpenTTD in DOS?

Post by Baldy's Boss »

TheDOSManiac wrote:
Also, I never read the readme.
I'm asking you CLI snob to CLI snob...why not?
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: How does one run OpenTTD in DOS?

Post by orudge »

I don't know when the DOS port was last built or tested; it is conceivable that it might be broken. It might work though. :)
User avatar
CharlyHRO
Traffic Manager
Traffic Manager
Posts: 186
Joined: 13 Mar 2006 11:03
Location: ::1

Re: How does one run OpenTTD in DOS?

Post by CharlyHRO »

Would it be helpful for the devs to provide a virtual machine running MS-DOS or is DOSbox sufficient?
moe moe pipebomb
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: How does one run OpenTTD in DOS?

Post by orudge »

A system running DOS of some sort (or Windows 9x), DJGPP and a DOS LFN driver should be sufficient. A 32-bit version of modern Windows, again with DJGPP and an LFN driver, should work too.

In theory you should be able to install a DJGPP cross-compiler on a Linux box (or indeed Windows or OS X) - see https://github.com/andrewwutw/build-djgpp for instance, which also has binaries.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 31 guests