IECHost demonstration video!

This is the first prototype of my IECHost device: an IEC bus master that can control Commodore drives such as the 1541 and 1541-II, and possibly other Commodore devices interfaced via the IEC bus such as printers and plotters.


Just to make it absolutely clear: this is NOT a Commodore disk drive emulator. It acts as an IEC master, i.e. as a Commodore 64 itself. In fact, if I were to add some of the code from my DC2N project, this device would pretty much act like a Commodore 64, i.e. with disk and tape access capabilities.

If I were asked to point to something similar to IECHost that already exists out there, in order for people to better understand what IEChost is, I’d mention ZoomFloppy. In fact, the IECHost firmware might be adapted to run on the ZoomFloppy hardware itself, but that’s something I will look into at a later time.

My current priority is to enable the upload and execution of drive code for faster disk transfers so that users will be able to control the device and transfer data back and forth from a GUI interface on their PC. At the same time, I’d like to also offer IECHost as a standalone device with a graphic LCD and a control menu to carry our transfers and disk dumping tasks using an SD Card or a USB flash-drive.

As I had promised in my previous post, here’s the IECHost implementation of the standard sector reading function, which is wrapped up in a user-friendly function:

st = 0;

if (device_number < 8) /* Only disk drives are supported by this command */
 return IOERR_ILLEGAL_DEVICE_NO;

/* This has no real effect but is used to match the "close" down below */
serialdevice_open(device_number, CHANNEL_CMD, NULL, &st);
serialdevice_open(device_number, xfer_channel, "#", &st); /* Open a direct access data channel */
if (st)
 return IOERR_DEVICE_NOT_PRESENT;

sprintf(cmd, "U1:%d,0,%d,%d", xfer_channel, track, sector); /* U1: Block-Read (direct disk access) */
serialdevice_write(device_number, CHANNEL_CMD, cmd, strlen(cmd), &st);

serialdevice_read(device_number, xfer_channel, buff, sizeof buff, &br, &st);

serialdevice_close(device_number, xfer_channel, &st);
serialdevice_close(device_number, CHANNEL_CMD, &st);

The above is functionally equivalent to the following BASIC program:

10 OPEN 15,D,15
20 OPEN 2,D,2,"#"
30 PRINT#15,"U1";2;0;T;S
40 FOR I=0 TO 255
50 GET#2,B$
60 A=ASC(B$+CHR$(0))
70 POKE BUFF+I,A
80 NEXT I
90 CLOSE 2
100 CLOSE 15

Yes, that’s been done by other people too before me and it’s been brought to a new level by projects like KryoFlux, but if I were merely being a user of such projects I would not get to enjoy the wonders of the hardware that a retro-computing enthusiast like myself gets excited about over and over again when interfacing one of these 30 year old devices. Not to mention the amount of history and knowledge that gets discovered along the way 🙂

As usual, stay tuned!

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s