17

From Eurogamer’s obituary of Sir Clive Sinclair:

Sinclair never intended for his computers to be games machines, but that was what the market decided they were. Within the space of a few years, the idea of having a computer in the home had gone from a fantasy for all but the wealthiest businessmen to a reality, even for council estate kids.

By "serious", I don't mean word processor or spreadsheet or any business app. We all know there were some. Was any serious number crunching ever done on the speccy? 8 * 8 bits = 64 bits, so we can do 64-bit arithmetic on the speccy, but it wouldn't run very fast. You'd have to write assembly routines and even then it would be slow. Still, there's enough room at least. Would a speccy suffice for the Nazi mothership from "Iron Sky"?

OrangeDog
  • 103
  • 5
user1095108
  • 803
  • 5
  • 17
  • 11
    I have no idea what 'the Nazi Mothership from "Iron Sky"' is, but I think this is an interesting question as I've seen BBC Micros used for inter-planetary satellite purposes (ground station) for doing proper mission engineering. I don't think the spectrum would cut the mustard, but I think it's an interesting enough question not to be dismissed. – Dan Dec 10 '22 at 16:57
  • 1
    there are some clips online if you search for "Iron Sky". – user1095108 Dec 10 '22 at 16:59
  • 1
    I know of a project at the train builder Brugeoise, now Alstom, as the driver for checking correct connections between the wiring in trains. But I think it was rather short lived, when I arrived there in 1991, they were already using PCs for this. – chthon Dec 10 '22 at 17:04
  • I think it would be odd to use the Spectrum for anything non-graphics related, as a ZX81 could be used for most any “microcontroller”-like process-control idea you had, for much cheaper, almost like an Arduino or Raspberry Pi Pico today. – Jacob Krall Dec 10 '22 at 17:18
  • https://youtu.be/tB6CC8UbJLU – Bruce Abbott Dec 11 '22 at 07:24
  • The first thing that came to mind for me was "VU-3D" by Psion. It was a tool for 3D modelling that could do shading. It was not fast and it wasn't as slick as some later 3D games but it came out way back in 1982 and 3D modelling requires lots of number crunching. It certainly wasn't a game so in that respect it was "serious". Not sure you could do anything productive with it. I would also count programming language compilers and disassemblers as serious. – hippietrail Dec 11 '22 at 07:57
  • At some point in the 1980s I was told I wasn't allowed to play games on our Spectrum because my uncle was using it for something serious. It was printing numbers on the screen, about one every few seconds. I imagine he'd written a program in BASIC to calculate something for him, but I can't imagine what it might have been. Next time I see him I'll ask if he remembers. – N. Virgo Dec 11 '22 at 08:39
  • 3
    You forget about the most common "serious" application for the Spectrum: Sinclair Basic. One of the most important reasons for buying a ZX81 or a Spectrum was that you learned programming. – Martin Rosenau Dec 11 '22 at 09:05
  • 18
    Your "8 * 8 bits = 64 bits, so we can do 64-bit arithmetic" doesn't make sense. You can do whatever arithmetic you want on a computer with 1 bits, and having an 8-bit bus does nothing to help 64-bit arithmetic... – pipe Dec 11 '22 at 10:10
  • @N.Virgo Imagine what wonders your uncle would accomplish on the Raspberry Pi. – user1095108 Dec 11 '22 at 10:39
  • 1
    Around 1985 I was involved with re-writing a circuit simulator, created in Spectrum Basic, into QL Superbasic. My source was a long printout done on the Sinclair ZX spark printer. – Michael Harvey Dec 11 '22 at 11:23
  • 1
    @user1095108 I imagine he has several! – N. Virgo Dec 11 '22 at 13:37
  • 3
    Iron Sky is perhaps not the most realistic movie, but a good benchmark of the ability of the Spectrum to command and control space fighters would be Elite. – Davislor Dec 11 '22 at 17:06
  • The Z80 was an 8-bit CPU with a 4-bit ALU. It is not ideal for number crunching (not that it stopped TI...) – forest Dec 11 '22 at 23:27
  • 1
    Still, how "serious"? I used Speccy to calculate fractals, and could plot a decent Madelbrot set overnight. Quite a decent amount of calculation, a good learning tool, but it was still 'for fun'... – Zeus Dec 12 '22 at 01:15
  • @Zeus I think whatever was worthy of a news article, especially the front page, would please Sir Sinclair. To see and be seen. – user1095108 Dec 12 '22 at 10:34
  • @Davislor I am surprised that film is not more widely known in retro/geek circles. One day a speccy will control a spaceship or space fighters :) – user1095108 Dec 12 '22 at 10:36
  • If the * in "8 * 8 bits" is intended to represent multiplication, then "8 * 8 bits" is 16 bits, not 64 bits. Not that it matters anyway as pipe already pointed out. – brhans Dec 13 '22 at 21:38
  • What I meant was, that you could sacrifice 8 bytes for a double or whatever you wanted and that's not a great sacrifice, when you have 48k available. – user1095108 Dec 14 '22 at 00:27

