? / 10
0 votes cast
Rate this item

Page 1 Page 2 So much has changed in the computing world since I first got my ZX81 at the age of what I think was 9. The power of PCs is just insane nowadays in comparison, in fact even some of the cheapest mobile phones make the glory days of home computing look like a relic from a bygone era.

We have graphical and CPU horsepower that can produce amazing images, and whilst not quite completely photo realistic, that step is only a matter of time. The Internet has brought specialist information into the home of anybody, created communities of like minded people that cross boundaries of nationality, race, sexuality and politics. We regularly talk to people who we might otherwise not even take a second glance at had we met them in a supermarket.

I hereby state that I love all these sides of progress, they are truly wonderful and I have no wish for us to go back. However, I feel something in this whole transformation process has been lost.


Machine Code Beckons
When you got a ZX Spectrum, a Commodore 64, Oric 1, BBC Micro, Amstrad CPC, Dragon 32, or whatever... they all did one thing that no computer does these days. They encouraged you to learn how to program it. Admittedly they did so with one of the world's most awful languages, BASIC, but they did so none the less. More than that, once they hooked you into coding on them, they encouraged a vital step further, they almost demanded you begin speaking their language.

Inline Image

Yes, anybody who spent a certain amount of time with their old computer would almost inevitably want to write code in machine language, the binary instructions that the CPU spoke at the heart of all systems. They encouraged this because the technical limitations meant that BASIC was just too slow for anything other than a Football Management game.

After some studying of machine code, you'd soon start to understand and appreciate many things about the system you were using, from how the chip itself actually worked, to how it spoke with other components. You understood how every programming task had to be broken down into ever simpler elements, because this was the only way to get things done. There was none of this grabbing a library here, or just downloading and altering something off the Internet there, you wrote it all yourself.


But Speed Was a Huge Problem
The limitations of CPU power made it all the harder, because these machines could only execute so many millions of cycles a second. Oh but millions is loads isn't it! No, actually it isn't. Take the ZX Spectrum for example, it had a CPU clocked at 3.5Mhz, which means the CPU ran at 3,500,000 cycles per second. But it takes between three and six of those cycles to execute a single machine cycle (the measurement used to define how long an instruction takes), and instructions themselves can take between 1 and 6 machine cycles.

Suddenly that big sounding number is reduced radically, and quite how to exactly calculate how many it can manage per second becomes a lot harder. But let's take a few best case scenarios and say on average an instruction takes 2 machine cycles, which uses a minimum of 3 clock cycles, that's 3.5 million divided by 2 divided by 3, which is roughly 583,333 instructions per second.

But even that number is misleading, because if you are coding a game, then frames per second comes into play. In olden days, before LCDs we all used CRTs for our televisions, you might even know somebody who still has one. PAL TV in the UK ran at 50Hz, which is fifty hertz, and hertz is times per second. Because of historical limitations that I won't go into here, but involved a lack of transmission bandwidth, each frame of video was divided up into two fields, sent as alternating lines. Therefore 50Hz was more like 25Hz if you de-interlaced the v... ok I'm getting off the point a bit here.

So where were we? Oh yes, if you are aiming for a 25Hz image, not a bad aim for fluid fast moving graphics, your earlier amount of instructions per second becomes 23,000 instructions per frame. That's pretty much all you get, if you take longer then you miss the next frame or even worse you start drawing over that frame whilst it's being sent to the TV set causing what is these days known as tearing. Part of your image is from the previous frame, other parts from the next one, a distracting mess.

Inline Image

I'm not even going to get into how much harder things were on the ZX81 or Atari 2600, both machines which lacked proper display hardware, and actually required the CPU to be doing specific things for anything to even display an image every update. When some of your instructions per frame are actually spent sending that frame to your telly, even less is there to play with.
Next Page

Posted by Robert John Shepherd