Back to blog

Engineer Makes Doom Run in PCB Design Software: The Art of Easter Eggs

Hello HaWkers, an engineer achieved the seemingly impossible: making the classic game Doom run inside a PCB (Printed Circuit Board) design software. This feat adds to the long tradition of "Doom runs on anything" and demonstrates the creativity and technical skill that exists in the developer community.

Have you ever wondered what drives programmers to invest time in projects that are seemingly useless, but technically brilliant?

The Technical Feat

The engineer used the scripting and rendering capabilities of a PCB design software to create an environment where Doom could run.

How It Was Possible

Exploring Hidden Capabilities:

Modern PCB design software is surprisingly powerful:

  • 3D Rendering Engine: To visualize boards in 3D
  • Scripting Language: For automation (usually Python)
  • Internal APIs: Access to drawing functions
  • Processing: Modern CPUs are powerful

Hack Steps:

  1. Identify available rendering API
  2. Map input controls to the software
  3. Port Doom engine to use this API
  4. Optimize to run in real-time
  5. Integrate everything into a plugin/script

Context: Doom was released in 1993 and its source code was released in 1997, allowing ports to virtually any platform.

Technical Requirements

What Doom Needs:

Component Requirement Available in PCB Software
CPU 386/486 equivalent ✅ Any modern CPU
RAM 4-8 MB ✅ Abundant
Video 320x200, 256 colors ✅ Via rendering API
Input Keyboard, mouse ✅ System events
Sound Sound Blaster ❓ Depends on implementation

The "Doom Runs on Everything" Tradition

This project is part of a long tradition in the tech community.

History of Unusual Ports

Where Doom Has Run:

The list is impressive and keeps growing:

  • ATMs and Cash Machines
  • Graphing Calculators (TI-84, HP Prime)
  • Pregnancy Tests (with modified hardware)
  • Smart Thermostats
  • Refrigerators with Display
  • John Deere Tractors
  • MacBook TouchBar
  • Network Printers
  • Routers
  • Smart Watches

Why Doom?

The game became a benchmark for several reasons:

  • Open source since 1997
  • Relatively low requirements
  • Well documented by community
  • Modular and portable engine
  • Culturally significant

The "Can It Run Doom?" Culture

A Technical Meme:

"But does it run Doom?" became standard question:

  • Tests real system capabilities
  • Demonstrates programming skills
  • Creatively challenges limits
  • Connects communities

The Value of Easter Eggs

Projects like this reveal important aspects of development culture.

Creativity in Programming

Why Developers Do This:

  1. Technical Challenge: Prove it's possible
  2. Learning: Understand systems deeply
  3. Fun: Programming can be enjoyable
  4. Community: Share achievements
  5. Portfolio: Demonstrate unique skills

Skills Developed:

"Useless" projects frequently develop:

  • Reverse engineering
  • Code optimization
  • Low-level knowledge
  • Creative problem solving
  • Persistence

Famous Easter Eggs

In Software Industry:

Easter eggs have a long tradition:

Software Easter Egg Year
Excel Flight Simulator 1997
Word Pinball 1997
Chrome Dinosaur Game 2014
Android Hidden version Each version
Firefox about:mozilla 1998+
VSCode Game extensions 2016+

Lessons For Developers

This project offers valuable insights for any programmer.

Deep System Knowledge

Understanding Your Tools:

The engineer needed to deeply understand:

// Conceptual example of how to explore hidden APIs
// in a desktop application

class GameRenderer {
  constructor(hostApp) {
    // Discover host application capabilities
    this.canvas = this.findRenderingContext(hostApp);
    this.inputHandler = this.hookInputEvents(hostApp);
    this.frameBuffer = new Uint8Array(320 * 200);
  }

  findRenderingContext(app) {
    // Explore available APIs
    const possibleAPIs = [
      app.get3DViewport,
      app.getCanvasContext,
      app.getRenderingSurface,
      app.getDrawingArea
    ];

    for (const api of possibleAPIs) {
      if (typeof api === 'function') {
        try {
          const ctx = api.call(app);
          if (ctx && ctx.drawPixel) {
            return ctx;
          }
        } catch (e) {
          // API not available or protected
          continue;
        }
      }
    }

    throw new Error('No suitable rendering API found');
  }

  hookInputEvents(app) {
    // Intercept input events
    const originalHandler = app.onKeyDown;

    app.onKeyDown = (event) => {
      // Process for the game
      this.handleGameInput(event);
      // Pass to original handler if needed
      if (!this.gameActive) {
        originalHandler?.call(app, event);
      }
    };

    return {
      getKey: () => this.currentKey,
      getMouse: () => this.mouseState
    };
  }

  render(gameState) {
    // Convert game state to pixels
    for (let y = 0; y < 200; y++) {
      for (let x = 0; x < 320; x++) {
        const color = this.frameBuffer[y * 320 + x];
        this.canvas.drawPixel(x, y, this.palette[color]);
      }
    }
  }
}

