Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Especially when you start adding modern peripheral hardware that contains more general-purpose processing power than the C64's CPU itself.


Nothing special, this game already started when you replaced your datasette with the floppy drive back in the days.


I assume this is an allusion to the fact that the standard Commodore 64 disk drive had an identical CPU, lol. A legitimate computer all to itself. You could even expand the default 2KB of RAM up to 48KB. [1]

[1] https://en.wikipedia.org/wiki/Commodore_1541#Hardware


The 1571 floppy (successor to the 1541) used a 2Mhz 6502, versus the 1Mhz 6502 in the C64. So, fairly common to have a disk drive that had a better CPU than your PC.


You could also use it as a home-brew multiprocessor. I did that as a science fair project.


That's kind of amazing. How did you communicate between the onboard CPU and the CPU in the floppy drive(s)?


Through the serial port. It turns out that if you really dig into the 1541 docs, it’s possibly to push assembly code into RAM using existing 1541 commands over the serial port. And the 1541 has a command buffer. So I pushed assembly to perform parallel calculations to it, and then pushed two commands into the buffer, one to execute the code and the next one to resume normal serial ops after it ret’urned. The data from the calculations was placed into the data buffer prior to returning, and the 1541 just sent it out the port as a regular data packet, just as if it had been read off a floppy. Or so I recall; this was in 1986. My memory’s a little fuzzy.

It worked with N drives, too, although the C64 sort of had to act as the bus master to avoid serial packet conflicts.

That was a long time ago and I’ve certainly forgotten many of the details. But it won me a trip to the International Science Fair (this was before Intel started sponsoring it).


It might add to the understanding, for those who are familiar with some other legacy stuff, to note that the cbm serial data port was a reimplementation of ieee488/gpib in a shift register style to cut down on the cabling cost. It was synchronus but some fastloader software reimplemented it in an async fashion (thanks to being able to upload code to the drive) along with changing the clk wire to be another data wire.


That's a fascinating technique. Did the commodore operating system itself push 6502 code to the floppy drives to move the heads, initiate data transfer, etc?


No, the basic floppy control software resided in ROM on the 1541. But as mentioned below, you could (and people did) essentially reprogram much of that stuff to enable copy protection, increase serial throughput speeds, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: