How to run DOS games from GOG.com, a practical guide for noobs

December 29, 2024 by Lucian Mogosanu

GOG.com, also known as "Good Old Games", is a so-called gaming platform that despite its name also sells good new games and conceivably bad new and bad old games as well. But we're not really interested in those, are we?

I'm giving them my attention mostly because some of the good games they sell are indeed some of the best I've played ever since I laid my hands on a PC. Take Heroes of Might and Magic II as a prime example of a game which became the unfortunate victim of its own success: its developers, New World Computing, were purchased by the 3DO Company in 1996, the very same year when HoMM2 was released. Unfortunately 3DO went bankrupt in 2003, so Ubisoft bought the Might and Magic and Heroes of Might and Magic IPs wholesale and they've been profitting off them ever since. So instead of heading over to ye olde abandonware site to download a thirty-year old game, like you did with Volfied for example, you have to pay Gogu and Ubisoft for the privilege to do so. But alas, that's just how the world works, and pay them we shall, and the good part is that (for now at least) Gogu allows you to download game and keep it for yourself.

If you're a Microsoft Windows user, then at this point you might as well close this article, head over to GOG, download your favourite DOS game, install it via the usual way and, well, enjoy! If not, then be advised that well, it's not that GOG doesn't let you play DOS games out of the sheer blackness of their hearts. They just don't have the resources to provide support for other operating systems1, so for the most part their packaging is limited to Windows. Be aware though that in principle2 DOS games are old enough and they require so few resources that they can run even on the most broken among computing platforms. You just need: for one, a method to extract the game files from the Windows installer; and for the other, a DOS emulator to interpret ye olde files and translate them into a form that fits your setup.

For the first requirement, you can employ a tool called innoextract. You can compile it from sources or if that's too nerdy, you can install it, say, on Debian using APT. Or otherwise refer to the package manager of your distribution and its associated database. For example I installed it on a Mac machine using MacPorts:

$ port install innoextract

I don't particularly encourage these kinds of habits in general; but on one hand, we're discussing gaming machines, not Bitcoin wallets -- I sure hope you're not keeping the two on the same machine; nor in the same network, for that matter -- while on the other, y'know what? Computers suck hard, so whatever, run curl someurl | sh, get burned, learn a thing or two from it and adjust your life accordingly, it's not like listening to randos on the internet is any better.

Anyways, once you have innoextract installed on your system, pay mind to the fact that the .exe file downloaded from GOG, say, setup_heroes_of_might_and_magic_2_gold_1.01_(2.1)_(33438).exe, is in fact just an archive. Let's assume for example that your file resides in /home/spyked/Downloads, so that you can open a terminal and do something along the lines of:

$ cd /home/spyked/Downloads
$ mkdir homm2
$ cd homm2
$ innoextract -e ../setup_heroes_of_might_and_magic_2_gold_1.01_(2.1)_(33438).exe

In other words, you are: changing the so-called "working directory" or "current directory"3 of your shell to your download directory; then you are creating a new directory inside it, "homm2"; then you are changing the current directory again to a relative path (notice the missing "/" in the second cd command); then finally, you are running innoextract with the -e flag and the relative (..) path to the executable file. Maybe take some time to grok this, it'll certainly pay off. In any case, you can check your output for errors, but at this point you can also check your homm2 folder for files using your file manager. Here's an example from my machine4:

[~]$ cd Downloads/homm2
[~/Downloads/homm2]$ ls
DATA                      H2CAMP.TXT                Journals                  SOUND                     commonappdata             homm2.gog
DOSBOX                    HELP                      MAPS                      WING.32                   goggame-1207658785.hashdb homm2.ins
EDITOR2.EXE               HEROES2.CFG               MUSIC                     __redist                  goggame-1207658785.ico    manual.pdf
EULA                      HEROES2.EXE               POLCAMP.TXT               __support                 goggame-1207658785.info   netbios.exe
GAMES                     INSTALL.EXE               README.TXT                app                       goggame-1207658785.script tmp

If you've arrived at this point and your output resembles mine, then you're already halfway through this guide. Congrats!

Notice by the way how one of the folders is aptly named "DOSBOX", denoting that your "Heroes of Might and MagicĀ® 2: Gold for Windows" is in fact a DOS app packaged to run within a modern5 Windows environment.

Well, it so happens that this "DOSBox" program fits the exact second requirement as stated above, i.e. it can load Intel 80286 code files and recreate an approximate environment that allows one to run these old games. In fact, the confusing part (for you) is that there isn't a single DOSBox, but multiple varieties, and installing one or the other might be more beneficial for your system. For example, on my Mac I installed something called DOSBox-X via MacPorts:

$ port install dosbox-x

This may take a while, but at the end of it you should be able to simply run:

$ dosbox-x

or maybe if you installed the dosbox package on Debian, simply run:

$ dosbox

and you should get a new window that resembles an old DOS environment. This is fine, but it can't run our game quite yet. You'll see a shell prompt similar to your other shell, but which looks something along the lines of:

Z:\>

In this shell, enter the "exit" command and go back to your e.g. Unix shell.

Now, the remainder of this tutorial is specific to HoMM2, but it might work similarly for other games: as we've seen, GOG are packaging their own DOSBox distribution and furthermore, they have a specific way of calling the executable in order to get the game running. The older folks among us may remember that games from that era used to "ask the user for a CD", so the packaging built by the GOG people is designed to "lie" to the game that this environment contains a HoMM2 CD. This configuration is performed in the .conf files from __support/app:

