the-8-bit-guy and iconic ZX-Spectrum (not zx80/81)

artik

New Member
Jan 5, 2020
22
1
3
When I start watching the 8-bit-guy as first I was surprised how little information was given on one of the most iconic microcomputers of 80th - the Sinclair ZX Spectrum.

It was the machine I grew with. Watching this channel I discovered that apparently US public virtually oblivious to it. And frequently if mentioned it is referred as "cheap toy for poor Brits" who couldn't afford the real Commandore 64 with "real" keyboard.

In reality Spectrum sold 5 millions of official built machines, it is more than entire Atari 8-bit family of computers. And its clones (not counted in 5M stats) were hugely popular in eastern Europe giving it even larger audience. Even today tools for Spectrum (simulator, cross compiler) are vastly superior to that of C64

It wasn't cheap, it was affordable and was brilliantly designed to be so. It was actually better machine then famous c64 in many areas (loosing in some other areas)

I grew up on this machine, Looking this channel I actually tried some simulator of Commandore 64 to play with. It made me understood how good the design of the ZX Spectrum was. I had found some nice things about c64 (mostly it was easier to use in simulator because no need to remember shortcuts) but in general - in my (biased) opinion C64 felt inferior in many ways.

  • Zilog Z80 was (is) more powerful CPU than 6502 (and I'm not talking about clock)
  • ZX Spectrum BASIC was better out of the box:
  • (a) support of graphics (like drawing) - such that plotting y=six(x) graph is something trivial to do. Apparently it wasn't something simple to do using c64 at all.
  • (b)More powerful text/screen processing - like PRINT AT and others without peeks and pokes
  • (c)Better language 8 significant characters for variables instead of 2 and being able to call a variable "diff" without colliding with keyword "if" (that I found really annoying when I ported a small program to c64 basic)
  • (d)Better editing that included syntax checks upon adding a line, easier browsing over the code likes, longer lines of code.
Yes it had somewhat inferior graphics 256x192 instead of 320x200 with same color attributes collision and only a single mode without sprites but yet it was only marginally weaker. But on the other hand it was available together with text and make things simpler.
Yes it was used mostly with tapes and typical game took like 4min to load but it made it much more accessible to wider audience since everybody had tapes. I hadn't started using floppy disks till I started to work with IBM PC.

I would really love to see more videos on ZX Spectrum and I think US public can benefit from it greatly - since it was totally missed in USA.

EDIT: sorry wrong forum - meant to be on "Other Retro Computers"
 
May 22, 2019
597
303
63
I don't know that I'd agree that the PC tools for Spectrum are better. I've found the few Spectrum emulators out there to be primitive and awkward, compared to VICE.

But the BASIC issues are fair points... BASIC 2 on the 64 was its worst feature, and there were lots of projects to make Commodore BASIC better. As to whether the Z80 is a better CPU than the 6502... them are fighting words. The Z80 has more registers, but the 6502 has some other features that the Z80 does not. In the end, both CPUs have strenghts and weaknesses, compared to the other.

I will point out that, at any given clock speed, the 6502 is at least 2x faster. In addition, Commodore's BASIC interpreter is more than 2x as fast as Spectrum BASIC. I've done some benchmarks on both (I have a Spectrum 128), and BASIC 2 blows Spectrum's BASIC out of the water in terms of sheer performance.

But don't get me started on that keyboard. That is the worst keyboard on any mass produced keyboard, ever. Seriously - who thought that was a good idea? Even the Spectrum 128's keyboard is pretty awful, compared to Commodore's keyboards. (Admittedly, none of Commodore's keyboards are great. You can buy a better PC keyboard today for $5 at WalMart.)

I think the Spectrum's biggest selling point was that it was cheap, and just about anyone could afford one. A Commodore 64 with a disk drive cost about $800 in the US in the early 80s, but a ZX could be had for $40. In fact, the Sinclair (the version we got in the US) was actually free, if you used the right combination of coupons and rebates.

And that's the other thing... the ZX Spectrum never actually saw a US release. So it was, literally, non-existent here.

