Ancestors

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:34

It's that time of year again: the 100-post December Threadapalooza challenge. This time, the #commodore64 and its disk drive: why was it so dang slow? Let's take a look at the history leading up to the C64's release, and the technical detail of the disk drive's operation. 1/100

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:34

The Commodore 64 is, of course, the greatest computer ever made, and you don't have to take my word for that: it still holds the world record for highest number of units of a single model of home computer ever to be sold. Estimates vary, but at the high end there were 17 million C64's out there. 2/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:35

Commodore holds another, more dubious record from around this time though. The 1541 disk drive that was sold alongside the C64 is infamous for its slow load speed: benchmarks across systems are hard to find, but it might be the slowest disk drive ever sold to the general public. 3/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:36

Brandon Staggs has a benchmarking tool he's written for the C64, which measures load speeds for the 1541 and its modified brethren, and he's found that the unmodified 1541 as sold at launch was capable of reading files in at around 400 bytes per second: https://www.obliterator918.com/dtb/ 4/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:36

For comparison, the Commodore 64's tape drive could load files at ~100 bytes per second (though the operating system loaded files from tape twice, to correct for errors); the disk drive isn't much faster than the tape deck, which is equivalent to shouting programs into the computer. 5/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:36

So how did Commodore Business Machines get to the point where its disk drive was the slowest on the market, making its flagship machine essentially useless for business purposes? Unsurprisingly, it wasn't intentional. Let's go back in time a few more years, to Commodore's first computer. 6/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:37

In 1976, Chuck Peddle was working at Metal Oxide Semiconductor who made calculator chips, and had just started making the 6502 microprocessor. He got to talking with Jack Tramiel at Commodore, and was tasked with procuring or designing a machine for the 1977 Consumer Electronics Show. 7/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:37

