knittington repository @github contains source code and binaries (executables) for:
- Soon: Mac
- KH930 beta
- STG (Format-figger-outering, programming)
- Varvara & Mar (testers, Artists using the Machine)
- Perhaps: JonasB (Mac porting)
Varvara & Mar showed up at STPLN with a KH940 knitting machine.
They used an Arduino to emulate the keypad of the machine in order to transfer patterns from the computer and for large patterns, this could take in the range of several to eight hours because the machine only accepts roughly one key press per second.
They also had a machine with much less memory, a KH930E, for which they had a floppy drive emulator and a program that could replace patterns in existing disk images, but the disk images had to be created and downloaded from the machine first.
And of course, the disk image format for the KH930E was very different from that of the KH940, so the software could not be used here even though the emulator still worked just fine.
Varvara used the floppy emulator to generate a bunch of disk images from different pattern inputs and by analysing the differences between the files, patterns quickly emerged and the data could be structured into documents where data was nicely separated (as opposed to a raw hex view).
It was clear that the file was a memory dump rather than an actual "file format", which explains the differences between different software revisions in the machines.
After a few hours most addresses and formats were clear as crystal and the knitting patterns could easily be read from the file but generating files from scratch did not work at first though - the machine simply refused them. However, the last few "unknown pointers" revealed their true meaning after some nightly meditation.
A test file containing seven very different patterns, testing all variants of memory alignment (this has a 4-bit processor and has alot of data aligned to nibble boundaries and a few other oddities) was written out.
Well, the second test file worked!
The project resulted in a disk manager program in C, humbly named "knit", as well as a full format description, now available on github.
Moving on from there
Yup, couldn't stop. Had to add multimachine support and a built-in emulator. Needed a GUI.
Still lots to do to make it more useable, but this is where it's at: