A compact home game console fitted inside a 9.5mm antenna plug is built around an ESP32-S3 with the explicit goal of playing Doom on an analog PAL TV via the antenna input. Constraints forced choices: BLE Xbox controller for input, on-board power sizing limited by tiny Li-ion cells, and full PAL-compatible video plus audio. To get video without dedicated DACs or TV silicon, the LCD RGB peripheral is repurposed as a timed parallel output feeding resistor DACs. An initial 4-resistor DAC produced a playable but low-color-resolution composite output; careful resistor math, timing tricks, and software-rendered PAL color bursts were used to synthesize luma and QAM-encoded chroma. Precomputed single-cycle waveforms and lookup tables generate lines quickly enough for DMA-driven scanout despite the peripheral inserting its own sync intervals.
Audio and RF modulation are created by abusing ESP32 clocks and I²S: the divided system clock gives a carrier near PAL channel frequency, and bit-pattern I²S output yields the FM audio subcarrier. Several mixer topologies were tried; a two-transistor mixer improved linearity and color stability at the cost of modulation depth and darker images. Moving to an 8-bit R-2R DAC and calibrating against SDR/TinySA measurements allowed LUT-based correction of nonlinearity. The result demonstrates a playable Doom over antenna RF with practical trade-offs in color fidelity, contrast, and power, and documents techniques for ultra-small TV game consoles.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.