There's a certain delight to be had in doing something just to see if you can. Case in point: rendering Doom using PCB design software, or wading through the shores of Hell via the medium of an oscilloscope.
Enter Mike Ayles, who pondered if it was possible to render Doom in vectors using KiCad. The answer? Of course it was. Doom can run on pretty much anything.
However, KiCad is not running the game engine. The designer is being used as a renderer while a separate C process runs the engine. Ayles wrote: "If we wanted Doom truly running inside KiCad, we should have written it in KiCad's Python scripting engine. But that ship has sailed and I'm not rewriting it."
KiCad rendering a frame from Doom (pic: Mike Ayles)
KiCad deals with PCB layout. Hence, each frame of the game is rendered as copper traces, with PCB components replacing game objects. The walls are PCB traces, Ayles said: "Demons are intimidating 64-pin packages. Ammo clips are humble 3-pin parts."
"And every frame creates a legitimate PCB design that could theoretically be fabricated."
We at El Reg are big fans of such gloriously absurd and ultimately pointless bits of technology, particularly one that can hit 25 fps on an M1 MacBook Pro (so long as KiCad is tweaked accordingly). We asked Ayles how long the project took. He replied: "I threw it together in two days. Had the idea on Sunday, and just had it going on the side on Monday and Tuesday."
He added: "If my employer is reading, it was a focused research project into benchmarking our tooling."
We are happy to include the clarification.
As for the coding, Ayles told us: "Most of the code was written by Claude." However, the assistant was not as helpful as its marketeers would make out. "It was making absolute braindead takes and I had to step in more than I would have liked, primarily for architecture than implementation," he said.
Now in possession of a vector renderer, Ayles decided to take up something else: rendering frames from Doom on an oscilloscope. He told us: "I figured since I had a vector engine, it wouldn't be too difficult to do.
"I do have some high-end DACs as I used to be an electronic test development engineer. However, our bottleneck here is using a digital scope with its dodgy emulated phosphor persistence, so I figured it'd be funnier to just use the headphone jack on the laptop."
Which gives us ScopeDoom: turning a MacBook headphone jack into a vector display. It will display a recognizable wireframe rendering of Doom. "It's not pretty," wrote Ayles, "but you can walk through E1M1 and recognize the starting room, the zigzag corridor, the first shotgun. The geometry is correct, just crude."
Doom running on an oscilloscope (pic: Mike Ayles)
Ayles modestly called ScopeDoom "a very last-minute thing." It will be interesting to see what he comes up with over Christmas. ®
Source: The register