4 Answers4

21

An application I remember because I found the idea very appealing, though I never owned a Specci and so never used the program: A layout program for printed circuit boards with an automatic router.

It was published 1984 in the German computer magazine "c't" in the issues 8 (pages 37 to 43), issue 9 (pages 46 to 50), and issue 10 (pages 68 to 71). I still have paper copies of the articles.

the busybee
  • 1,054
  • 6
  • 15
  • One has to wonder just how well that program--especially its autorouter--would work, given the severe constraints the Spectrum had, and thinking about the resources KiCad uses on my computer today... (Though of course, KiCad was designed for computers of the 21st century, so it's not quite an apples-to-apples comparison.) – Hearth Dec 12 '22 at 16:36
  • If I understand the documents correctly, it can handle just one layer with 128*128 elements, each element on a 1/20" raster. – the busybee Dec 12 '22 at 16:45
  • @Hearth, ideally it would work well enough to develop peripherals for the ZX Spectrum. – Mark Dec 14 '22 at 04:13
  • Given that today’s auto routers are little better than throwing a plate of spaghetti at your monitor I’d guess tgg he at the Spectrum router was well ahead of it’s time. – Frog Dec 14 '22 at 07:15
18

Number crunching? Beyond spreadsheets and some small custom simulation programs, I doubt anyone used the Spectrum for that. In the 80s if you wanted to do heavy number crunching you at least bought something with a floating-point unit.

Home computers were used sporadically for industrial control, usually in small or one-off designs. I know of examples where the Apple II and Commodore 64 were used for industrial control in factories; I'd be shocked if no one ever used the ZX Spectrum.

I'll embrace the unusual spirit of your question: could the ZX Spectrum run an entire space-based warship?

I think the answer is actually a qualified yes. A 3.5 MHz Z80 with 64 KB of RAM runs circles around the Apollo Guidance Computer, which was sufficient to guide a small craft to the Moon and back autonomously. It's considerably more computational power than existed in the first fly-by-wire aircraft.

Connecting the darn thing to hundreds of control systems would be an interesting electronics challenge, but doable. The software would be a spectacular project and by far the most involved aspect. Yes, it's a slow machine. But with the right software, there's no reason a Speccy couldn't juggle, for example, 100 real time tasks, each requiring an update once per second on average. That leaves ~1000 instructions per task per second, very roughly, which is enough to do several floating point calculations or dozens of high precision fixed point calculations, or test and control dozens of IO channels, in each task, every second.

This comes up sometimes with the Apollo Guidance Computer. How could such a tiny computer control a spacecraft? We tend to forget that even tiny computers are blazing-fast in human terms.

RETRAC
  • 13,656
  • 3
  • 42
  • 65
  • 1
    my thoughts exactly, I've read that not even floating-point numbers are needed, since you can always tailor fixed-point numbers to a specific problem. – user1095108 Dec 10 '22 at 20:31
  • 1
    @user1095108 Yes, it's a standard technique. Basically you say that all your numbers are scaled, so speed values stored in thousandths of a km/h, for example. Except in practice we normally use a scaling which is powers of 2, so maybe values would be 1/1024th of a km/h, and we call this "fractional bits". The problem is that you need to make sure you can't overflow the number, or get values which are too small to register (called "underflow") - oh, and you need to be very careful about tracking those scaling factors through your maths. But it works, and works well. – Graham Dec 11 '22 at 08:49
  • 3
    The answer is wrong. "A 3.5 MHz Z80 with 64 KB of RAM runs circles around the Apollo Guidance Computer, which was sufficient to guide a small craft to the Moon and back autonomously. " - yes, because it did one of the actual course calculations. Those were preloaded into it and calculated on the ground. It could CONTROL Apollo 13 and executed a program, but not do the course calculations. One would assume the NASI mothership to be able to operate independent. But then it has antigravity and efficient engines using fusion, so it can waste energy - contrary to the apollo capsule. – TomTom Dec 12 '22 at 14:32
  • 1
    Another aspect to add to TomTom's comment: the Appolo Computer was specifically designed to send and bring back humans to the moon safely: it took more than computing power, but also components built to withstand space radiation and a redundancy control system, and I doubt the spectrum would be OK for the first point – Kaddath Dec 13 '22 at 14:25
  • 3
    "A 3.5 MHz Z80 with 64 KB of RAM runs circles around the Apollo Guidance Computer" Runing circles definitevly not, barely of comparable performance. Don't underestimate the AGC. It was a 2MHz 15bits computer with 2KWords RAM and 36K words. It had hardware multiplier and division but slow memory. – Patrick Schlüter Dec 13 '22 at 16:02
  • @TomTom, the only reason the AGC couldn't do course calculations for flying to the Moon is because it wasn't programed for it. It could do course calculations for landing on the surface of the Moon, because those couldn't be calculated in advance -- NASA didn't know the elevation of the Moon's surface with sufficient precision. The calculations for flying to the Moon had to be done well in advance to know when to launch, so there was no reason to give the AGC the ability to do them. – Mark Dec 14 '22 at 04:20
11

I’ve personally seen ZX81 used as a prototyping platform for an eye tracker running at 100-200Hz sample rate. The aluminized paper printer was used to print out the tracings. Horizontal lines were drawn on the paper where the plot would “overflow” the rather narrow printer paper width - you had to slice the printout on the line, and reassemble the plot on a larger piece of paper. The “overflow” was where the 8-bit ADC window would be moved to keep the signal within the acquisition range. It was a simple and effective solution to the shortcomings of available hardware.

The same institution that did the work also had FFT and various digital filters running on it. Sure it was slow, but still handily beat the cost of professional analog instruments. Never mind that importing those behind the Iron Curtain would have been an interesting endeavor at the time (of Pratchett’s “Interesting Times” kind).

It’s not Speccy, but certainly it is professional use with salaries paid for the work, and useful research results obtained.

  • woo FFT, are you sure it wasn't running on some kind of coprocessor? – user1095108 Dec 10 '22 at 19:31
  • 2
    Not at all. It was slow, but it wasn’t a big FFT either - maybe 128 points. It was all off-line analysis. First the data was recorded to RAM, then dumped to tape, then read from tape in blocks, each block would have an FFT done, and the results written out. The original recording had pauses inserted between blocks on tape where the FFT output would be recorded. An I/O port and a relay was used to start and stop the capstan motor in the tape recorder. Eventually a pulse wheel attached to one of the reels was added to count tape position. – Kuba hasn't forgotten Monica Dec 10 '22 at 19:34
  • 2
    Yep. I did the first simulations of the idea that became the RXTE ASM (https://heasarc.gsfc.nasa.gov/docs/xte/learning_center/asm.html) on a 6502-based ECD MicroMind. Uncommon micro: less than 100 were made, but I had one at home, so it was convenient. Used an FFT in BASIC to do convolutions. – John Doty Dec 11 '22 at 22:57
  • @JohnDoty And if anyone thinks FFT is slow in BASIC, try running a straight DFT. It's best to live in wilderness then since there's a lot of hiking one can do while waiting for the results :) The team that was doing the work I describe eventually got an ABC-80, and that had a much faster BASIC than any of Sir Clive Sinclair's machines. FFTs on ABC-80 BASIC were several times faster than on ZX-81. And ABC-80 had CP/M so it was easy then to use assembler without manually assembling on paper :) Then came MTX-512 and that had built-in assembler. What a machine that was. NODDY FTW! :) – Kuba hasn't forgotten Monica Jan 10 '24 at 16:49
4

Yes, I know someone who used them to solve matrixes and small-scale linear programming problems. It was quicker than traveling to the computer centre and unlike Apple (etc.), they come under the accounting limit, so they did need central approval.

(They were more capable than a programmable calculator.)

Peter Mortensen
  • 260
  • 2
  • 7
Ian Ringrose
  • 425
  • 3
  • 6
  • all in basic? not asm or something funkier? – user1095108 Dec 13 '22 at 10:12
  • 2
    @user1095108 All in basic likely written in a day or two. Think of the sort of maths we would do in a spread sheet these days. Saved having a room of people using slide rule or calculators – Ian Ringrose Dec 13 '22 at 10:16