And it's not used in any sort of way you'd normally expect: not copy protection, or multiplayer anti-cheat, or anti-tampering on saves... It's to slow down FAQs.
But why is it written out as 0xb2, 0x26? is this scancodes or something? NOPE!
Then, when the m_cheat.c code is checking your keypresses, it also SCRAMBLEs them and checks if they match.
They didn't want "IDKFA" and the other cheats to be written out in plain text in the source code.
Now, the source code wasn't released until 6 years later, so why did they care?
So anyone could have pulled out a hex editor and started scrolling through DOOM.EXE until they found some text, like "IDKFA"
every cheats bulletin board file and usenet FAQ.
It'd be interesting to go look through the archives of the usenet groups and see how long it took for various cheats to get mentioned.
So the answer for "how much did this slow down hackers?" seems to be "at most, 5 days"
That seems to have been the main usenet group for Doom stuff at the time, so it would have been quickly cross-posted had it shown up elsewhere first.
As early as the 11th, someone (Eugen Wolwod) had spotted the activation messages for the cheats in the executable, but couldn't find how to activate them yet.
(They would have found it if they did a search on what code calls cht_CheckCheat, and checked each of the arguments)
They knew how it was encoded from looking at cht_CheckCheat, and then followed it back to the group of cheats all in a row, from st_stuff.c
it's often easy to prove something exists in the code, and to find more related things, but much harder to be sure you found them all, or prove they doesn't exist.
It was, uh, "consensual" (if you can say that about CANNIBALISM), but he's very in jail now.
"Boy isn't this part of a DOS game's code interesting? and how did usenet figure out the cheats? Also, did you know a german guy ate someone for sexual reasons back in 2001?"
I don't have time or space to work on it
1. even in 1993, that's not THAT much
2. most people didn't have usenet access, and this kept them from figuring out the cheats on their own.
Doom actually uses about 3.5mb of RAM, but you were unlikely to actually have that amount. So it had ~500k of spare memory, 1/4th of a kilobyte isn't worth worrying about.
With DOS, DOOM was all that was running, there's nothing else going that could use that free memory.
It was a level based on Trinity College in Cambridge.
Well, Wolfenstein 3D uses totally different cheats (they're all key combinations, not typed words) which are kinda implicitly hard to locate in a hex dump.