
Compile like it's 1992 - cremno
http://fabiensanglard.net/Compile_Like_Its_1992/
======
zak_mc_kracken
Have to hand it out to Fabien, he's not just an amazing developer with
baffling skills to understand code and graphical routines, his dedication to
understanding old games of yore is second to none.

Nice job, Fabien!

~~~
fabien_sanglard
Thanks for those kind words.

------
hayksaakian
Its nice that they made it public domain. There are 1000 more games from that
era whose code will simply dissapear despite being simply bits and bytes that
may be perfectly preserved for ever.

~~~
ekianjo
Only the engine is open, though, not the data files. EDIT: And it's not
"public domain" either. Look at the license.doc in the github repository,
there are tons of restrictions as to what you can do with the code.
[https://github.com/id-Software/wolf3d](https://github.com/id-Software/wolf3d)

~~~
orionblastar
It is like when Microsoft released the source code for MS-DOS 2.0 and MS-Word
1.1C not open sourced but some kind of commercial license that limits use and
derivatives.

It kind of reminds me of that old Borland Museum that had the old Turbo
languages for free download.
[http://edn.embarcadero.com/museum](http://edn.embarcadero.com/museum)

Sadly they stopped releasing old versions in 2005. I had hoped there to be a
Delphi 1.0 release. I actually got Delphi 1.0 on a magazine CD-ROM from some
UK magazine I bought, and then forgot where I placed it. I used to program in
Delphi 1.0 and 2.0 I still got my 2.0 book and how to make code Y2K compatible
in it.

I got old Visual BASIC versions as well.

It seems this is the Wolf3D source code without the data files so you have to
use the shareware version of Wolf3D or Spear or buy the commercial versions.

It is written for 16 bit code for DOS, so converting it to 32 bits won't work.
They had to use a lot of tricks for 386 and under machines just to get it to
work in 3D mode. 486+ machines run it better but at a certain level it does
not scale very well.

Basically it was a f __*-it by ID, just release the code for the LULZ, throw
on a commercial license to limit use, and then see what happens to it.

~~~
jordigh
This is so different from the gpl of before. Did id only do the gpl before
because of John Carmack?

~~~
burnte
This was their first source release, before the GPL was widely known, so
that's why they used this specific license.

------
haberman
In a similar vein, here is Lua 5.2 being compiled with Turbo C 1.0 (impressive
that software written in 2013 compiles unmodified on a 1990 compiler!)

[https://www.youtube.com/watch?v=-jvLY5pUwic](https://www.youtube.com/watch?v=-jvLY5pUwic)

~~~
octo_t
Thats what happens when you used a language which has an ISO or similar
standard.

~~~
TillE
Sure, but you also have to stick to the older standards. This wouldn't work if
Lua were using any of the new features of C99.

------
GnarfGnarf
Borland 3.1 also came as a graphical IDE. For a while Borland was ahead of
Microsoft's character-based Programmer's Workbench. Borland had a great IDE.

My company stuck with Borland until 4.5. We parted ways when the compiler
generated code that GPF'ed when calling 'new' in a DLL, or declared some
global variables undefined that had successfully compiled a few modules
earlier. Also, Borland couldn't step through 32-bit code in debug mode. Visual
Studio 6 could.

------
gavinpc
I remember getting the Borland C compiler as a ten or eleven year old and
thinking, twenty megabytes! What in the world could they need twenty megabytes
for? That was like, my entire hard drive.

N.B. you have a typo

    
    
        Z:/> mount c ~/systen/c

~~~
zura
Honestly, I still think that 12MB for a system like Borland C is overkill.

~~~
ghshephard

      00:18 shephard-osx2:bin shephard$ ls -lh /usr/bin/clang
      -rwxr-xr-x  1 root  admin    35M Jul 15 16:27 /usr/bin/clang

~~~
self

        $ ls -lh ~/p9/386/bin/6c
        -rwxr-xr-x  1 fn  staff   326K May  6  2011 /Users/fn/p9/386/bin/6c
        $ 
    

\-- Plan 9's C compiler for the Intel 386 platform. It doesn't use shared
libraries, either.

The linker is 141KB, and assembler (6a) is 123KB.

------
russtrotter
Does anyone else find it sorta ironically odd that one of the masterminds
behind this great stuff is now a .... _gasp_ Facebook ... employee?? my heart
kinda aches.

~~~
ayrx
No. Why would it be ironic? Facebook has a huge amount of engineering talent.

~~~
russtrotter
An Aug 2nd tweet from John Carmack started "Onboarding at Facebook went
well...". My thought was "nobody onboards that guy?!?! he onboards YOU!!" I
just hope talent like John Carmack can still spread their wings in that
environment and do the things that got them to that point.

------
webmaven
Nice trip down memory lane (and a good counter-example to those who claim that
web development today is soooo much more complicated and tedious than desktop
development was back in the day...).

~~~
pjmlp
I am yet to find CSS/HTML/JavaScript tooling as easy as using Turbo Vision,
Object Windows Library or Visual Components Library.

~~~
webmaven
Familiarity?

------
frozenport
Will it build with a modern compiler?

~~~
fabien_sanglard
Nope, the code is mean to run in Real-Mode, a mode where registers are 16 bits
and memory is severely segmented.

No to mention the direct access to the VGA which modern Operating System
forbid.

~~~
simias
Well, that's true but it could still technically "build", I suppose, what you
describe are runtime issues, not build issues. I assume there are other
reasons that prevent building with modern compilers?

I would assume that the first problem would be to find a modern compiler that
could target 16bit DOS in the first place...

~~~
pavlov
Looks like the code has inline x86 assembly in the Borland format, so that
would probably need to be converted for a different C compiler. There are
likely to be other, not so obvious dependencies on compiler-specific features.

------
ramgorur
nostalgic :'-(

