March 5, 1981: Timex Sinclair ZX81 Launched (2018)(dayintechhistory.com)
dayintechhistory.com
March 5, 1981: Timex Sinclair ZX81 Launched (2018)
https://dayintechhistory.com/dith/march-5-1981-timex-sinclair-zx81-launched/
82 comments
It also claims that “the Z80 CPU at 3.25 MHz was actually faster than the Apple II processor (1.08 MHz).” This is, pedantically, true, in that the oscillator is ringing faster. However, the 6502 completes more work per clock cycle than the Z80 does. A single-byte instruction (such as “increment the A register”) takes 2 clock cycles on 6502, 4 cycles on the Z80. More complicated instructions can take up to 7 cycles on the 6502 and 20+ on the Z80. The estimate I use is that a 6502 is approximately 3x faster clock-for-clock than a Z80.
Also, the Apple II CPU didn’t spend 70% of its time drawing the screen! It had separate video hardware that transparently interleaved with the unused back half of the CPU clock cycle. The ZX81 was tricked into “executing” sequential screen-memory addresses in a very tight loop by falsifying its data bus with a NOP instruction. Fancier computers would use dedicated DMA hardware. Not Sinclair!
Also, the Apple II CPU didn’t spend 70% of its time drawing the screen! It had separate video hardware that transparently interleaved with the unused back half of the CPU clock cycle. The ZX81 was tricked into “executing” sequential screen-memory addresses in a very tight loop by falsifying its data bus with a NOP instruction. Fancier computers would use dedicated DMA hardware. Not Sinclair!
I'm not sure about this simple comparison of 6502 vs. Z80. Sure the Z80 instructions had higher latencies in clocks, but it also had more registers so you could write the same code with fewer memory load/stores and it had a 16-bit ALU. It also had a fair offering of complex instructions that, while very high-latency, should be faster than the equivalent sequence of simpler instructions and also helped with code density which was critical in systems with a max of 64KB (see https://web.eece.maine.edu/~vweaver/papers/iccd09/iccd09_den...).
For one data point in performance, theultimatebenchmark.org has some Forth benchmarks that apparently show a 4GHz Z80 beating the 6502 by 2X (best scores for each: mc-CP/M Z80 4Mhz / FIG-Forth 1.1 / Fib2 = 1m19s, Apple II 1Mhz / Apple GraForth / Fib2 = 2m19s).
Disclaimer: biased, veteran Z80 / ZX Spectrum programmer ;)
For one data point in performance, theultimatebenchmark.org has some Forth benchmarks that apparently show a 4GHz Z80 beating the 6502 by 2X (best scores for each: mc-CP/M Z80 4Mhz / FIG-Forth 1.1 / Fib2 = 1m19s, Apple II 1Mhz / Apple GraForth / Fib2 = 2m19s).
Disclaimer: biased, veteran Z80 / ZX Spectrum programmer ;)
Previously in 6502 vs Z80: https://news.ycombinator.com/item?id=10766006
Thanks! Replying a bit here since that post is from 2015. One can write anecdotal examples that are biased both ways. But let's talk about a single issue, the IX/IY registers.
The IX/IY registers are heavyweight but one needs to remember the "best-practices" of that era and architecture. In well optimized Z80 code, the IX/IY registers are often used for critical "global variables" that you can keep all the time in registers across many subroutine calls (think "segment registers": base pointers for important tables or buffers that are not fixed addresses through the whole program). Their performance beats needing frequent indirect load/store from pointers stored in memory via other registers that often need to be preserved/restored.
You can also use some relatively low-latency instructions that involve IX/IY, in particular PUSH/POP were often used in optimized buffer-copy routines: you burn all registers to fetch up to 20 bytes of contiguous data with POPs, then you patch the SP register and issue PUSHs in inverse order to store those 20 bytes in another location; loop if needed for >20 bytes, even with loop overhead this is faster than LDIR/LDDR. Games used that trick all the time for block copies like sprite bitblt or double-buffer animation.
I'll be more convinced by realistic benchmarks, and yes the Fib2 that I quoted before is not impressive even for the standards of CPU microbenchmarks, but maybe someone would know some real-world code that had good ports to both CPUs and could give a better verdict. Unfortunately games are never good choices, the 8-bit systems had radically different architectures for essential features like video and audio so "ports" were often full rewrites even at a high level like rendering strategies... there might be exceptions, like the AI component of a chess game.
The IX/IY registers are heavyweight but one needs to remember the "best-practices" of that era and architecture. In well optimized Z80 code, the IX/IY registers are often used for critical "global variables" that you can keep all the time in registers across many subroutine calls (think "segment registers": base pointers for important tables or buffers that are not fixed addresses through the whole program). Their performance beats needing frequent indirect load/store from pointers stored in memory via other registers that often need to be preserved/restored.
You can also use some relatively low-latency instructions that involve IX/IY, in particular PUSH/POP were often used in optimized buffer-copy routines: you burn all registers to fetch up to 20 bytes of contiguous data with POPs, then you patch the SP register and issue PUSHs in inverse order to store those 20 bytes in another location; loop if needed for >20 bytes, even with loop overhead this is faster than LDIR/LDDR. Games used that trick all the time for block copies like sprite bitblt or double-buffer animation.
I'll be more convinced by realistic benchmarks, and yes the Fib2 that I quoted before is not impressive even for the standards of CPU microbenchmarks, but maybe someone would know some real-world code that had good ports to both CPUs and could give a better verdict. Unfortunately games are never good choices, the 8-bit systems had radically different architectures for essential features like video and audio so "ports" were often full rewrites even at a high level like rendering strategies... there might be exceptions, like the AI component of a chess game.
This discussion makes me feel young again! :-)
Right. They were really simplified, and up against US economies of scale that meant less simple machines could be made at competitive prices.
I think Timex's main projection was that the Sinclair machines would be affordable over the long term. But I guess in the USA, the competition became cheaper much faster than they expected.
Over in the UK, as well as more expensive imported Commodore machines, the native competition included the very expensive BBC Model B and its cousin the Acorn Electron, the beloved and excellent Dragon 32, the quite inexpensive Jupiter Ace (think ZX81/Spectrum but running FORTH natively!), and Tangerine's Oric-1, which was adorable, and as with the Amstrad CPC sold well in France, expanding its market size a bit.
The Spectrum 48K did well against them on price-performance, though the Oric-1 was often cheaper and is arguably the better device.
In the USA, much larger economies of scale meant that the C64 was more affordable, and for cheaper machines the Spectrum was up against the VIC-20 and Atari 400, and even Mattel wanted a chunk of the low-end in that same period of time with the Aquarius (which is similarly simple Z80 stuff).
I think Timex's main projection was that the Sinclair machines would be affordable over the long term. But I guess in the USA, the competition became cheaper much faster than they expected.
Over in the UK, as well as more expensive imported Commodore machines, the native competition included the very expensive BBC Model B and its cousin the Acorn Electron, the beloved and excellent Dragon 32, the quite inexpensive Jupiter Ace (think ZX81/Spectrum but running FORTH natively!), and Tangerine's Oric-1, which was adorable, and as with the Amstrad CPC sold well in France, expanding its market size a bit.
The Spectrum 48K did well against them on price-performance, though the Oric-1 was often cheaper and is arguably the better device.
In the USA, much larger economies of scale meant that the C64 was more affordable, and for cheaper machines the Spectrum was up against the VIC-20 and Atari 400, and even Mattel wanted a chunk of the low-end in that same period of time with the Aquarius (which is similarly simple Z80 stuff).
>I think Timex's main projection was that the Sinclair machines would be affordable over the long term. But I guess in the USA, the competition became cheaper much faster than they expected.
The competition became cheaper much faster than anyone expected.
The Timex Sinclair 1000's introduction in the US in 1982 caused the US home computer industry to believe that they had to enter the sub-$100 market. Tandy introduced the MC-10 (<https://en.wikipedia.org/wiki/TRS-80_MC-10>) as a cut-down version of its Color Computer, and TI designed the 99/2 as a cut-down version of its 99/4A. Two unexpected things happened:
* Americans, more wealthy than Britons or Europeans, viewed $99 computers as toys.
* Commodore's Jack Tramiel began a massive price war that drove the retail price of existing, more capable home computers down to $99. In 1983 the Commodore VIC-20 and TI 99/4A reached the $99 price point. TI thus never introduced the 99/2 despite having it ready for production.
The VIC-20 and 99/4A received substantial third-party support; the Timex Sinclair 1000 and MC-10 did not, and quickly disappeared from the market.
The competition became cheaper much faster than anyone expected.
The Timex Sinclair 1000's introduction in the US in 1982 caused the US home computer industry to believe that they had to enter the sub-$100 market. Tandy introduced the MC-10 (<https://en.wikipedia.org/wiki/TRS-80_MC-10>) as a cut-down version of its Color Computer, and TI designed the 99/2 as a cut-down version of its 99/4A. Two unexpected things happened:
* Americans, more wealthy than Britons or Europeans, viewed $99 computers as toys.
* Commodore's Jack Tramiel began a massive price war that drove the retail price of existing, more capable home computers down to $99. In 1983 the Commodore VIC-20 and TI 99/4A reached the $99 price point. TI thus never introduced the 99/2 despite having it ready for production.
The VIC-20 and 99/4A received substantial third-party support; the Timex Sinclair 1000 and MC-10 did not, and quickly disappeared from the market.
BTW, the Jupiter Ace and ZX81 both have excellent iOS emulators, written by Kevin Palser.
Ahh, nice.
The Jupiter Ace is one of the great "someone really made that a product?" things, lost to history. It had a flimsy shell and bad keys from what I remember reading, but it's amazing it became a product at all.
There's a lot more of this stuff going on again in the microcontroller world; perhaps partly out of reminiscence.
The Jupiter Ace is one of the great "someone really made that a product?" things, lost to history. It had a flimsy shell and bad keys from what I remember reading, but it's amazing it became a product at all.
There's a lot more of this stuff going on again in the microcontroller world; perhaps partly out of reminiscence.
Designed by two of the people who designed the ZX81 and Spectrum.
It was a nerd-fantasy product designed by two unusually clever people to scratch their own itch, with no thought to ecosystem, culture, media support, visual design, or product-market fit.
And then it ran into production difficulties. They still managed to sell a few thousand, but it was never going to be a huge success.
One of those unfortunate situations where high IQ - clearly available - didn't correlate with business sense.
It was a nerd-fantasy product designed by two unusually clever people to scratch their own itch, with no thought to ecosystem, culture, media support, visual design, or product-market fit.
And then it ran into production difficulties. They still managed to sell a few thousand, but it was never going to be a huge success.
One of those unfortunate situations where high IQ - clearly available - didn't correlate with business sense.
Right.
Really utter madness in so many ways but a thing of its time.
I am reminiscing right now about two whole volumes of the Orbis collectible magazine, The Home Computer Course.
I believe I have a complete set stashed away; it has amazing photos of the insides of all of these machines, including the Jupiter Ace.
Really utter madness in so many ways but a thing of its time.
I am reminiscing right now about two whole volumes of the Orbis collectible magazine, The Home Computer Course.
I believe I have a complete set stashed away; it has amazing photos of the insides of all of these machines, including the Jupiter Ace.
Although, Timex (technically) was the manufacturer. The ZX Spectrum, at least, was built in the Timex factory in Dundee [0]
[0] https://www.bbc.co.uk/news/business-29122873
[0] https://www.bbc.co.uk/news/business-29122873
And some trace the history of Grand Theft Auto and Lemmings back to this factory and the local boom in computers it produced, with one of the Rockstar North founders working in the Timex factory before creating his first game:
https://www.nostalgianerd.com/from-dma-to-gta-the-story-of-d...
Yes -- though this was under contract, I guess.
(Like how the Raspberry Pi is manufactured under contract by Sony in Wales)
(Like how the Raspberry Pi is manufactured under contract by Sony in Wales)
Yes, exactly. The article is still very wrong.
Absolutely correct. Thank you for typing it out in such an eloquent, yet curmudgeonly, fashion. It saved me from having to do it!
Timex did manufacture the ZX81 in the UK at their Dundee factory:
https://www.thecourier.co.uk/fp/past-times/2030845/dundee-wa...
https://www.thecourier.co.uk/fp/past-times/2030845/dundee-wa...
Timex Sinclair was a joint venture to market the ZX81 in the US. I don't remember Timex ever being used in the UK at the time?
https://en.wikipedia.org/wiki/Timex_Sinclair
https://en.wikipedia.org/wiki/Timex_Sinclair
> I don't remember Timex ever being used in the UK at the time?
No, indeed it wasn't -- perhaps my initial comment wasn't clear. (Some of that might be the latent British rage of the overlooked)
I've amended a bit.
(In fact I doubt the Timex Sinclair devices even worked here, and vice versa, hence the need for a manufacturing deal that dealt with needing NTSC and 60hz power etc.)
No, indeed it wasn't -- perhaps my initial comment wasn't clear. (Some of that might be the latent British rage of the overlooked)
I've amended a bit.
(In fact I doubt the Timex Sinclair devices even worked here, and vice versa, hence the need for a manufacturing deal that dealt with needing NTSC and 60hz power etc.)
NTSC just needed a different modulator; and the ZX81 used a simple transformer/bridge rectifier/smoothing capacitor brick to convert to 9v DC, with a regulator in the computer to convert down to 5v, so 60Hz wouldn't have been an issue, although the mains power connector is obviously different.
So, there's nothing special about a machine for the US market that required it to be manufactured there. Presumably it was commercially preferable to do so.
You're correct though that a US model wouldn't work in the UK without modification, and vice versa.
So, there's nothing special about a machine for the US market that required it to be manufactured there. Presumably it was commercially preferable to do so.
You're correct though that a US model wouldn't work in the UK without modification, and vice versa.
I've still got the original Sinclair ZX81 bought in March 1981 (but not delivered until 1st week of June 1981 due to demand) and it still works, even with its wobbly 16KiB RAM Pack!
Much fun was had programming in machine language by looking up op-codes in Rodney Zak's "Programming the Z80" and counting the clock cycles to figure out the most efficient set of op-codes. As I recall the fastest op-code requires 4 clock cycles but some instructions would need more than 10 so much performance could be gained by knowing and optimising. This was before there was a Z80 assembler available so the hex of those op-codes had to be typed and POKEd into memory from the BASIC interpreter.
A side-note - don't forget the ZX81 was preceded by the Sinclair ZX80 in 1980 [0].
Much fun was had programming in machine language by looking up op-codes in Rodney Zak's "Programming the Z80" and counting the clock cycles to figure out the most efficient set of op-codes. As I recall the fastest op-code requires 4 clock cycles but some instructions would need more than 10 so much performance could be gained by knowing and optimising. This was before there was a Z80 assembler available so the hex of those op-codes had to be typed and POKEd into memory from the BASIC interpreter.
A side-note - don't forget the ZX81 was preceded by the Sinclair ZX80 in 1980 [0].
FYI, the retro community have developed an internal 16Kb 'daughter board' so you can finally ditch that unreliable wobbly ram pack.
Also, there's a 'composite mod' which replaces the RF modulator, and gives you rock solid composite image on modern TVs.
Also, there's a 'composite mod' which replaces the RF modulator, and gives you rock solid composite image on modern TVs.
Modern TVs don't have a composite input. :)
To explain further: The internal composite signal of the ZX81 (before it hits the RF modulator) has a poor "back porch"[1] signal, which prevents a lot of digital TVs from showing a steady image of the ZX81s screen. The composite mod for the ZX81 rectifies this, so the composite output can be feed into either a modern TV that still has a composite input, or an inexpensive composite-to-HDMI converter.
---
[1] https://en.wikipedia.org/wiki/Horizontal_blanking_interval
---
[1] https://en.wikipedia.org/wiki/Horizontal_blanking_interval
I don't think that's actually true. Even my shiny new Sony 4K HDR TV, bought literally this year, has a single composite input.
It's certainly being phased out, but it's not gone yet.
It's certainly being phased out, but it's not gone yet.
My new Phillips 4K OLED does not, which I only discovered when I wanted to connect my https://en.wikipedia.org/wiki/C64_Direct-to-TV to it.
It's a shame they didn't have SCART output.
My ZX81 had audio.
The ZX81 was so badly shielded with its thin plastic case it would make nearby radios go crazy. You could tune a MW radio off-station, put it close to the computer and listen to code executing. It made different sounds depending on what loops it was in. That was how I was able to make "computer music" in 1981, by poking little "machine code" routines into RAM and running them to make "songs" come out the radio.
The ZX81 was so badly shielded with its thin plastic case it would make nearby radios go crazy. You could tune a MW radio off-station, put it close to the computer and listen to code executing. It made different sounds depending on what loops it was in. That was how I was able to make "computer music" in 1981, by poking little "machine code" routines into RAM and running them to make "songs" come out the radio.
Ah yes my first computer, still have it in the garage, keep wanting to spend some time and see if I can get it to boot again.
My Dad built it from a kit, can still remember him spending all night soldering it. Literally set the direction of my life/career.
We didn't have any permanent storage at first, so I would type basic programs in by hand like games from magazines and play them, then it was lost on power cycle, so if I felt like playing I had to retype, talk about learning programming through repetition.
Eventually we got an audio cassette recorder working which took like 10-20 minutes to save and load a small basic program, was torture. Eventually upgraded to C64 but still needed audio cassettes for a while the 5 1/4" floppy drive was much more than the computer itself but when we finally got it felt like the future being able to quickly load and save programs!
My Dad built it from a kit, can still remember him spending all night soldering it. Literally set the direction of my life/career.
We didn't have any permanent storage at first, so I would type basic programs in by hand like games from magazines and play them, then it was lost on power cycle, so if I felt like playing I had to retype, talk about learning programming through repetition.
Eventually we got an audio cassette recorder working which took like 10-20 minutes to save and load a small basic program, was torture. Eventually upgraded to C64 but still needed audio cassettes for a while the 5 1/4" floppy drive was much more than the computer itself but when we finally got it felt like the future being able to quickly load and save programs!
Don't just plug it in! The power supply and voltage regulator are notorious for going bad, and on the ZX81 they can fry the RAM chips (which are hard to get and even harder to desolder and replace). Watch some reputable online videos about restoring this computer first.
Commodore 64 power supplies fail similarly.
The voltage regulator on the 5V line fails causing higher voltage to be fed to the motherboard potentially frying every chip on the board.
https://retrogamestart.com/answers/replace-c64-power-supply-...
The voltage regulator on the 5V line fails causing higher voltage to be fed to the motherboard potentially frying every chip on the board.
https://retrogamestart.com/answers/replace-c64-power-supply-...
Took my TS 1000 out about THIRTY years ago - plastic membrane keyboard leads cracked with age, could no longer type (arguably only a minor loss compared to when the keyboard was working :-)
Not sure about the US variant, but UK keyboard membrane replacements are available: https://zxrenew.co.uk/Keyboard-Membranes-c20672681
I also still have mine somewhere. With the 16KB expansion pack...
Nah, it was a lot less than 10-20 minutes. Quick research says ~300bps so a 1KB program should save/load at about 27 seconds.
Nah, it was a lot less than 10-20 minutes. Quick research says ~300bps so a 1KB program should save/load at about 27 seconds.
Memory kind of blurs together, but probably was doing larger programs with the tape, 5-9 minutes for a 16kb program [1], felt like forever.
Also might be mixed with memories of the C64 cassette which is 30 minutes per 100kb per side [2] so 20 minutes for a 64kb program.
I remember it being torture waiting as kid, and I believe it was not always successful and prone to error reading and requiring retries which maybe never worked, seemed like 50/50 chance and eating up lots of time.
1. https://www.sinclairzxworld.com/viewtopic.php?t=39
2. https://en.wikipedia.org/wiki/Commodore_Datasette
Also might be mixed with memories of the C64 cassette which is 30 minutes per 100kb per side [2] so 20 minutes for a 64kb program.
I remember it being torture waiting as kid, and I believe it was not always successful and prone to error reading and requiring retries which maybe never worked, seemed like 50/50 chance and eating up lots of time.
1. https://www.sinclairzxworld.com/viewtopic.php?t=39
2. https://en.wikipedia.org/wiki/Commodore_Datasette
[deleted]
Oh my, the memories!
I remember sitting on a big swivel chair late into the night in front of a 13" black and white TV writing programs and attempting, mostly in vain, to save them to a cassette tape.
At 15 I should have been out chasing girls instead but what can ya do...
I remember sitting on a big swivel chair late into the night in front of a 13" black and white TV writing programs and attempting, mostly in vain, to save them to a cassette tape.
At 15 I should have been out chasing girls instead but what can ya do...
That's the wonder of the internet.
While i cannot say i was a first mover with the ZX81, many hours was spent typing in hex codes on the ZX Spectrum in the hope that a great game would appear.
Odd to think that the ZX81 is now some 40 years old.
While i cannot say i was a first mover with the ZX81, many hours was spent typing in hex codes on the ZX Spectrum in the hope that a great game would appear.
Odd to think that the ZX81 is now some 40 years old.
Arguably the most important computer in British history with respect to enabling access to the general public rather than niche segments and tech enthusiasts.
Important also as the predecessor of the monster that was the adored Speccy, and it's competitors from Commodore etc.
At least in the UK, this is where the home computer began.
Important also as the predecessor of the monster that was the adored Speccy, and it's competitors from Commodore etc.
At least in the UK, this is where the home computer began.
I was super impressed how they got high resolution graphics out of the ZX81 which only has characters not a user programmable bitmapped display
https://retrocomputing.stackexchange.com/questions/6134/how-...
https://youtu.be/iW8QoL4NYkU
https://retrocomputing.stackexchange.com/questions/6134/how-...
https://youtu.be/iW8QoL4NYkU
These are really impressive "misuses" of the technology available. VERY impressive.
I loved mine and learned BASIC with it. Unfortunately the RAM expansion had this undesirable auto-reset feature. If I only had known that the defect RAM expansion could be fixed with a bit of tape...
I recently replaced a broken DRAM chip on one of those! https://blog.qiqitori.com/2022/02/testing-a-zx81-ram-pack-wi... (this is more about finding which one is the broken one than about the actual replacement)
The one I had doesn't seem very wobbly though. Maybe there is some variation between production runs etc.?
The one I had doesn't seem very wobbly though. Maybe there is some variation between production runs etc.?
Ah yes, the RAM pack wobble. Was common as heck upon the original Sinclair expansion. There was however 3rd party RAM upgrades and those in comparision proved less prone to such wobble and with that regard, I was pretty alright with the one I setteled upon. But such PCB edge connectors were common then, less so these days.
I had the Memopack 16k and it even fitted the "High"Resolution graphics pack on top. But then I also soldered a flat cable to an external keyboard which was much nicer to type on an did not wiggle the whole stack with every key stroke.
Or a bit of blu-tack, in the shape of a runner bean...
Nice reference there! Micro Men really is a great docu-drama, it really feels like it captures the time very well.
As my first computer was a BBC Micro, it really struck a chord. It’s great seeing the specs for the (yet to be built) ARM chip on the board in the Acorn office, and it’s also awesome that Sophie Wilson playing the barmaid too!
For those that haven’t seen it, it’s definitely worth a watch [1]
[1] https://youtu.be/XXBxV6-zamM
As my first computer was a BBC Micro, it really struck a chord. It’s great seeing the specs for the (yet to be built) ARM chip on the board in the Acorn office, and it’s also awesome that Sophie Wilson playing the barmaid too!
For those that haven’t seen it, it’s definitely worth a watch [1]
[1] https://youtu.be/XXBxV6-zamM
An absolutely brilliant bit of creative work, indeed.
Nothing else has ever really conveyed that Clive Sinclair wasn't a sort of little professorial boffin the way the British press portrayed him; he was very business-focussed and evidently had quite a presence.
(Common to the almost concurrent misportrayal of John Major as a small, retiring, grey man)
Nothing else has ever really conveyed that Clive Sinclair wasn't a sort of little professorial boffin the way the British press portrayed him; he was very business-focussed and evidently had quite a presence.
(Common to the almost concurrent misportrayal of John Major as a small, retiring, grey man)
I've heard that he was quite the party animal as well, something which doesn't quite seem to have been covered by the show (albeit some aspects hinted at tangentially).
It's wonderful. I've pretty much watched it to death, but still occasionally have another go.
Mine had the unfortunate 'let out the magic smoke' feature :/
Which fortunately led to the upgrade to an Atari 800 :)
"The Sinclair ZX81 only had 1 kB RAM with option to upgrade to 16 kB."
If you're wondering "what can you do in 1kb of RAM?", how about a complete computer game of chess? The YouTube channel Nostalgia Nerd compares the 1981 '1K ZX Chess' program with a more modern chess engine. How do they stack up?
A game of Chess: 1981 1KB Computer vs. Modern PC https://www.youtube.com/watch?v=R3By_rdwxSg
If you're wondering "what can you do in 1kb of RAM?", how about a complete computer game of chess? The YouTube channel Nostalgia Nerd compares the 1981 '1K ZX Chess' program with a more modern chess engine. How do they stack up?
A game of Chess: 1981 1KB Computer vs. Modern PC https://www.youtube.com/watch?v=R3By_rdwxSg
David Given, who posts on here sometimes, did a great video about the process of coding a game on an unexpanded ZX81: http://cowlark.com/2018-09-26-zx81-programming/index.html
That's recently been ported to work as a lichess AI
https://fosdem.org/2022/schedule/event/retro_chess/
(by the same author as the book 20 GOTO 10)
https://fosdem.org/2022/schedule/event/retro_chess/
(by the same author as the book 20 GOTO 10)
Yes, and it is our lot that decries software bloat. We know what can be done with K bytes, why do we need K * K * K to simply boot?
Ever written anything in assembly? We trade cycles and bytes for programmer convenience. Assembly code heavily optimized for size will do things that are absolutely horrifying from a maintenance or general "architectural cleanliness" angle. Terribleness you might encounter:
* Reading instructions as constants because the values you need happen to already be in the code.
* Self-modification, including writing variables as constants into the instruction stream, generating instructions at run-time, and reusing code space as data space for one-once code.
* Using bits in the opcodes to store data, since a single bitflip doesn't affect the interpretation of some instructions. E.g. on the Z80 if Z and C are both always 1 at a particular point, you can use either jrz (0010 1000) or jrc (0011 1000) and use the 5th bit in that instruction as a flag. Free storage!
I do find this sort of thing fun. As a hobby. I wouldn't want to write an air traffic control system that way.
* Reading instructions as constants because the values you need happen to already be in the code.
* Self-modification, including writing variables as constants into the instruction stream, generating instructions at run-time, and reusing code space as data space for one-once code.
* Using bits in the opcodes to store data, since a single bitflip doesn't affect the interpretation of some instructions. E.g. on the Z80 if Z and C are both always 1 at a particular point, you can use either jrz (0010 1000) or jrc (0011 1000) and use the 5th bit in that instruction as a flag. Free storage!
I do find this sort of thing fun. As a hobby. I wouldn't want to write an air traffic control system that way.
I would like to refer to this great book that taught me programming.
[Sinclair ZX81 BASIC Programming](http://otremolet.free.fr/otnet/otzx/zx81/basic-progr/)
[Sinclair ZX81 BASIC Programming](http://otremolet.free.fr/otnet/otzx/zx81/basic-progr/)
I had a C64, and couldn't type terribly well, so typing in those programs listings from magazines without a typo was a frustrating cycle that made the end result more satisfying when it finally ran. I have to imagine that was more intense with the shite keyboard on these things.
> I have to imagine that was more intense with the shite keyboard on these things.
Yes and no. Yes, because the keys were not great, obviously.
And no, because the ZX81 and the later Spectrum had a massively clever optimisation.
A big chunk of the lexer and parser was implemented in a way that was kind of coupled to the keyboard driver.
So you never typed out GOTO/GOSUB etc., in full.
In fact you could not type out a BASIC keyword in full; the keyboard would not let you. At the points where your program could syntactically accept a BASIC keyword, the keys went into keyword mode and would not produce letters at all.
So pressing G or H at that point would not get you a letter, but GOTO or GOSUB.
This was unusual then and is unheard of now. But it helped make some aspects of coding much more kinaesthetic. And it ended up being quite quick to key in listings, especially if you replaced the keyboard with an aftermarket unit.
Yes and no. Yes, because the keys were not great, obviously.
And no, because the ZX81 and the later Spectrum had a massively clever optimisation.
A big chunk of the lexer and parser was implemented in a way that was kind of coupled to the keyboard driver.
So you never typed out GOTO/GOSUB etc., in full.
In fact you could not type out a BASIC keyword in full; the keyboard would not let you. At the points where your program could syntactically accept a BASIC keyword, the keys went into keyword mode and would not produce letters at all.
So pressing G or H at that point would not get you a letter, but GOTO or GOSUB.
This was unusual then and is unheard of now. But it helped make some aspects of coding much more kinaesthetic. And it ended up being quite quick to key in listings, especially if you replaced the keyboard with an aftermarket unit.
I would even call that a sort of primitive IDE - it only let you enter valid commands like 10 GOTO 20 instead of 10 xhehcbehsjsjdheh
Yes in a sense it is.
You could say its modern equivalent is the MIT LLK research group's design for visual block structure in Scratch, where you cannot assemble control flow in ways that cannot be parsed, and the quasi-physicality of it teaches you as you go.
A tangentially-related story:
When I was a kid I asked my chemistry teacher if a particular chemical bond could happen in ordinary circumstances.
(I can't remember for sure but I imagine I asked about carbon-carbon triple-bonds, not least because it must be a common question and he was ready with the answer.)
His response -- which obviously elides some details! -- was to ask me to try to represent it using the balls-and-springs chemical models. Which you can't really do ;-)
I am reminded of these things, really regularly, when I design any app or website a person has to interact with. It's possible to design useful tools that are also implicit teachers -- where designs communicate possibility and limitations without overburdening the user with detail.
You could say its modern equivalent is the MIT LLK research group's design for visual block structure in Scratch, where you cannot assemble control flow in ways that cannot be parsed, and the quasi-physicality of it teaches you as you go.
A tangentially-related story:
When I was a kid I asked my chemistry teacher if a particular chemical bond could happen in ordinary circumstances.
(I can't remember for sure but I imagine I asked about carbon-carbon triple-bonds, not least because it must be a common question and he was ready with the answer.)
His response -- which obviously elides some details! -- was to ask me to try to represent it using the balls-and-springs chemical models. Which you can't really do ;-)
I am reminded of these things, really regularly, when I design any app or website a person has to interact with. It's possible to design useful tools that are also implicit teachers -- where designs communicate possibility and limitations without overburdening the user with detail.
Ah, that's clever. Though the bulk of the typing was the "DATA" lines that got POKEd.
No DATA statements in ZX81 BASIC though! That came in with the Spectrum.
You had to use character strings instead.
Yeah, nobody liked keying in the DATA lines!
Footnote: I guess the ZX80 did this too, judging by the photo at Wikipedia.
https://en.wikipedia.org/wiki/ZX80
I don't think I've ever seen one of these outside a display case, though.
https://en.wikipedia.org/wiki/ZX80
I don't think I've ever seen one of these outside a display case, though.
Oh my god so much. One learned a weird technique of sort of wiping ones finger tip firmly across the keypad.
Slightly ameliorated by the fact that one usually used a single keypress to enter Basic keywords (e.g. J, symbol shift, P P for LOAD "" to put it into cassette loading mode).
It made the notorious ZX Spectrum "dead flesh" keyboard seem quite luxurious in comparison.
Slightly ameliorated by the fact that one usually used a single keypress to enter Basic keywords (e.g. J, symbol shift, P P for LOAD "" to put it into cassette loading mode).
It made the notorious ZX Spectrum "dead flesh" keyboard seem quite luxurious in comparison.
This website is a clickbait website full of ads. I'm really surprised to see such a low quality publication raise to the first position on hacker news.
Ads are all over the page and make it impossible to even find the actual article in all that mess. Horrible.
I suspect most people don't even clink the links. They're just here for the comments.
My ZX81 memory: I took the T to the Sinclair administrative office in Boston to buy a super-early one with cash money.
I had pre-flighted the transaction by phone, but it was still a strange thing for the office to do a retail transaction - I think my change came out of the postage money drawer. The machine was handed over in brown corrugate, without shiny shelf-ready packaging.
Many hours of programming and experimentation ensued.
I had pre-flighted the transaction by phone, but it was still a strange thing for the office to do a retail transaction - I think my change came out of the postage money drawer. The machine was handed over in brown corrugate, without shiny shelf-ready packaging.
Many hours of programming and experimentation ensued.
Encountered the ZX at the same time as a Vic20, liked that it was more colorful, but was astonished about the bad keyboard compared to the Vic20.
You're thinking of the ZX Spectrum (colour, hence the name) rather than the monochrome ZX81.
Edit: If you thought the Speccy's keyboard was bad then you would have been astounded by how much worse it was on the '81.
Edit: If you thought the Speccy's keyboard was bad then you would have been astounded by how much worse it was on the '81.
Yes you are right, the Spectrum had the rainbow over the keyboard compared to the boring color of the keyboard of the Vic20.
The ZX81 had only two colors: black and white.
3! You could make grey using the checkboard box character thing.
On a complete side note, I grew up in Wisconsin, live there now, and have never heard anyone refer to another Wisconsinite as a "Sconnie". I think it's purely a marketing thing. "Sconnie Geek Nation," indeed!
The thing that really impressed me was that little thermal printer it came with. I had so much fun printing things on it!
Heh, I have one of those, and the extra parts in the original boxes. I bet they are worth nothing still!!
First: the ZX81 was not a "Timex Sinclair" product on the day of its launch because Timex didn't get a licence to manufacture it in the USA until the following year.
Second: Sinclair Research was never (again, unless someone can correct me) a "Timex Corporation"!
If it had been, it wouldn't have gone conclusively bust and been given a new life by Grumpy St Alan of Sugar, the brave champion of British national technology pride.
"Timex Sinclair" was the US licensing venture (not the maker).
Timex pulling out of that deal (because the Spectrum was understandably too British in spirit to easily flog to a market that had birthed the Apple II and where the C64 was cheaper) is arguably the start of Sinclair's slow-building battle against the tide.
--
[0] Important in the sense that I, as a Brit of a certain age, must correct them in the interests of a kind of battered and timeworn national pride.
I would put these corrections in comments on the original article, but that would mean having a Disqus account, and in my experience that ultimately means encounters with trolls.