Keynote: Teaching an Old Dog New Tricks
summary
Implements a ZX Spectrum emulator twice: one in familiar C++11/14 style and one using constexpr/meta/templates plus concepts, modules and coroutines. First build reaches ~300 MHz emulation; the modern rewrite runs ~650 MHz (peaks near 1 GHz with tricks) and passes a community Z80 test suite and Catch2 unit tests. Modules simplify interfaces but modules hurt parallel builds (incremental builds jump from ~10s to ~30s, clean from ~1m to ~2m). Coroutine approach stalls because coroutines caused allocations that defeat per-cycle performance; WebAssembly port runs ~100 MHz (spectrum.zenia.org).
AI-written summary · about
chapters (27)
- 0:00Introduction
- 1:18The emulator challenge
- 2:34Understanding the Z80
- 5:52Memory mapping
- 11:32Initial emulation implementation
- 14:46Decoding instructions
- 17:55Arithmetic Logic Unit
- 19:19Debugging the emulator
- 21:14Video and screen output
- 22:33First emulator demo
- 25:28Testing and validation
- 27:07Performance analysis
- 29:05Modern C++ implementation
- 32:25Compile-time dispatching
- 35:02Instruction decoding logic
- 37:05Templated opcode handling
- 40:09Instruction table generation
- 44:37Optimized execution
- 46:55Performance metrics
- 50:23C++ modules experience
- 52:03Module build challenges
- 55:55Modules conclusion
- 59:09Coroutine implementation
- 1:07:36Web assembly porting
- 1:10:05Web demo and debugging
- 1:12:13AI assisted development
- 1:15:20Conclusion
related talks
59mTeaching an Old Dog New Tricks - A Tale of Two Emulators
46mLet's Resurrect the Ordinosaur! 🦖 💻
04mLightning Talk: A Journey Back In Time - C++ Evolution
01h 08mC++ MythBusters Strike 2
34mBack to the FUTURE! From C++ to JS
01h 04mKeynote: Learn Programming, then Learn how to Be a Programmer
01h 26mHow I Teach Modern C++ One Pixel at a Time
01h 44mKeynote: The Tragedy of C++, Acts One & Two
