Logic in Doom is particularly interesting to me. Apparently you can fit ~64k logic gates in a map (using the method described). From [1]:<p>"As the DOOM engine was not designed to be an interpreter, there are some constraints on our programs written against it. The biggest one is how large our programs can be. Since each gate uses at least one tag, we can use this as a metric to derive an upper-bound on the size of a program. As the DOOM engine uses 16-bit tags, this means we can have, at most, 65535 gates. This is not a particularly large number. We may be able to implement a very small CPU but this limit will be hit pretty quickly I believe."<p>The z80 had ~8,500 transistors. The 8086 had ~29,000 (checking Wikipedia). You could get far fewer if you use a 1-bit microarchitecture, I'm sure. I think there was a DEC (PDP?) computer that used that trick to have a really low transistor count, but I don't remember what it was called.<p>The real problem is RAM; for this you may as well cheat and modify Doom's code to add a RAM chip, and I/O while you're at it.<p>You could create a CPU in Doom implementing an architecture for which a C compiler exists, capable of compiling Doom, and run it in the CPU in Doom. For "reasonable" speed you'd have to do more than one simulation step per frame render (in the host Doom). If you ran it for long enough maybe you could get a full frame of Doom in Doom.<p>[1]: <a href="https://calabi-yau.space/blog/doom.html" rel="nofollow">https://calabi-yau.space/blog/doom.html</a>