or how I learned to love Freedoom.
So back in the distant past of 2015, John Romero had released a bunch of assets to DooM, including the source to the maps. And like a fool I never really did anything with them.Â But I decided to do something about that.Â Obviously just compiling a map isn’t anywhere near good enough, you need graphics, music and sound right?
Now what is great is that the Feeedoom folks have had the whole ‘apple pie’ stance to their project, with everything included.Â However they have drifted tools, build processes and other methodologies through the years. But thankfully the full archives are online, so I could go through and piece stuff together to my liking.Â Of course this all needs various tools, and oh boy does it ever need tools.Â You need:
- a C pre-processor
- A Unix’y build environment, I used the ancient MSYS
And probably many more I’m forgetting.
The first was to compile the levels.Â I usedÂ Ron Rossbach’s ancientÂ IDBSP, a C port of iD’s command line Objective C level compiler.Â I did run into two slight issues, the first is that Ron’s tool expects their to be a line in the level’s dwd file telling us the name of the wad it’ll compile to, which of course is missing.Â The other is that I suck a makefiles, and just cheated forcing the tool to use a .wad extension on whatever .dwg it converts.Â And with that out of the way, I had the levels all built.
However that is where I found out the hard way that Freedoom doesn’t target something like my goal of being able to run this wad with the original DooM v1.1 release.Â The first problem is that Freedoom uses a different palette set, where it looks like it should be deeper?Â I’m not sure, but one thing was for sure everything looked like a rainbow sea of wrong and any vanilla or chocolate engines.Â And that is where I got a fun chance to play with ImageMagik.Â It really is quite powerful.
The first problem of course is the palette.Â Buried in the Python build scripts is a Perl fragment for generating a palette, and the all importantÂ playpal.lmp &Â colormap.lmp. I also got to spend a lot of time trying to extract that palette and do something useful with it to no avail.Â But googling led me toÂ VGA_palette_with_black_borders.png, on Wikipedia of all things. So using this as a base I could convert, dither, and re-map the higher color Freedoom artwork into something that would play nice with Vanilla Doom.Â The downsite is that I didn’t try to find out exactly what assets a DooM version 1 wad needs, so I converted them all.Â On a good Xeon or i7 it takes about 10-20 minutes all the images.Â I can’t even think about how slow this would be using a 486, 68040 or MIPS.
ImageMagick-7.0.7-18-Q16/convert ../graphics_freedoom/wia00001.gif -dither Riemersma -remap ..\playpal\VGA_palette_with_black_borders.png wia00001.gif
Imagine running that someÂ 1,558 times.
Vanilla DooM v1.1 only plays audio at 11,000 Hz, 8bit deep.Â All the later ones needless to say use better sampling, and once more again Freedoom was at a higher level.Â I used sox to re-sample all the audio into the lower frequencies.
sox “../sounds_freedoom/dsslop.wav” -b 8 -r 11025 -c 1 “dsslop.wav”
Later engines also are capable of directly playing MIDI files, and taking advantage of OPL3 chips, instead of v1.1’s OPL2 level. Thankfully Natt’s midi3mus is still online, and I was able to use this to convert Freedoom’s MIDI into the more restricted MUS format.
midi3mus ../musics_freedoom/d_map11.mid d_map11.mus
The last tool isÂ deutex, which is not only capable of building iwads, but also decomposing them.Â I ended up having to add the ‘musid’ flag to force it to honor the older sound format.
deutex -v0 -fullsnd -rate accept -rgb 0 255 255 -doom2 bootstrap/ -iwad -musid -textures -lumps -patch -flats -sounds -musics -graphics -sprites -levels -build wadinfo_ult.txt wads/doom.wad
But because I wanted to verify my build against DooM v1.1 I also had to address one other thing, which is the status bar for DooM version 1.1, which I had patched around in my lame source port. I was able to just decompose the shareware 1.0 wad, and extract the following:
And injecting them into the final wad gives me something that the Vanilla DooMÂ v1.1 engine can actually run.
I’ll put up something online later, and a video of me playing, I guess.Â It’s a weird Doom, I mean it is the “normal” DooM, just looks different.
As suggested it’s now called zeeDoom. I’ve uploaded the project, some of the 3rd party programs to build the project, and of course the built wad file.
And as mentioned a play through E1M1 video.
I look forward to seeing how this turns out
I just need a ‘good sounding name’ and I’ll upload it much later today. On Windows it’s just a tad over 300MB worth of stuff to generate the 10MB Wad file.
I know there is some texture alignment issues with some switches, and a bunch of stuff here and there that didn’t dither correctly, and has weird green dots, but for a programmatic conversion it’s pretty cool.
Sure, sounds great! I’ve created a project page, and uploaded the wad, along with the project files.
I’ll have to bootstrap it all over again to make sure it’s all buildable.
Doom2 secret level walkthrough: