~phlash/wadexe

Self-executable WAD file containing the DOOM.EXE binary
0d95fc6a — Phil Ashby 9 months ago
Create LICENCE.md
3c248856 — Phil Ashby 2 years ago
grab file names as they are opened by things
5f75c942 — Phil Ashby 2 years ago
rework: avoid -fsizeof_int=4 hack, move doscall() to asm, support intercept of vectors

refs

trunk
browse  log 

clone

read-only
https://git.sr.ht/~phlash/wadexe
read/write
git@git.sr.ht:~phlash/wadexe

You can also use your local clone with git send-email.

#Self-executable WAD file containing the DOOM.EXE binary

This is a silly idea, sparked by a tweet and encouraged by the one and only polyglot file god: Ange Albertini

#errr ok... what do I need to try this?

  • The shareware Doom (go find doom19s.zip), unzipped below this folder
  • Dosbox (standard package or debug build)
  • faucc 16-bit compiler (standard package in Deb/Ubuntu)
  • gcc 32-bit compiler and build-essentials tooling (make)
  • Lunacy.

#How do I try this?

  • You should be able to run make test and it all just works..

#How does this work?

  • There are three stages involved:
    • Packing new lumps (unpacker, DOOM.EXE) into the WAD: This is done by wadinject, an un-surprising command line C program, which emits the new WAD as an MS-DOS .COM program.
    • Unpacking DOOM.EXE from the self-executable WAD/.COM: This is done by a 16bit COM program stub that forms part of the WAD itself (and where the polyglot magic happens).
    • Renaming the .COM back to .WAD (or DOOM doesn't work), then launching the unpacked DOOM.EXE (now D.EXE).

#Are there binaries?

Yep - check the releases folder...