[~/Downloads/homm2]$ ls __support/app
dosboxhomm2.conf        dosboxhomm2_client.conf dosboxhomm2_server.conf dosboxhomm2_single.conf

We can find some more details in their .info file in the top-level directory:

[~/Downloads/homm2]$ grep dosbox goggame-1207658785.info
            "arguments": "-conf \"..\\dosboxhomm2.conf\" -conf \"..\\dosboxhomm2_single.conf\" -noconsole -c \"exit\"",
            "path": "DOSBOX\\dosbox.exe",

This is just about enough info to run the game. There's only one additional step to be performed (which I reverse engineered from one of the config files):

[~/Downloads/homm2]$ mkdir cloud_saves

which is mounted as a C drive. Now you can do, e.g.:

[~/Downloads/homm2]$ cd app
[~/Downloads/homm2/app]$ dosbox-x -conf ../__support/app/dosboxhomm2.conf -conf ../__support/app/dosboxhomm2_single.conf -noconsole

Et voila, you should have the game running quite smoothly. I don't particularly like running it in fullscreen mode, so I went to dosboxhomm2.conf and I looked for the line that says:

[sdl]
... # lots of useful explanations here
fullscreen=true

and I changed it to "fullscreen=false". I also tweaked the screen resolution and set it to use the OpenGL graphics driver:

windowresolution=1024x768
output=opengl

and there are probably a few other tweaks available, but this rendered an entirely usable session on my machine:

So I guess a more apt title for this tutorial would have been "how to run HoMM2 from GOG.com on a Mac machine". But do let me know if this worked for your DOS game and your particular system!

If anyone from GOG.com reads this: I hope that I won't hear you complaining on how I reverse engineered your stuff to get this working out of spec. I get that you don't currently support what I've done, but I already did about half of the required work for free, so you're welcome. With Apple's M-series kicking the personal computing market pretty hard, I don't see why I would ever force myself through the pain of running Microsoft shit in order to play a game that doesn't even require it, so you're really doing yourself a disservice by not supporting at the very least Macs, but really, Linux machines too, since they were the initial target for the DOSBox that you so shamelessly stole in order to package your stuff. So if you're not willing to do the extra work, at least keep the "DRM-free" spirit running that you boast on your website. Oh, and by the way: my CV, in case you're interested.


  1. For the sake of brevity, this list of "other operating systems" shall be reduced to Linux distributions and MacOS. Sure, you can in principle use the methods here to install your game on an actual DOS machine; although if you're at that point, I suspect you don't really need to read this guide.

    In fact I'm almost certain that none of my usual three or four readers need this article. I'm leaving it here for future reference nevertheless. 

  2. I'm providing a guide, yes, but be aware of the fact that I'm not your go-to GOG support guy, nor do I provide any sort of guarantees that this will work on your setup. You're on your own; but sure, feel free to use the comments box to ask questions, I'll happily help assuming I understand your specific issue. 

  3. This, for the record, is one of the more difficult parts of Unix to explain to noobs. In short, your terminal app launches a so-called shell, commonly known as bash, i.e. the Bourne-Again Shell. This shell has (in fact all POSIX-compatible shells do) a notion of "what directory am I currently in"? This is similar to the current folder in your Explorer app: when you click on a folder, you change the current view of the filesystem to show only a subset of files and folders, because showing everything at once would be overwhelming for both you and the computer, i.e. it would involve more context and computation than you actually need.

    So if you do:

    $ cd /folder
    

    where "/" is the root of your tree-like system and "folder" is a child node, then the "current" folder will as a result become exactly that. You can view it while running:

    $ pwd
    

    and on Unix systems (e.g. Linuxen) you can list the files simply by running:

    $ ls
    

    whereas if you do:

    $ cd folder
    

    the shell will lookup a directory named "folder", relative to your "pathname of the current working directory", that is, the path printed by pwd or the value of the $PWD environment variable. Check out the PWD(1) Unix manpage for details. 

  4. By the way, notice why the command line is so powerful? I didn't need to share screenshots from my particular operating system, I just ran a command that is available on most Unix systems and it just worked. There are of course more advanced ways of checking the integrity of your files, but I'm not going to go into them. 

  5. Windows 15, or which one was that? 

Filed under: computing.
RSS 2.0 feed. Comment. Send trackback.

2 Responses to “How to run DOS games from GOG.com, a practical guide for noobs”

  1. #1:
    Cel Mihanie says:

    There is one final step to the installation of HoMM games which you have not mentioned here, perhaps because it is too obvious. Nevertheless, it is our duty to make sure that even the most clueless of noobs are enlightened as to the proper ritual, such that the Old Ones are placated.

    Once installation of complete, you must:

    1. Gather as much of your local food as you can around the monitor
    2. Take a pic of it all, with HoMM running, of course
    3. Post the pic with the caption "Greetings from $YOUR_COUNTRY_HERE" on the social network(s) du jour

    No-one knows what happens if you fail to do this. I know of no-one who has dared. It cannot be guaranteed that your computer will not explode.

  2. #2:
    spyked says:

    No I agree, you're absolutely right, our good noob folks must necessarily show off their HoMM2, even if they never intend to actually play the game -- especially then.

    Thus I have decided to lead the process of exhibition by example, through the following low-effort exhibit: https://x.com/spykeder/status/1873479090252156969 .

Leave a Reply