Today I had a chance, and the motivation, to write the critical part of the warp disk image write process in IECHost. Essentially this part of the code I worked at transfers data to the disk over the IEC bus using a warp speed protocol.
I had written the equivalent code to receive from the disk at warp speed and just as before it is critical code I am talking about: it needs to be pretty much cycle exact. I expect I might have to dig out the logic analyser later this week for some measurements and tuning of the code, but I am pretty much confident things are looking good.
Stay tuned 🙂
I finally managed to finish the option to warp transfer the GCR image of a single chosen sector from a 1541 floppy drive to IECHost. This feature is going to be used in order to retry sectors that present errors during the first pass of the disk imaging process.
In fact, both Ziggy72 and myself felt the need for a sector retry mechanism in order to avoid having to re-image a whole disk when there is a recoverable error for just a handful sectors.
I still have to think of a sensible way to use this new facility in IECHost from within the PC client: At a first thought I reckon that if more than 10 sectors have errors during the first pass, no retry should be made. Otherwise each sector with an error should be tried again once or maybe twice.
Those with some experience using WarpCopy64, or even Graham himself, would be able to provide very valuable feedback on the ideal strategy to use 🙂
After a tiny but necessary update on the firmware side, I was able to finish off the PRG import feature for IECHost and complete the rest of the disk write/modify options I had planned 🙂
Here’ a video to recap what extra options are now available:
As I commented previously, I finished the work required on the IECHost firmware to execute DOS commands.
This means I can now roll out options such as Delete file, Validate and Format disk, all of which are useful to get out of trouble should things go wrong.
IECHost: write options being worked at
As the counterpart is available in the IECHost firmware I will also allow users to issue custom commands through the command channel, a bit like it was done back in the day with something along these lines:
An extended example could be renaming a file:
PRINT#15,"R:NEW NAME=OLD NAME"
The fun is just about to begin! Stay tuned!
In the evening today I implemented the PRG import feature in IECHost: I can now copy data from a PC to a real disk.
However, the work on this is not yet finished as I’ve been copying a chunk of memory initialised to a sample program, instead of a user-picked PRG file, for simplicity.
In order to further troubleshoot new features that write back to disk, I felt compelled to step back a bit and add some useful features before finishing the PRG import one.
In particular I added a quite flexible interface to IECHost that enables users to send commands to serial devices through the command channel. On my first attempt I roughly implemented the equivalent of:
In case you have not tried the above before in direct mode, it might surprise you that control is returned to the BASIC interpreter immediately while the disk is busy executing <command>, which might take a while if e.g. the command is about formatting a disk.
However, if you issue a CLOSE command while the disk is busy, you might appreciate the fact that control is not returned to the BASIC interpreter until the disk command completes:
This is due to the fact that a serial device on the IEC bus (e.g. a printer or floppy drive) might be busy performing a long job. In that case it will take a while to signal it’s ready to receive when the IEC host signals it’s ready to send by releasing the clock line. There’s no time limit when it comes to waiting for a device to become ready: that’s why CLOSE will not return to the BASIC interpreter until that happens.
Over the weekend I worked at a maintenance release of my IECHost GUI client, addressing an issue I was having with data exchange upon creating the USB communication thread under Windows 10.
Before I go on and start adding a file import feature to save PRG files back to physical disks connected to IECHost, I thought to provide an update of where I am at the moment.
Here’s a video that hopefully covers just that!