After work today I was pondering again the presence of erroneous 0xFF values in the stream read by the Commodore 64 from my USBhost-64 replacement device.
It turns out that I was quite right when I thought the erroneous reads were produced by a read attempt when the data bus was in input mode at the device side (with pull-up resistors enabled). What I hadn’t yet realised was that spurious write interrupt requests were occurring during the read operation, which obviously are responsible for putting the data bus in input mode at the device side (and enabling pull-up resistors).
The firmware fix for these spurious requests was to disable write interrupts while transmitting file contents to the Commodore 64. Transfer now works like a charm! 🙂
I think it’d good to celebrate by giving my latest project a proper name. As it replaces USBhost-64 but uses SD/SDHC cards for storage, I think a suitable name would be “SDHost-64”.