Code Portability

The Doom Engine:

Doom's architecture facilitates ports:

// Simplified example of platform abstraction
// as used in Doom ports

// Abstract interface that each port implements
class DoomPlatform {
  // Initialization
  init() { throw new Error('Not implemented'); }

  // Graphics
  setVideoMode(width, height) { throw new Error('Not implemented'); }
  drawScreen(buffer) { throw new Error('Not implemented'); }

  // Input
  getKeyState() { throw new Error('Not implemented'); }
  getMouseState() { throw new Error('Not implemented'); }

  // Sound (optional)
  playSound(id) { /* can be empty */ }
  playMusic(track) { /* can be empty */ }

  // Timing
  getTicks() { return Date.now(); }
  sleep(ms) { /* implement if needed */ }
}

// Implementation for PCB software
class PCBSoftwarePlatform extends DoomPlatform {
  constructor(pcbApp) {
    super();
    this.app = pcbApp;
    this.viewport = null;
  }

  init() {
    // Find rendering area in PCB software
    this.viewport = this.app.get3DViewCanvas();
    // Setup input callbacks
    this.setupInputHooks();
    return true;
  }

  setVideoMode(width, height) {
    // Use existing viewport, scale if needed
    this.scaleX = this.viewport.width / width;
    this.scaleY = this.viewport.height / height;
    return true;
  }

  drawScreen(buffer) {
    // Convert Doom buffer to viewport format
    const imageData = this.viewport.createImageData(320, 200);

    for (let i = 0; i < buffer.length; i++) {
      const color = this.palette[buffer[i]];
      imageData.data[i * 4] = (color >> 16) & 0xFF;     // R
      imageData.data[i * 4 + 1] = (color >> 8) & 0xFF;  // G
      imageData.data[i * 4 + 2] = color & 0xFF;         // B
      imageData.data[i * 4 + 3] = 255;                  // A
    }

    // Scale and draw
    this.viewport.putImageData(imageData, 0, 0);
  }

  getKeyState() {
    return this.keyStates;
  }

  setupInputHooks() {
    this.keyStates = {};
    // Hook into PCB software events
    this.app.addEventListener('keydown', (e) => {
      this.keyStates[e.keyCode] = true;
    });
    this.app.addEventListener('keyup', (e) => {
      this.keyStates[e.keyCode] = false;
    });
  }
}

// Usage
const platform = new PCBSoftwarePlatform(myPCBApp);
platform.init();
const doom = new DoomEngine(platform);
doom.run();

Creative Engineering

This project exemplifies the spirit of creative engineering.

Thinking Outside the Box

Non-Conventional Approaches:

What distinguishes exceptional engineers:

  • See possibilities where others see limitations
  • Ask "why not?" instead of "why?"
  • Combine knowledge from different areas
  • Don't limit themselves to "correct" tool usage

Side Projects

Importance of Side Projects:

"Useless" personal projects often lead to:

  • Important technical discoveries
  • New libraries and tools
  • Hirings and opportunities
  • Commercial innovations

Famous Examples:

  • Gmail: Started as 20% project at Google
  • Slack: Emerged from game studio internal tool
  • Twitter: Side project during hackathon
  • Linux: Linus Torvalds' hobby project

The Hacker Community

The term "hacker" in its original sense means exactly this.

Positive Hacker Culture

Fundamental Values:

  • Boundless curiosity
  • Knowledge sharing
  • Technical elegance valued
  • Challenges as fun
  • Technical meritocracy

Where to Find:

  • GitHub (open source projects)
  • Hacker News
  • Reddit (r/programming, r/itrunsdoom)
  • Conferences (DEF CON, CCC)
  • Local hackerspaces

Contributing to the Community

How to Participate:

  1. Share your projects, however "useless" they seem
  2. Document the process, not just the result
  3. Help others with similar projects
  4. Celebrate others' creativity
  5. Maintain the spirit of curiosity

Conclusion

The engineer who made Doom run in PCB design software didn't create anything commercially useful - and that's exactly the point. Projects like this represent the best of development culture: technical curiosity, unlimited creativity, and the pure joy of solving interesting problems.

For developers at any career stage, the lesson is clear: don't underestimate the value of "useless" projects. They develop skills, build community, and sometimes lead to innovations no one could predict. The next seemingly absurd project might be exactly what sets you apart in the market.

And if you were wondering: yes, eventually someone will make Doom run on an actual circuit board, using the LEDs themselves as a display. It's just a matter of time.

If you're interested in creativity in technology, also check out our article about China and Starlink Blocking to understand how technology and geopolitics meet in unexpected ways.

Let's go! 🦅

Comments (0)

This article has no comments yet 😢. Be the first! 🚀🦅

Add comments