Post

I wrote yesterday that the ZX81 has a native graphics resolution of 64x48. That's not strictly true. It has a pixel resolution of 256x192, but has a character map of 32x24. The PLOT routines use the graphics block characters as pseudo-pixels to effect a resolution of 64x48.

Why did they go to such lengths? For one, it inherited it from the ZX80. Secondly, you can shrink the D_FILE for systems with less than 4K; each line is effectively a newline terminated string (byte value 118). So an empty display takes up just 25 bytes, not 768. It expands each line as required.

The display is partly CPU generated; the ZX80/81 NEWLINE character (118) is not ASCII 13 or 10 as you'd expect because 118 is the Z80 opcode HALT. In essence the ULA fools the CPU into thinking it is reading NOP instructions whilst it generates the video until it hits a HALT instruction at the EOL.

0 reposts3 likes

Anyway, it's a lot more complicated than that. Read the linked Tynemouth Software blog post on it for more details. It's just one of those "Ah yes, I understand that is why that is" things. With a little more money they could have done all the video generation in ULA.

Always wondered what they did in the ZX80. Now that I know, I must say it's the most bonkers solution I've ever seen, all in good Sinclair style. Hijack both the instruction fetch *and* the refresh, why not?