Wow is the Commodore 64 bus slow!
Got the kernel module for the Raspberry Pi that does the Commodore 64 IEC protocol working quite well. Managed to get rid of pretty much all the timing issues, and cobbled together a simple user space program to handle the file I/O. I can now read & write PRG files, even very large ones. It was interesting sending a file (by accident) larger than the C64's RAM, the poor C64 freaked out and overran even the screen and crashed.
It was very cool to load a Demo without having to mess around with a floppy or a d64 image or anything. Just loaded it as a regular file right off the Raspberry Pi.
I am amazed at just how slow the IEC bus is! I have the kernel module rigged to auto calibrate to the C64's max speed and the best it can do is 535 bytes/sec. That's faster than 4800bps, but far less than 9600bps. Even the Atari 800 peripheral bus is 19200bps!
The Raspberry Pi is connected directly to the IEC serial bus, there's only some level shifting being done. I still need to clean up a couple of other things but I expect to be making the source available in the next few days!