The download page for ScummVM lists a
“Windows 95+ zipfile”
release. Huh.
I was intrigued, so I booted a Windows 95 virtual machine and
tried to run it. It actually worked.
That is impressive: a graphics-heavy application, written in
modern C++, is running smoothly on an operating system that’s
almost 30 years old. How did they pull it off? Could I build such
an executable as well, preferably from Windows 10?
The answer, of course, is that ScummVM makes use of SDL 1.2
which
still supports Windows 95. So that’s easy: just use it.
Then, go find a compiler that spits out 95-compatible
executables. Such as
MinGW 9.2.0.
With the obstacles out of the way, I decided to write a crappy
little
test program.
Once the compiler and the environment have been set up, building
is just a matter of running something like:
$ g++ -ID:\Static\SDL-1.2.14\include\SDL
-LD:\Static\SDL-1.2.14\lib
.\test95.cc
-lmingw32 -lSDLmain -lSDL
-o demo95.exe
-Wall -pedantic
-static-libgcc -static-libstdc++
Make sure not to forget the last two arguments or Windows 95 will
complain about a missing DLL.
Then, squint your eyes, keep your fingers crossed, and move the
executable into the VM. Click on it. Tada.
I really like this.
As software engineers or hackers, we should try to support legacy
systems to a certain extent.
If you build a game this way, there is a chance that your efforts
will directly make someone out there happier. Your game will be
useable by people who cannot afford new tech. It will be useable
by people who run compatibility layers, such as Wine. Your grandma
can run it on her computer.
Do it.