The Timex Sinclair is based on the ZX80, as far as I can tell, and it was awful, even compared to the rubber-keyed Speccy you probably knew and loved. (I don't have an original Spectrum, but I do have the Recreated - and while it's still a horrible example of a keyboard, it's still less awful than than the ZX80.)
 

artik

New Member
Jan 5, 2020
22
1
3
I don't know that I'd agree that the PC tools for Spectrum are better. I've found the few Spectrum emulators out there to be primitive and awkward, compared to VICE.
Actually fuse with GTK front-end is very nice in comparison to vice (I don't know how it is on Windows)


Commodore's BASIC interpreter is more than 2x as fast as Spectrum BASIC.
I agree I saw the same behavior also it depends on the case, it many cases it was less than x2. On the other hand ZX Spectrum basic is way more feature rich. In both cases BASIC is just plain slow in comparison to code you can write in assembly/C/Pascal etc.

------

I tested my sample machine learning program both on C64 and spectrum and got following results:

BASIC/Spectrum/float: 291m /float ~x2 slower
BASIC/c64/float: 151m /float
z88dk C/Spectrum/fixed: 121s ~x4 faster
cc65 C/C64/fixed: 460s

See: http://blog.cppcms.com/post/125

C: https://github.com/artyom-beilis/zx_spectrum_deep_learning/blob/16_bit/train_commandore.c
Basic: https://github.com/artyom-beilis/zx_spectrum_deep_learning/blob/16_bit/train_no_buffer.bas
(with converted to c64 basic by https://github.com/artyom-beilis/zx_spectrum_deep_learning/blob/16_bit/sin2com.sh)

In any case I think that it is very interesting machine that is good to review moreb
 
May 22, 2019
597
303
63
Actually fuse with GTK front-end is very nice in comparison to vice (I don't know how it is on Windows)
If you've only used VICE on Linux or through an emulator front end... you haven't used VICE. You've used SDL VICE, which is a whole different world (visually speaking.) VICE, C64 PRG Studio (despite its bugs), and DirMaster (for making disk images) make for a complete ecosystem with a graphical IDE, debugger, and (of course) emulator that's just about as easy to use as it gets.

In any case I think that it is very interesting machine that is good to review moreb
Well, the problem is getting and using one in the US. They're difficult to obtain here, as you have to import one from the EU. Then, when you finally get one, you also have to import a television that does PAL video. Or you have to do a composite mod to the computer and use a video converter.

Not that these are insurmountable challenges for David, as he's done a composite mod on his Atari console, but the point is that the Spectrum is extremely unfriendly to North American users and basically impossible to use here as it was intended to be used.

I believe the only Spectrum that can be effectively used in the US without a PAL TV is the Spectrum 128 with the built-in cassette drive (the one I have), because it's the only one with composite video output on the DIN jack. In fact, you can use a Commodore 64 video cable with it. You still need a monitor or video converter capable of displaying PAL video, but the video converters are easy to come by - all of the HDMI converters I've tried can handle PAL just fine.

I think it would be wroth the time to do a video covering the way the Spectrum works, compared to a more conventional computer, since it was a huge thing in the UK and other parts of Europe, but most US viewers have ever used or even seen one.
 

artik

New Member
Jan 5, 2020
22
1
3
Then, when you finally get one, you also have to import a television that does PAL video.
I'm curios, because virtually every TV set even from late 90th I encountered supported both PAL and NTSC. Like today virtually all power suppliers work with both 110/220/230V, 50/60Hz.

Is it US thing that PAL isn't supported out of the box on modern TV Set?
 
May 22, 2019
597
303
63
No, TVs sold in the US do not support PAL. Many TVs in the US won't even support 50Hz digital video, as David found out when he tried to use his TheC64 Mini on his HDMI TV. There's probably also a financial motive, as this provides a natural sort of region locking, meaning movie companies can charge US customers more or video content, if they want.

The 50/60Hz power supply thing is a bit of a red herring: a switching regulator turns the power on and off rapidly, filling a capacitor with energy until it's just above the target voltage and then letting it drain until it's just below the target voltage. Since the input voltage doesn't really affect this process, it doesn't actually matter whether the input is 120 or 240 volts. The power supply just steps the voltage down to an intermediate voltage of around 20-40 volts, then rectifies that and feeds it to the regulator.

The difference between PAL and NTSC video is much more interesting. While PAL and NTSC use similar brightness and sync signals, PAL has more lines of resolution, and the color portion of the signal is completely different. So the video decoders need to be completely different to make the system work.

Obviously, including both decoders increases the cost of a television, and so TV manufacturers only include PAL decode and SCART inputs on sets going to Europe, where they are actually necessary. And since much more video content is exported from the US to the EU than the other way around, there's very little benefit to selling PAL TVs to US customers.
 
Last edited:

Aramis

New Member
Jan 29, 2020
15
4
3
When I start watching the 8-bit-guy as first I was surprised how little information was given on one of the most iconic microcomputers of 80th - the Sinclair ZX Spectrum.

It was the machine I grew with. Watching this channel I discovered that apparently US public virtually oblivious to it. And frequently if mentioned it is referred as "cheap toy for poor Brits" who couldn't afford the real Commandore 64 with "real" keyboard.
I suspect some rose colored lenses there...

I had a TS1000... it was a piece of ****. But, it was the best I could get... And I then proceeded to enjoy it despite it being the cheapest thing in the US market. And I'm still glad I did get it. I wish I'd been able to upgrade to the TS1500...

I read about the Spectrum, but it wasn't available for the US, and didn't do NTSC... if it had been, I'd have probably had one.

When we got a computer for the family the next year, 't weren't for me. Dad's (now mine) Kaypro II...
 
May 22, 2019
597
303
63
The Spectrum was definitely a better machine than the TS1000. As far as I can tell, the Timex Sinclair 1000 was based on the ZX80, which was an older machine.

Either way... there were several Spectrum designs with improved keyboards, disk drives, and with more memory. I have a 128+, which incorporates a tape drive and is basically the only model that works in the US without modifications It has a DIN output port that outputs composite, like the Commodore 64 and Atari computers. It's still PAL video, but my Dell FP2001 has no problem with PAL.

One of these days, I want to dig in and see what it takes to write assembly code on the Spectrum. I have wanted to get back in to 8080/Z80 assembly for a while, and while I've been using the Altair to scratch that itch a little bit, those are also super limited, not having graphics or sound.
 

artik

New Member
Jan 5, 2020
22
1
3
I suspect some rose colored lenses there...

I had a TS1000... it was a piece of ****. But, it was the best I could get.
There is really huge difference between ZX80/81 and ZX Spectrum. Spectrum was very different machine that started game development boom in UK and spread around the Europe and through the iron curtain with its clone to USSR.

Unlike ZX80/81/Timex TS 1000 Spectrum was in the same class as C64 (and arguably better than in many areas)

The most common and widely used was 48K Spectrum.

It had a simple but very powerful design. For example it hadn't character screen mode - only raster one - similar to C64 hi res mode but 256x192 instead of 320x200. It greatly simplified graphics output design handled by ULA - making it more affordable and simple to work with (and actually clone it). It had no sprites but most of developers managed it quite ok in software.

This platform is considered one that sparkled development of isometric video games (Ant Attack and Knight Lore) - since "Sprites" wasn't the de-facto way of making game graphics.

Sinclair BASIC was arguably slower than of C64 derivative of MS Basic but was vastly superior in virtually all other areas.

For example, drawing/graphics support built in (without slow peeking/poking) and since it had single video mode it allowed trivial handling of both text and graphics together. Silcair BASIC had 8 significant variable character instead of 2. Being able to name a variable "diff" wasn't an issue ;-) and in general its edit was somewhat non-standard but very powerful and convenient with built in syntax checking.

For UK and Europe (and even more so beyond the iron curtain) Spectrum was as important as C64 in USA. Also it hadn't made it to the business and was primary home computer it had huge impact on kids who started programming on it. As a kid I waited for journals with descriptions of programs, review of various features and techniques etc, learned development, assembly interrupts etc.
 

artik

New Member
Jan 5, 2020
22
1
3
One of these days, I want to dig in and see what it takes to write assembly code on the Spectrum. I have wanted to get back in to 8080/Z80 assembly for a while,
Small notice, Z80 is very different and way advanced in comparison to 8080

For example this is 8080 instruction set: https://pastraiser.com/cpu/i8080/i8080_opcodes.html
And this is z80: http://clrhome.org/table/

Just some samples of what z80 provides

- 16 bit arithmetic instructions like add hl,de/sbc hl,de
- bit instructions test/res/set/rotation/shifting for each register
- Loop instruction djnz (decriment b and jump if not zero)
- ix/iy registers with offset that can be used as operand were ever (hl) can be used. HUGELY important for C and stack based languages like Pascal since allows easy accessing parameters on stack - providing stack frames and base pointer. It allows having an operand without loading value to a register, consider counter dec (ix+nn) that does not waste a register. It is like having two 0 pages at arbitrary location controlled by two register.
- memcpy instructions like LDIR (ld (de),(hl) dec bc and repeat of not z)
- And last but not least duplicate set of hl/de/bc/af that can be swapped - very helpful for arithmetic calculations with large number of bits.

I wouldn't put them into same line even closely
 
Last edited:
May 22, 2019
597
303
63
Small notice, Z80 is very different and way advanced in comparison to 8080

For example this is 8080 instruction set: https://pastraiser.com/cpu/i8080/i8080_opcodes.html
And this is z80: http://clrhome.org/table/

Just some samples of what z80 provides

- 16 bit arithmetic instructions like add hl,de/sbc hl,de
- bit instructions test/res/set/rotation/shifting for each register
- Loop instruction djnz (decriment b and jump if not zero)
- ix/iy registers with offset that can be used as operand were ever (hl) can be used. HUGELY important for C and stack based languages like Pascal since allows easy accessing parameters on stack - providing stack frames and base pointer. It allows having an operand without loading value to a register, consider counter dec (ix+nn) that does not waste a register. It is like having two 0 pages at arbitrary location controlled by two register.
- memcpy instructions like LDIR (ld (de),(hl) dec bc and repeat of not z)
- And last but not least duplicate set of hl/de/bc/af that can be swapped - very helpful for arithmetic calculations with large number of bits.

I wouldn't put them into same line even closely
That's true, there are additional instructions in the Z80, but the Z80 is still just an extension of the 8080 and designed to be backward compatible. This is why the Altair was able to run a Z80 CPU without breaking its software base, for example. My Altairduino actually has a software switch that lets me swap back and forth between the two CPUs. I just set it to Z80 and leave it there. =)

if you look at the two charts you posted, the 1-byte instructions are all the same. The difference is that Zilog added the two byte instructions, which add the new functionality.

I've been debating which way to go - to try to get a real MSX machine, just use the emulator, or whether to try to use the Spectrum I have now. Right now, I'm leaning toward using an MSX emulator and seeking out a real computer - probably an FPGA based machine. Or I may just stick with the MISTer and not bother with another physical computer. (After all, my Commodore collection already takes up too much of my closet.)
 

artik

New Member
Jan 5, 2020
22
1
3
That's true, there are additional instructions in the Z80, but the Z80 is still just an extension of the 8080 and designed to be backward compatible.
Clearly but these extensions significantly affect the way you code. 8080 code will not be nearly as efficient as Z80 optimized one.
 

Aramis

New Member
Jan 29, 2020
15
4
3
There is really huge difference between ZX80/81 and ZX Spectrum. Spectrum was very different machine that started game development boom in UK and spread around the Europe and through the iron curtain with its clone to USSR.

Unlike ZX80/81/Timex TS 1000 Spectrum was in the same class as C64 (and arguably better than in many areas)

The most common and widely used was 48K Spectrum.
The biggest problem for the TS line was that the TS1000 was not perceived as a useful box... poor for games, and useless for business.

The market differences for computers in the US vs UK were huge... between the jingoism of the US in the 80's, and 3 homegrown powerhouse brands of the late 70's... the TS1000 was laughable, save for the price.

We also had dedicated gaming consoles... the ones everyone knew were the Atari 2600 and later 5200, the Intellivision, and the Colecovision/Adam. Some of the best games were for the Odyssey 2 (O²), but Magnavox was having a hard time with it, as it wasn't even up to the Intellivision's graphics. (O² had 2 or 3 mixed boardgame/videogame games... Quest for the Rings was freaking AWESOME.)

I only found out about the Speccie since 2010... I figure every nerd in Alaska had heard of the ZX80 and ZX81... they were advertised heavily in science and tech mags, right alongside the Heathkit/Zenith computer kits. But I can't recall ever seeing a Spectrum advert.
 

artik

New Member
Jan 5, 2020
22
1
3
We also had dedicated gaming consoles...
This is another point that had strong impact for Spectrum. SW was distributed on regular cassette tapes, everybody had tape recorder so you get your storage device for free and it made it much easier for everyone to write and sell programs since the media itself was much more affordable then a cartridge.

Common story was guys wrote a game put it on tape and got to publisher, if the game was any good... it was done deal.

In any case it is clear for me that it was one huge unknown area/device for USA users

There was TS2068 and (from what I read) NTSC Spectrums but they were not successful at all.
 
Last edited:
May 22, 2019
597
303
63
I have actually looked at the TS2068 and nearly bought one. IIRC, the problem is that it's largely incompatible with Spectrum software.

But yeah - it's partly that it's unknown and partly that it is largely unavailable here, except in emulation. It would be nice to see David do an episode on it, though, since it was hugely influential in Europe - and from what I understand, there was a huge underground, homebrew market in Russia.
 

denizen

New Member
Feb 3, 2020
2
1
1
I too grew up with the ZX Spectrum and although it's keyboard was terrible, the "Speccy" as people referred to it, was capable of an impressive array of software. A few software houses in the UK only developed exclusively for it making it unique in some ways. Even certain games were superior on it compared to the C64. Off the top of my head, Enduro Racer, Cobra, Ghosts N' Goblins & R-Type. Forever was the superiority war between both machines and I've heard all the sides.

To me, both machines offered something. I felt they were the Yin and the Yang. Where one machine excelled the other did not and vice versa. It would not be fair to criticize either because they both offered great advantages. Many times the Spectrum went against all odds and offered impressive titles which contradicted what it could not do. Titles such as Abadia Del Crimen, Where Time Stood Still, Operation Wolf & even Dan Dare 3 became known for their impressive programming. Color clash was a problem for the machine but then developers at times tried to work around it with larger sprites. Companies such as Special FX who were ex-employees of Ocean started working on impressive titles too and even had great music to accompany them.

Upon looking at the Speccy, it's clear it was a Brit machine. It's reputation with the Code Masters and their budget titles paid off. Mastertonic, another budget house from the UK released many great titles, one of which i fondly remember: Terminus: The Prison Planet .

Perhaps an episode briefly touching on the Spectrum would be great. David could possibly reach out to a Spectrum fan for further info if need be.
 

aowen10

New Member
Jun 17, 2019
13
5
3
To put it into context, the ZX Spectrum had a shorter life span and sold fewer machines than the Apple II (a computer with a similar design ideology). The ZX Spectrum might have outsold the Atari 8-bit computers, but it sold primarily as a games machine and it never did anything like the numbers of the Atari 2600 (25 million).
 
May 22, 2019
597
303
63
To put it into context, the ZX Spectrum had a shorter life span and sold fewer machines than the Apple II (a computer with a similar design ideology). The ZX Spectrum might have outsold the Atari 8-bit computers, but it sold primarily as a games machine and it never did anything like the numbers of the Atari 2600 (25 million).
wait... what? The Apple II was much more like an IBM PC or S100 computer, with 8 bit expansion slots and a flexible configuration. If I was going to compare the Spectrum to anything, it would not be the Apple II.
 

aowen10

New Member
Jun 17, 2019
13
5
3
wait... what? The Apple II was much more like an IBM PC or S100 computer, with 8 bit expansion slots and a flexible configuration. If I was going to compare the Spectrum to anything, it would not be the Apple II.
The IBM PC was built from off-the-shelf parts. I can't comment on the S100. The Apple II was designed by Woz to be as cheap as possible, a similar philosophy to the Spectrum. Both had a video display that was kind of a hack that almost but not quite met the relevant standard. Both used their own version of BASIC rather than pay a fee to Microsoft (granted later Apple IIs shipped with MS BASIC). Both had a non-linear framebuffer. Both had a simple speaker for sound. In terms of expansion, you could daisy-chain a virtually unlimited number of devices off the edge connector on the Spectrum (although Timex suggested not using more than two at once).
 

artik

New Member
Jan 5, 2020
22
1
3
To put it into context, the ZX Spectrum had a shorter life span and sold fewer machines than the Apple II (a computer with a similar design ideology). The ZX Spectrum might have outsold the Atari 8-bit computers, but it sold primarily as a games machine and it never did anything like the numbers of the Atari 2600 (25 million).
‎The closest computer similar to ZX Spectrum in US was Commandore 64.

Atari 2600 was cartridge based gaming console while ZX Spectrum was fully functioning computer. Most of its users played games like on C64 but it sparkled a huge interest in programming in many kids (like myself) it had huge impact on software development industry - by creating huge number of home brewed SW developers and SW development houses.

Apple II was a machine from different period with different price range and different target audience.