IECHost: more progress on the warp disk image write feature

I finally managed to put together all the code for warp-transferring data from IECHost to a Commodore 1541 floppy drive. All components seem to be working, albeit I need to tune the timing of the sending side. There is a further change that affects timing at the sending side that I would also like to put in before I start the tuning, but maybe I will do an initial tuning and then a subsequent one just to become familiar with the process and eventually master it.

For the time being I took a trace with my logic analyser, which essentially looks like the one I took a while ago:

IECHost: warp-sending data to the floppy drive by Luigi Di Fraia

IECHost: warp-sending data to the floppy drive

From a signal perspective things still work the same way until the point where the floppy drive asserts and then releases both DATA and CLOCK lines: in this case, however, IECHost controls both lines for transmission afterwards.

Troubleshooting this direction of the warp transfer is slightly more complex because one cannot immediately access the data at the receiving side (the drive’s RAM) to make sure it matches or not (timings might need adjustment in the latter case). However, because the reverse side of the warp-transfer is already working, what I can do is to warp-send data to the disk drive and have it warp-send the received data back for comparison. The comparison would underline whether the sender was too quick or too slow setting voltage levels on the bus to encode the bits being transferred.
Fortunately one does not need to look at the whole data but just at the first group of 4 bytes, after which some handshaking takes place: essentially timings are reset on both sides using a brief synchronisation process every time 4 bytes are completely transferred. A simplification occurs due to the fact the 6502 within a floppy drive is clocked at 1 MHz, which is convenient as one can roughly assume that 1 clock cycle takes 1 us on average, at least during the above mentioned 4 byte sequence: drifts on the longer term would be taken care of by the handshaking process 🙂

Definitely getting closer now to having a fully functional warp sector write mechanism, which I can later extend to write a whole disk image.

About Luigi Di Fraia

I am a Senior DevOps Engineer so I get to work with the latest technologies and open-source software. However, in my private time I enjoy retro-computing.
This entry was posted in Retrocomputing, Technical and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s