The Retro Bible
The Philosophy of Preservation
Retro gaming is often treated as a "casual" hobby. At Tebian, we treat it as **Digital Archeology.** Emulating a console from 1994 isn't about playing a game; it's about accurately recreating a historical state-machine. To do this correctly, you must eliminate the latency added by modern operating systems.
This manual provides the technical roadmap for "Cycle-Accurate" emulation on Tebian, focusing on kernel-level input handling and Vulkan-based CRT simulation.
1. The War on Input Lag: Evdev and Poll-Rates
The "feel" of a retro game is defined by the time it takes for a button press to become an action on screen. Windows and standard Linux DEs introduce significant lag through their "Input Stacks." Tebian bypasses these layers.
The Evdev Advantage
Tebian maps controllers directly to the evdev (event device) kernel interface. We use a C-based wrapper that reads raw HID reports from your USB or Bluetooth controller. By setting the kernel's USB polling rate to 1000Hz (1ms), we ensure your inputs are processed before the next frame is even rendered.
- Real-time Priority: We grant the
retroarchprocessSCHED_FIFOpriority, ensuring it is never interrupted by background tasks. - Wait-for-Vsync: We use the Wayland
presentation-timeprotocol to synchronize game frames perfectly with your monitor's refresh rate.
2. The Visual Soul: CRT-Geom and Vulkan
Retro games were designed for CRTs, not LCDs. CRTs have phosphor glow, scanlines, and unique color blending. Playing a 240p game on a 4K LCD looks "wrong" because it is too sharp. Tebian uses Vulkan-based Shaders to simulate the CRT experience.
Phosphor Mathematics
We use the Mega Bezel and CRT-Guest-Advanced shader presets. These are complex C-like (HLSL/GLSL) programs that calculate light diffusion and beam-convergence in real-time on your GPU. The result is a display that looks like glass—not because it's sharp, but because it has the depth and warmth of a tube television.
3. The Interface: EmulationStation on Sway
Tebian's "Retro Rig" uses EmulationStation-DE as its primary shell. We've optimized it to run as a native Wayland client. There is no "Desktop" in the background. When you enter Retro Mode, your machine becomes a console.
- Zero-Gaps: Sway is configured to remove all window borders and gaps in full-screen retro sessions.
- State Management: We use C-scripts to handle
save-statesyncing to your Mothership via Syncthing. Play on your PC, pick up on your laptop.
Conclusion: Timeless Computing
The Retro Bible proves that "Legacy" doesn't mean "Old." By applying modern C-level engineering to classic software, we preserve the art of the past with the performance of the future. One ISO. One menu. Infinite classics.