Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We can probably trace a ton of greatly influential programmers back to Sinclair machines (Linus Torvalds used a Sinclair QL for example, I think Demis Hasabis had a Speccy.. maybe), but the original ZX Spectrum 48k stands separate from all the rest. The whole hardware architecture was a series of hacks to make the machine as cheap as possible. A few fascinating facts that come to mind:

(1) the 48k Speccy had a total of ..96KiB of memory: 16KiB of "proper" DRAM, 16KiB of ROM for its BASIC and ..64KiB of DRAM of which half of was non-functional! Sinclair was buying broken memory chips and binning them to get sets whose either the top or the bottom 32KiB worked. They could get these chips for way cheaper. Each machine would have a jumper to select either the top or the bottom 32KiB working region.

(2) Both the "graphics card" chip (the ULA, or Uncommitted Logic Array, an early form of an FPGA) and the Z80 CPU needed to read from memory. Instead of having multiplexers, the ZX Spectrum just connected the two address buses with resistors, such that the ULA would overpower the Z80 if both tried to set an address to read from. The CPU was completely unaware of this: the ULA would ..freeze its clock signal for a few clock cycles, do its thing, and then let the CPU continue with its read. It was actually slower to read from a specific region of RAM that contained the framebuffer because of this.

(3) the article describes the weird out-of-order memory layout for the screen. The reason it was done this way was because of the 4116 DRAM chips the machine was using. These were 16,384 (2^14) 1-bit memories, arranged in 2^7 rows and 2^7 columns. To address a random location, one would need to first clock in the 7-bit row, followed by clocking in the 7-bit column. If you wanted to access consecutive memory locations with the same row address, the chips had a "fast page mode", where you would only need to clock in the next 7-bit column address. The memory was laid out in such a way that would minimize row address settings.

Hacks, all the way down to the core.



The hacks paid off though. The cheapness made the Spectrum ubiquitous across whole swaths of europe. Not only was it the first computer of an entire generation, it was the first generation where many people had a computer.


Agreed. It was the right tool at the right time.


Good times! I wonder if you remember this bit:

Graphics often looked a little weird, because of the hard limit of one color 'palette' (1 ink color and 1 paper color) per 8x8 pixel grid.

However, if you had cycles to spare, there was a cool hack that allowed one palette for each 8x1 pixel slice. By synchronizing with the ULA, you could overwrite the attribute row at each horizontal blanking interval.

The only time you'd have cycles to spare, of course, is when you weren't doing anything else whatsoever. But it made for pretty "press any key" welcome screens.


There was also the screen border which generally had to have one color but you could use a similar trick to draw static stripes on it (ZX wasn't fast enough to change the color more than a few times per scan line, so you could not really draw more than stripes of varying width).

I remember a game that had a welcome screen which had matching stripes on the real screen and then drew some pixel patterns on it to create an illusion of drawing individual pixels on the border.


Some games (Turrican?) even used an hack that displayed the color brown on the screen, when no such color was part of the pallet.


> Each machine would have a jumper to select either the top or the bottom 32KiB working region.

So, did anybody mod the machine by replacing the chips by working ones and making that jumper software-controllable to get 16 + 2 × 32 = 80KiB of RAM?

I googled for that, but couldn’t find it.


Yes, such mods were actually quite popular. Here is one example: http://blog.tynemouthsoftware.co.uk/2020/03/a-zx-spectrum-wi... You can buy upgrade kits even today: https://www.retroleum.co.uk/spectrum-repairs-mods


I recall reading about it in a Spectrum magazine in the 80s. While interesting, there was not much you could do with it since most software didn't need it.


A lot of the reason Dundee has such a great games producing history is down to the fact that the sinclair spectrum was built here in the timex factory.


> The whole hardware architecture was a series of hacks to make the machine as cheap as possible

Well, I mean, in a way, yes, but that's an uncharitable way to consider it, IHMO. It's a bit like saying "the entire Unix architecture was a series of hacks to make a multiuser OS run in 8 kilowords of memory and 1MB of disk."

I mean, it sort of is, but it's also a very negative way to assess it.

As a former Spectrum 48 owner, I saw it more as inspired ways to get a colour computer with primitive sound for under £175, when the American equivalent in market positioning, an Apple II, was equivalent to in the region of £1750.

> 64KiB of DRAM of which half of was non-functional!

Only some of them, AIUI. Also an inspired way to get around low yields at the time. Allegedly the Intel 486SX was a similar hack: got a 486DX with a working integer unit but broken FPU? Call it an SX and sell it anyway!

This is also how CPU speed binning works. Test one -> can it do max speed? -> yes, mark the whole batch for that speed; no -> test them slower, and remark as slower.

Thus the Pentium 60 and 66... then 90 and 100... then 120 and 133.

> the weird out-of-order memory layout for the screen

Quite possibly inspired by similar hacks by Wozniak in the Apple I and II.

Compare the Amiga, using the graphics chipset to drive the floppy drive. Pros: cheaper and more storage. Cons: nothing else can read the disks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: