The Commodore 1541 disk drive is unlike anything you’ll ever see in modern computer hardware. At launch, the 1541 cost almost as much as the Commodore 64 it was attached to ($400, or about $1040 at today’s value). This drive had a CPU, and had its own built-in operating system. Of course, anyone using a Commodore 64 now doesn’t deal with this drive these days — you can buy an SD2IEC for twenty dollars and load all your C64 games off an SD card. If you’re cheap, there’s always the tape drive interface and a ten dollar Apple Lightning to 3.5mm headphone adapter.
But the SD2IEC isn’t compatible with everything, and hacking something together using the tape drive doesn’t have the panache required of serious Commodoring. What’s really needed is a cycle-accurate emulation of the 1541 disk drive, emulating the 6502 CPU and the two 6522 VIAs in this ancient disk drive. The Raspberry Pi comes to the rescue. [Steve White] created the Pi1541, an emulation of the Commodore 1541 disk drive that runs on the Raspberry Pi 3B.
Pi1541 is a complete emulation of the 6502 and two 6522s found inside the Commodore 1541 disk drive. It runs the same code the disk drive does, and supports all the fast loaders, demos, and copy protected original disk images that can be used with an original drive.
The only hardware required to turn a Raspberry Pi 3 into a 1541 are a few transistors in the form of a bi-directional logic level shifter, and a plug for a six-pin serial port cable. This can easily be constructed out of some Sparkfun, Adafruit, Amazon, or AliExpress parts, although we suspect anyone could whip up a Raspberry Pi hat with the same circuit in under an hour. The binaries necessary to run Pi1541 on the Raspberry Pi are available on [Steve]’s website, and he’ll be releasing the source soon.
This is a great project for the retrocomputing scene, although there is one slight drawback. Pi1541 requires a Raspberry Pi 3, and doesn’t work on the Raspberry Pi Zero. That would be an amazing bit of software, as ten dollars in parts could serve as a complete emulation of a Commodore disk drive. That said, you’re still likely to be under $50 in parts and you’re not going to find a better drive emulator around.
SD2IEC are fine for quick disk shuffling, loading disks you doiwnloaded from internet, making backup copies of your personal disks to SD card, etc but it’s not real good for many uncracked commercial games that uses custom fastloader code since that is what fails on SD2IEC. There are UK1541 and 1541 Ultimate but they costs a few hundred dollars and are more for hard core C64 fans.
If you still have working 1541 drive (or 1571), you can use disk copy program to copy from disk images to real disk and run games off those real disks.
I got a 1541 Ultimate II+ last year and this thing is insane. emulates 4 1541/1571 drives, tapes, twin SIDS, Ethernet, DAC audio, 16MB memory expansion (watching color nuvie videos on C64 is crazy) ROM replacement including SX64 and jiggydos, cartridge emulation including fastload and action reply with freeze functions. FTP, telnet lets you hot swap out data in the memory expantion using DMA in realtime without freezing.
Also made it real easy to use a disk copy to get my old disks onto a flash card. I wound up killing a 1541’s VIA chip getting a homemade PC parallel to C64 serial adapter to work.
I got a Ultimate 1541 II+ waiting for me at the post office, but cannot get it today. It sure is pretty amazing though as it can be used with both the C64 and the C128 and it supports carts, copy protected disks and copy protected tapes. Also it can give you the 16mb REU RAM so you can run some C64 REU based videos.
1980s? What about 1990s? Need we remind that auto repair shop in Gdansk and it’s C64 based system for balancing driveshafts that runs already almost 30 years? I also heard of some textile company using C64 for production control. It’s a pitty that C64 is remembered as entertainment platform and many of it’s uses got completly forgotten:
I found the original ones most useful. Me and my brother bother learned computers and programming on them. including loading in a spreadsheet and word proc app byte by byte to help with school work. The original monitor was also dual useful since it had a composite in port so I could watch movies straight from a VCR.
Exactly. CBM stands for Commodore Business Machines. They had lots of business use cases back in the day, just like a PC– when IBM wasn’t nearly as interested in the PC as they were their (more expensive) mainframe and (to some extent) their AS/400 platforms.
Of course it was. I ran a business from one, programming eproms, writing code in my own assembler for microcontrollers. I kept a client database, made documents and forms on it. Still a capable machine.
The extents to which the retro-Commodore set will go to get/keep their gear running _certainly_ qualifies as “serious Commodoring”. Even when they’re just playing games.
Stupid question here, but why can’t this be run from a Pi 1 or Pi 2? Is it a computing power/resources issue?
A lot of us have those older units kicking around and it’d be nice to put them to use without sacrificing a Pi 3.
but seriously, cycle accurate can be a killer. Personally I wouldnt bother, you can get most(if not all) c64 games pre cracked anyway, I dont see the magic in waiting 30-60 seconds for disk load.
It’s not the crack, it’s the software loader that speeds up disk load time. They work on real 1541/1571 but because SD2IEC does not emulate 1541 100%, the turbo loader fails.
Look for Ultima 5 disk images and load the Program disk. On a C64 and on 128 in 64 mode, you will see a screen asking which disk drive you are using. If you choose 1541 while running off SD2IEC, the game will crash. If you choose other, it will load fine but at very slow load speed (original serial speed!)
crack/patch, are there still any non patched games left? are there still any people alive playing them?
At the outset I fully intended to get is to work on a Pi Zero. It almost works on a Pi2. I just have not had the time to investigate why not. It is currently multi-core at the moment. One core runs the emulator whilst the other handles USB interrupts and updates the screen. I have no doubt that after I release the source (soon) it will be ported to all kinds of devices.
Release the Source! We’ll help solve all those problems. Seriously if it’s open source there’s no reason not to open it now
So hilarious! The commodore DOS for C64 and the PET, was so unfinished as to barely be called a disk operating system! I never understood why they didn’t make a better implementation.
On the other hand, that DOS allowed you to use the drive as a coprocessor. If there would have been something like Bitcoin in the 1980s, people would have written bitcoin miners for the Commodore disk drives so they’d have something to do while you’re not downloading file “$”.
I remember code in one of the RUN magazine that you could set drive 8 and 9 to automatically copy disk. Once you sent the code to both disk drive, you could disconnect C64 and it’d run by itself copying disks all day long.
scsi can do this with very little help as the bus is similar. there were even commercial cd cloning devices available. not true standalone, but very close
Are you sure that Timex FDD3000 couldn’t do this? It was a complete computer with two floppy drives.
They did make a better implementation. The 4000 & 8000 series PETs had a much better DOS than the C64, but those machines were limited to 32K RAM. In order to squeeze 64K RAM + kernel + BASIC into the C64, they were limited to 4K ROM for BASIC & 4K for kernel, and the DOS functionality was crippled as a result.
As primitive as the dos seemed it have an advantage in that the drives were intelligent devices so the host did not have to care about the details of the file system.
Yes, you only needed to care about paying for a drive as much as you already paid for the computer in the first place!
I always assumed it was Tramiels “brilliant” plan of selling more MOS chips at big markup. After all alternative would be sourcing real floppy controller chip like NEC 765 or WD1771, you know, like normal people did, aka everyone.
Hmmm, ship a cartridge with controller chip, small rom and address decoder plus STANDARD floppy? or whole effing computer at huge margin? choices choices…
Had they done that way, they would have needed a filesystem and FDD driver on the C64 side taking up valuable space in the very limited ROM space of the C64. Giving the disk drive its own CPU, RAM and ROM meant the disk drive interface was fairly simple and didn’t require very much in the way of ROM and RAM space in the C64 itself.
somehow everyone else managed with onboard ram without selling you kitchen sinks, not to mention Apple 2 Woz machine hack in 4 KB ram computer.
Yes, which brings this whole discussion full circle … the drives were more expensive because the machine itself was cheaper.
Drives were more expensive because they packed almost whole another C64 inside. At the end of 1983 C64 cost ~$200, precisely the difference between Tandon TM100-1 and 1541. You paid 2x more for 10x slower drive.
Yes, they had to pack more intelligence into the disk drive, to compensate for the cheaper (lower spec) main unit. My understanding of it is that C64 was targeted at a lower price point, and so corners were cut. The version of BASIC used was an older version with “very poor disk support” because it used half the RAM and they didn’t envisage disks to be that popular with their target market.
You might have a point that the C64 disk drive was poorly designed and implemented and had a whole load of redundant hardware, but that wasn’t for the want of trying …
C64 is not a multi threaded machine, no one needs non blocking IO. Why put another computer inside the drive when your main one will just be sitting there waiting for an answer, “serial” port is polled and bitbanged anyway because of “brilliant” hardware design. All this when you just needed a pass thru cartridge with floppy controller chip, additional ROM for disk handling code, and mapper (PAL/GAL, for pass thru). You could even get rid of third chip giving up pass thru, dedicating expansion port solely to the floppy.
what is this? Precisely what I am describing :) It was called 3.5″ The Ultimate Drive TIB PLC DD-001 and was made by third party. Uses 82C765 floppy controller chip. From test in zzap64 magazine:
Standard PC drive, ROM, and standard 82C765 floppy controller chip instead of whole computer crammed into huge box, 20x faster than out of the box Commodore 1541.
I suspect it was Commodore management driven design, and we all know how good that was cough C128, cough A600, cough CDTV, cough CD32.
Well that’s it exactly? Why would they undermine their whole business model (i.e. vertically integrated manufacturing to reduce costs) by buying in chips from a 3rd party? Just so that some hardware afficionado 30 years later can laud their parsimonious design aesthetic? That makes no sense.
Commodore brought personal computers to the masses by doing it cheap and nasty, but “good enough”. It makes no sense to consider the cost of the 1541 without considering the cost of the original unit.
You are comparing Apples with Apples, which is fine but you’re forgetting about the rest of the basket.
This was actually noted by one of the design engineers in an early magazine article. They purposely used an old version of BASIC with limited disk support because the more up to date version was double the size. He said it was a painful decision but since they expected it to be mostly used with tapes anyway they decided to save the disk space. Only read this a couple of weeks ago but if I can remember where I’ll post the link.
Actually this supports files which 1541 Ultimate doesn’t support, yet. I think the point was this is a $40 project that you can build yourself, instead of ordering a $200ish 1541 Ultimate and come away with a sense of accomplishment that you got it working.
This looks great and could be interesting if teamed up with the raspberry pi touch screen. One thing though, I wonder if it would be possible to design something similar but instead of using an ss card to store your images on, access a network share instead? I’ve got all my d64 images on a NAS and would love the ability to access them using something like this ..
I actually started to implement code for the official Raspberry Pi touch screen. Then thought that they were so expensive, very few would actually use it. I then thought about supporting all kinds of low res inexpensive SPI screens. My goal was always to keep the hardware as inexpensive as possible. Then one day I thought that the cheapest, hires touch screen is the one everybody owns already. I’m currently developing a smartphone app that can be used to communicate with the Pi via BlueTooth.
I think it would be cool for a 2 row display similar to the TAPIUNO so that simple navigation is possible.
Exactly what I was trying to accomplish with a Pi Zero, using a bare metal kernel (this do that as well), but lost interest. Nice to see it is not impossible.
Maybe I’ll give it another go, but with the ESP32 this time. I guess it would be possible to run emulation on one core.
That’d be nice. You could have internet/lan access aswell and load the data alternatively from a NAS.
So if you plug a Mach 5 cartridge into your C64 and use this drive emulator, do you still get the same weird glitches as the original?
I’ve still got all my floppies. But I haven’t touched them in 25 years. I would be greatly surprised if any of them still load, even just to copy.
A few years ago, I bought an original copy of M.U.L.E. from eBay. Although 30+ yrs old, it loaded and ran perfectly! :-)
Maybe I missed it, but being cycle for cycle doesn’t mean it can be faster. Does this deliver data much faster than the HP-IB interface?
I had the origional C64 and a 1541 and learned to program on it inand a Commodore PET with a whopping 4k of memory. should be fun to build but what are other logic levelers other then the sparkfun bob12009. I am looking on eBay and Amazon for the needed parts.
HACK&Co is committed to a remarkable service standard. It's not enough to just be good, we want our clients to be so proud of choosing to work with us that they can't help but tell others about us. Here are some of the reviews we've received so far, please feel free to check them live on Google, RankMyAgent, and FB to get them first hand.
I recently had the pleasure of working with Taylor Hack and his team when selling my home. From day 1, Taylor was extremely helpful and had great suggestions for sales strategies based on much experience and market research. All throughout the sale and negotiations Taylor and his team made the entire process run smoothly and quickly handled any issues that came up. If the time ever comes when I will be looking to buy or sell my home, there isn't any question on who my Realtor will be!
HACK&Co sold my condo in record time. Christian provided excellent advice, accurate pricing recommendations, and was always available throughout the sales process.
Super professional, and very personable. Very efficient system to accommodate showings. Also super supportive during the many showings we had, definitely recommend them!
It has been a pleasure working with Christian, Taylor, Christine and Jayme. It definitely takes a team to sell a home, and that is exactly how Hack and Co work. Very professional and supportive. Would definitely recommend Hack and Co to anyone interested in selling their home.
Taylor was so great throughout the whole home buying process. As first time home buyers we were worried about how stressful buying a home would be but Taylor and his team made it fun and enjoyable! He gave us all the information and tools we needed to make the right decision for us. We couldn't be happier with our home. We can't thank Taylor enough for his excellent service. Would highly recomend for anyone buying or selling a house.
When we contacted Taylor Hack & Co about listing our home, we were treated with respect. They truly cared that our experience with them was the best possible and that the process was seamless and professional. We got timely information about the value of our home and what options were available to us. I would recommend Taylor Hack & Co to anyone who wants the best experience selling or buying a home.