Initial discussions with Steve Jobs to buy the Apple II design fell through after Tramiel thought Jobs was charging too much. (Can you imagine an Apple II sold by Commodore? We'd be in a very different world if that had happened...) 8/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:38

So Peddle put together a machine based on his demonstration board for the 6502, and a working prototype was ready in time for the CES in January. It was called the Pet Computer, after a Commodore executive saw the Pet Rock and suggested jumping in on that trend while it was still hot. 9/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:39

The Personal Electronic Transactor, as the backronym eventually came about, came with an IEEE-standard parallel port interface; Commodore's first disk drives (the 2020 and 2040) could read files in at over 2kB per second, which was a perfectly serviceable speed for the time. 10/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:39

(As an aside, the version of BASIC that came with the first PET had no disk handling commands: the code for talking to the parallel-port bus was broken on release, but Commodore's kernel was able to work with disk drives, so you had to write your own file handling routines.) 11/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:39

(As another aside, Commodore didn't pay Microsoft for BASIC until the PET shipped, and it was delayed by almost a year; Microsoft were only saved from bankruptcy when Apple bought BASIC for the II. Another inflection point in history, and we're barely 10% of the way in.) 12/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:40

So the PET and its 2040 drive were Fine, but they had one problem: that IEEE-488 interface. As it turned out, there was exactly one manufacturer of the cables you needed to connect your computer to your disk drive: Belden Cables of Chicago. 13/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:40

And it wasn't so much that Belden went out of business, more like they vanished off the face of the earth. As Jim Butterfield put it in his Brief History of the IEC Bus: "A couple of years into Commodore's computer career, Belden went out of stock on such cables (military contract? who knows?)" 14/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:40

Now, Commodore had stock of these disk cables on hand for its existing business computers, but there was no way they'd have enough for Tramiel's intended move into the home computer market which was just coming into being. 15/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:40

Not only that: the parallel ports, the cables, the wiring, every part of the IEEE-488 interface was expensive. The PET started at $500 in 1977 dollars, but that got you 4KB of RAM and a mono screen; a usable spec would set you back over a thousand. 16/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:41

Jack Tramiel wanted to sell a computer with colour graphics into the home market for $300. The only way to get there would be to cut every corner going, and one of the most obvious was that huge interface with over twenty wires running to it. 17/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:41

And so, to take another excerpt from Butterfield, the order came to Commodore's engineers from on high: 'Tramiel issued the order: "On our next computer, get off that bus. Make it a cable anyone can manufacture". And so, starting with the VIC-20 the serial bus was born.' 18/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:41

Why is a serial bus cheaper? With a parallel bus, you need at least nine wires to run 8-bit values back and forth: the full value is set on the eight Data lines, and then you pulse the Clock line to tell the other side that a value is ready. Add in Power and Ground, you're at 11 wires already. 19/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:42

A serial bus works one bit at a time: you have one Data line, place a bit on there, and pulse Clock to tell the other side the bit is ready. Then you send the next bit, and the third... Because all the bits have to line up and wait to be sent, it takes at least 8 times longer to send a value. 20/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:42

But you'll notice there's only one Data line and one Clock. Add in Power and Ground, and you're up to four. You might recognise this actually, if you look at a Universal Serial Bus (USB) cable: the end has four pins, and clocking works differently for USB but the same principle applies. 21/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:43

So a serial bus cable is a lot cheaper, and a serial interface on your computer's mainboard is cheaper as well, than a parallel setup. It's eight times slower to send a value, but you can make up for that by running the interface at eight times the previous speed, if you have the hardware. 22/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:43

And while he was at MOS, Chuck Peddle had put something very nifty into the PET's Versatile Interface Adapter chip (model number 6522) which was used to drive the parallel bus: a shift register. 23/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:43

A shift register is a piece of hardware that lets you very quickly push consecutive bits out of a given wire: you can queue up a full value of 8 bits, and with each pulse of the Clock the register will push the bit at the end out, and 'shift' all the others down one step. 24/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:44

Conversely, you can have a shift register that listens for bits on a wire, and shifts the value up a step with each clock pulse, building a full value as it goes. Put two of them either side of a serial bus, and you have yourself most of the hardware for high-speed data transfer. 25/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:44

The only thing you'd need aside from these shift registers is a line for the machines to tell each other they'd pulled in the byte and were ready for another: Commodore were thinking a fifth wire would be useful for this. 26/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:45

Crucially, the CPU isn't involved at any point until the full byte is ready: this interface runs itself until it has a full value, then signals the CPU to collect it and heads off to build another byte. That means a 1MHz machine could push data at a blistering 10kB/sec or even more. 27/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:45

The theory was sound, and Commodore's engineers got to work building the VIC-20 (named after its custom Video Interface Chip) heading for that magical price point of $300 for the home market. There was just one problem... 28/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:45

To quote Butterfield again: "We early PET/CBM freaks knew, from playing music, that there was something wrong with the 6522's shift register: it interfered with other functions." With a speaker attached to the shift register wire, you could play music on the PET, but sometimes it ...got stuck. 29/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:46

The PET ran on the order of 1MHz, so instructions took microseconds to execute. The 6522's shift register as implemented in hardware had a bug, where if the register line changed within a few nanoseconds of Clock changing, it would go to full voltage and stick until the computer was reset. 30/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:46

This was a timing bug many times more subtle than the main clock, so it's no surprise that no-one caught it until people started playing with the PET's internals. Importantly, no-one at Commodore knew this bug existed when they designed the VIC-20's serial bus around the 6522. 31/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:46

The bug was discovered with only a couple of months left to release of the VIC-20, and the boards were already in manufacturing. This problem couldn't be fixed in hardware: the engineers would have to "do it in post", which in the computing world means in software. 32/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:47

Instead of having the CPU get pinged when each byte was ready, it would have to camp on the serial bus's input itself and listen for changes in the Clock signal, pulling each bit in as it arrived and signalling to the other end that it was ready to receive the next bit. 33/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:47

Of course, this would mean the 1540 disk drive, which was being released alongside the VIC-20 computer, would also need its software changing: it used the exact same setup of a CPU with a 6522 attached, and it had the same bug, so it would be pushing bits out only when the computer said so. 34/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:47

In the end, emulating the shift registers in software meant the VIC-20 serial bus could only run at a relatively sedate 1kB/sec, and chewed up all the CPU on the machine to do it. Fortunately there were two things about the VIC-20's design that meant this wasn't so bad. 35/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:48

The first was its measly offering in terms of memory: targeted for the home market, the VIC-20 came with 5kB of RAM to play with. Would you notice if it took 5s to load a file from disk instead of half a second? And what would you do with a memory full of file and no room to work on it? 36/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:48

The second was the clever design of the VIC-20's main clock: running at 1MHz, the CPU would kick in when the clock went up, and the video chip worked when the clock went down. Interleaving in this way, both chips could access memory without stepping on each other, both at full speed. 37/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:48

All this put together meant that you could use a VIC-20 with the 1540 perfectly serviceably: loading a file didn't blank out the screen or anything weird, and it was over in a couple of seconds. The serial bus had done its job, and helped the machine hit that $300 price point. 38/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:49

There's a short tale on the Greater Pittsburgh Vintage Computer Museum at https://www.myoldcomputers.com about the VIC-20, but take a moment to revel in the 90s design of that website: the navigation buttons, the tables with the borders... A simpler time. 39/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Toot

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:49

Anyway, story goes that Tramiel sold the VIC-20 in Japan, and its price so shocked other manufacturers that they delayed entering the American market to work out how it was possible. We never saw Toshiba or Panasonic 8-bits outside Japan because they were locked out by that delay. 40/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Descendants

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:49

The VIC-20 ended up selling like hot cakes, becoming the first model of computer to sell more than a million units. The most surprising part to Commodore was people who bought the machine solely to play games: productivity and business software sold poorly in comparison. 41/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:50

And so in 1981, Commodore's Japan subsidiary began designing the Ultimax console, and dragged their partners at MOS into designing a successor to the VIC chip as well as a more advanced sound interface, aiming for an eventual price point of $200. 42/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:50

By the start of the next year, the Ultimax was ready, but it had a problem: several problems, in fact. At such a low price, the keyboard was atrocious; it shipped with 2kB of RAM; there was no inbuilt tape-reading software, so each game had to implement its own, and only two games did. 43/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:50

The Ultimax's biggest problem, though, was the VIC-20: still selling fantastically, it was now regularly discounted to $200, and was a much more capable machine. There's a reason the Ultimax is known as a very rare machine nowadays: Commodore didn't sell many. 44/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:50

Back in the US, Tramiel was turning his focus back to the business market with new models of PET, but the engineers at MOS thought they had something very capable on their hands that didn't deserve an undignified death in the Ultimax: they proposed a sequel to the VIC-20 for the home market. 45/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:51

Tramiel agreed to kick off the project (codename VIC-40) but only if it came with 64kB of RAM to make for a more usable computer. The engineers were given two months to turn a machine around in time for CES 1982, and by recycling all of the Ultimax's innards they made it in the nick of time. 46/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:51

It wasn't called the VIC-40 at CES, of course: it was the Commodore 64. We made it to the machine we actually want to talk about, and it only took 47 posts. If you've slogged through this far, we're almost on the downhill stretch. 47/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:51

While the C64 was being designed, the engineers at MOS had been hard at work fixing the shift register bug in the 6522. The '64 had an upgraded version of the adapter chip: the 6526 Complex Interface Adapter, with the kinks worked out. 48/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:52

Back in Commodore Engineering, the team knew from experience with the VIC-20 that they had a very short window to get the hardware design right for the C64, and more time for software, so they devised a clever scheme to keep their options open regarding the 6526's shift register: 49/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:52

To keep backwards compatibility with the VIC-20's disk drive, the C64 could boot up in a slow-serial-bus mode where the data line was camped on by the CPU in its usual fashion. But the bus's data signals could also go to the 6526, by running a branch off the data line on the mainboard. 50/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:52

If they got the software right, the user could switch into fast-serial-bus mode and the CIA's shift register would do its job talking to a corresponding faster disk drive (which would also have a 6526 on board). The idea was elegant, but Murphy's Law would get in the way. 51/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:53

The hardware design was finalised and sent off to be built. David Callan picks up the story: "A minor rework of the board at the board manufacturers (to accommodate a screw hole, I believe) accidentally discarded the high-speed wire." 52/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:53

Cutting through the fast-serial-bus line doomed the C64 to the same slow data transfer speeds as the VIC-20: around 1kB per second. The boards were already designed around the 6526's layout, but they would be left in VIC-20 compatibility mode. 53/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:53

But we don't see the 1kB/s achieved by the VIC-20 when measuring the disk loading speed on a real C64: we actually get less than half that. So what's going on to make the C64 slower? Now bear with me, we're going to get technical. (Yep, we haven't been technical thus far.) 54/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:53

We're going to take a little bit of a detour from talking about disk drives and interface adapters, and look at the history of television real quick. Stay with me, we'll get back on track very shortly. If you're already familiar with TV signals, come back in fifteen posts or so. 55/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:53

The first TV broadcast systems took a two-dimensional picture that varied with time, and crammed that information into a one-dimensional radio signal: kinda like a sound wave, all you had was a volume (or amplitude) that went up and down with time. 56/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:54

So how do you turn 2D frames of video into 1D? By breaking them up into lines, and sending the lines one after another. If you used enough lines, you could send a full picture without things looking janky; if you then sent a frame very quickly after the first, you had the illusion of motion. 57/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:54

In the US, things eventually coalesced around a 525-line standard, but if you wanted to send 525 lines of picture at 60 frames per second there wasn't a way to fit that much signal into the allocated radio bands. The ingenious solution was to send half the picture at a time. 58/

=> View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:55

The transmitter actually takes 60 frames of video per second, but it sends every other line from one frame and the lines it missed from the next frame; at the receiving end, the eye and brain blur things together and it looks like the whole frame is moving at full speed. 59/

=> More informations about this toot | More toots from Two9A@hachyderm.io

Written by Imran Nazar ~ عمران نزر on 2024-12-02 at 10:55

So let's have a quick look at one of these lines, as it comes in from the VHF antenna. If we want to show bands fading between white and black across the screen, that's represented by a signal that starts high (for white) and drops to low (for black), then back up. 60/

=> View attached media | View attached media

=> More informations about this toot | More toots from Two9A@hachyderm.io

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113582838559754019
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
557.09194 milliseconds
Gemini-to-HTML Time
33.586967 milliseconds

This content has been proxied by September (3851b).