Our great sponsors
-
NTSC-CRT
NTSC encoding/decoding in C89 using only integers and fixed point math. Supports NES decoding. Can be used as an image filter for games or real-time applications.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
This is really cool! Speaking of retro, the fact that this is possible, emphasizes just how fast modern hardware is.
The Atari 2600 has its CPU in lockstep with the graphics output. There are CPU 76 cycles during a scanline. While I've only toyed around with programming the Atari 2600, it still boosted my intuition about the relationship of compute time to real time. A single frame, 1/60th of a second, is just about the briefest perceptible period of time to a human. How many bytes can you copy during an entire frame? A couple kilobytes. And during one scanline? About 8 bytes, or in modern terms, just enough time to copy one uint64_t.
In the same amount of time, that of drawing a scanline, a modern machine can chew through this loop: https://github.com/LMP88959/NTSC-CRT/blob/main/crt.c#L442 and apparently with plenty of time to spare.
For a cool look like old-timey display check out https://github.com/Swordfish90/cool-retro-term
So your terminal looks like snowy channel 3. Fun!
Related posts
- Show HN: C port of the (non-super) Star Trek game, incl. WASM for browser/phone
- Simulating Non-CRT Monitors with FFmpeg: Flat Panel Displays (2021)
- I just like writing old code
- Cathode-Retro: A collection of shaders to emulate the display of an NTSC signal
- Does anyone know of a similar Windows equivalent to the now defunct Mac/iOS app "Cathode" ?