Quake's pop.lmp Easter Egg

pop.lmp

Hey, so I was browsing the source code to Quake and noticed something neat about the way Quake is activated! Quake's common functions source file contains the way that the engine verifies whether it is registered. Here is around line 1009, for the curious:

/*
================
COM_CheckRegistered

Looks for the pop.txt file and verifies it.
Sets the "registered" cvar.
Immediately exits out if an alternate game was attempted to be started without
being registered.
================
*/
void COM_CheckRegistered (void)
{
 int    h;
 unsigned short check[128];
 int    i;

 COM_OpenFile("gfx/pop.lmp", &h);
 static_registered = 0;

...

Up until now, I had thought that .lmp files only contained images. However, it seems that isn't true if we're to believe the code comment. Following a hunch, I went into my id1/pak1.pak and extracted gfx/pop.lmp. I tried:

hexdump -e "16 \"%_p\" \"\\n\"" pop.lmp > pop.txt

And I wound up with:

................
....f.......f...
...f.........g..
..fe.........ef.
.cea.........aec
.dea.........aed
.ded..diiid..ded
.cehb..dhd..bhec
..egic.dgd.cige.
..bfgijhghjigfb.
...befffffffeb..
.....bcdfdcb....
.......bfb......
.......afa......
........e.......
........d.......

Hope that shows up okay. (I need to format it with css. I'll get around to that at some point.)

So Quake is shareware unless pak1.pak is present, as all the engine does is parse pop.lmp to declare itself registered, and the above is what's inside that file. Pretty cool!

Also, be sure to check out neozeed's Virtually Fun blog. They also noticed some interesting things about this function in an earlier version of the source code. Quake is neat!

Posted on Saturday, February 02 2019