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.
Or read this on Hacker News