by rob74 · 3w ago · 0 comments
On the PC in question, if you wanted to draw something onto the screen, you had to do that yourself, byte by byte. No texture mappers, no blitters. Just bytes. Bytes that you had to move yourself.
That's not entirely correct: the graphics hardware took the video memory and built an image from that (frame buffer graphics). Which is already more than the earliest game consoles did.
At some point, the Z80 cpu jumps into an array that holds character info for each line on the screen. Its ULA chip intercepts that instruction fetch, and feeds the Z80 a NOP instruction.
Character itself is read by the ULA, and output onto the address bus. The ROM then outputs the corresponding bit pattern. ULA reads that, and clocks it into a shift register: 8 bits parallel in, serial out produces the pixels on screen.
But here's the nifty bit: that ULA stuff is timed to take exactly 8 cycles of a 6.5 MHz pixel clock. The Z80 runs on 1/2 that, so it takes the exact same time to execute the NOP (4 cycles). Done -> next instruction fetch, ULA ready to grab bit pattern for the next 8 pixels.
That's how screen lines are built on a ZX81. 50/60 Hz screen refresh is done by varying the # of lines displayed. Downside is that the (already 'slow') CPU is executing NOPs ~3/4th of the time, making for an effective CPU speed of ~0.8 MHz.
But the scheme was somewhat flexible, and programmers found ways to produce high-resolution graphics by (ab)using ROM data for non-text graphics. And with a RAM pack you could enjoy full hi-res graphics. All of this in b&w only.
The follow-up ZX Spectrum added a regular framebuffer with color (and even hardware flashing!) in 8x8 pixel blocks. This required a much more complex ULA chip though.