Commodore 64 disks: write features planned for IECHost (Arduino Pro Micro board)
Writing data to disks
Yesterday evening I implemented the file import feature in IECHost: I can now copy data from a PC to a Commodore 5'1/4" DOS 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 file 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. This means I can now roll out options such as Scratch (=Delete) file, Validate and Format disk, all of which are useful to get out of trouble should things go wrong when writing to a disk.
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:
OPEN 15,8,15,"<command>":CLOSE15
An extended example could be renaming a file:
OPEN 15,8,15
PRINT#15,"R:NEW NAME=OLD NAME"
CLOSE 15
The fun is just about to begin! Stay tuned!