Emulating the Nintendo 3DS: Generative & Declarative Programming in Action
summary
Describes a concrete system to auto-generate 3DS IPC serialization: declarative command descriptions (command id + normal/special/request/response tuples) drive template generators that produce decode/encode logic and a single GlueCommandHandler. Uses C++ features like variadic templates, if constexpr, parameter-pack expansion and constexpr tables to validate handler signatures at compile time, synthesize command blocks, and log/detect commands. Targets ~40 services with ~30 commands each, eliminates repetitive boilerplate, compiles to zero‑overhead code and works as demonstrated with live examples.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 1:06Who am I
- 4:09Component Overview
- 5:46Virtualized CPU
- 7:13System Call 32
- 9:17Emulation
- 13:29API Emulation
- 16:05The Soul Process
- 17:20Interprocess Communication
- 22:09Response Block
- 23:12Dispatch Flow
- 26:57Is this worth automating
- 28:29Declarative Programming
- 31:17IPC Command
- 33:28Main Template
- 35:22Carrot of C Program
- 37:24Vision
- 38:44Advantages
- 39:42Generators
- 40:19Example
- 42:59Decoding Read
- 44:32Caveats
- 46:31Demo
- 48:11Encoding
- 49:07Glue Command Handler
- 50:20Command Block Synthesis
- 51:25Command Block Demo
- 55:07Summary
- 56:19Conclusion
related talks
59mMeta++: Language Support for Advanced Generative Programming
38mProcedural Generation at Runtime: From Basic to Complex by Example
01h 16mPolymorphism, Cohesion, and Coupling in C++
39mRobotics at Compile Time: Optimizing Robotics Algorithms With C++'s Compile-Time Features
53mMulti-Paradigm Programming and Beyond
53mC++ Horizons
01h 07mDynamic Polymorphism With Code Injection and Metaclasses
38mPersistent Representation of C++ for Fun and Profit
