Get the latest tech news

ZX Spectrum graphics magic


Hey friends! (Or just curious readers peeking under the hood of good old retro games). My previous article on calculating angles with integers was well-received.

It’s unknown why Sir Clive Sinclair chose this particular order, but it turned out to be very convenient for displaying simple characters that occupy exactly one pixel block! And finally, we peered into the arsenal of retro-optimizations, examining different methods for fast address calculation: from incremental shifts (good for movements within a block) to high-speed table lookup (excellent for arbitrary access) and clever direct bit gymnastics in assembly. Understanding how the Speccy screen is structured, how pixels and colors reside in memory, and how to quickly find the right addresses – this is the absolute foundation for any graphics on this platform.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of basics

basics

Photo of spectrum fan

spectrum fan

Related news:

News photo

Understanding Consistency in Databases: Beyond the Basics

News photo

Implement Flash Attention Back End in SGLang – Basics and KV Cache

News photo

DOGE employees don't understand the basics of SQL