ElectroknitKH940

From Forskningsavdelningen Wiki
Jump to: navigation, search


GIT repository[edit]

knittington repository @github contains source code and binaries (executables) for:

  • Linux
  • Windows
  • Soon: Mac

Supported machines[edit]

  • KH950
  • KH940
  • KH930 beta

Participants[edit]

  • STG (Format-figger-outering, programming)
  • Varvara & Mar (testers, Artists using the Machine)
  • Perhaps: JonasB (Mac porting)

Introduction[edit]

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.

Process[edit]

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.

Results[edit]

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.

Fake! (the patterns were flipped left to right, I can haz futuhshuppd?)

Moving on from there[edit]

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:

Screenshot 12-05-30