Loading ...
Sorry, an error occurred while loading the content.

Progress deciphering the data format

Expand Messages
  • Davi Post
    Those of you who have delved into the internals of the Electroknit memory format may be interested in some progress I made in deciphering some critical
    Message 1 of 3 , Apr 11 11:46 PM
    • 0 Attachment
      Those of you who have delved into the internals of the Electroknit memory format may be interested in some progress I made in deciphering some critical locations.

      To develop img2track, I studied Steve's documentation on the data files, and ran a bunch of my own experiments using his emulator. I figured out three important words in the data, which are pointers to data patterns and the pattern directory.

      The key discovery was that these pointers are stored as offsets from the end of the file (the highest memory address).

      The first word (2 bytes) of each 7-byte directory entry is the offset to the pattern's data.

      The word at location 0700 gives the offset to the start of available pattern storage (growing backwards).

      The word at 0710 gives the offset to the next available directory entry.

      (The word at 070A appears to be the offset to the last row of the current pattern, but my program doesn't use this.)

      When I wrote a program to set these three pointers appropriately, the KM loaded the pattern correctly. This avoids the step in the previous hack of manually creating an empty container with the desired pattern dimensions before inserting the data.

      Steve had previously documented many other locations in the data. (See his docs/file-data.txt.) Some are essential, but most are not necessary for loading a pattern -- the machine will regenerate them as needed. 

      I've experimented with setting the Selector and motif data, hoping to avoid having to run through these settings manually before knitting. (The machine calculates position automatically, but you have to enter number of copies when using Selector 2.) This is not working, probably other settings are required. There are further mysteries left to be conquered!

      The critical locations are documented near the top of the img2track Python code.

      Thanks to Steve Conklin and John Hogerhuis for pioneering this effort!

      --Davi Post

    • Steve Conklin
      Davi, This is great news. I d like to get this into the documentation - could you send me a diff to my document, or better yet send a pull request for the
      Message 2 of 3 , Apr 16 5:43 AM
      • 0 Attachment
        Davi,

        This is great news. I'd like to get this into the documentation -
        could you send me a diff to my document, or better yet send a pull
        request for the adafruit git repo with the changes?

        This information is also what I needed to do more work on a new python
        class I'm working on to encapsulate knitting data, whenever I have
        time to get back to that . . .

        Steve
      • Davi Post
        Steve, feel free to use my info to revise your documentation. I m busy working on the software, and hope to have more discoveries to contribute in coming
        Message 3 of 3 , Apr 22 1:10 PM
        • 0 Attachment
          Steve, feel free to use my info to revise your documentation. I'm busy working on the software, and hope to have more discoveries to contribute in coming weeks. If you publish an update on it, I'll let you know if I find inaccuracies.

          I think many of the memory locations are temporary storage for the firmware, and while they may be interesting and potentially useful, are not needed to load pattern data. I hope to learn which are the critical ones for other functions and models.

          --Davi


          On Mon, Apr 16, 2012 at 7:43 AM, Steve Conklin <steve@...> wrote:
          Davi,

          This is great news. I'd like to get this into the documentation -
          could you send me a diff to my document, or better yet send a pull
          request for the adafruit git repo with the changes?

          This information is also what I needed to do more work on a new python
          class I'm working on to encapsulate knitting data, whenever I have
          time to get back to that . . .

          Steve


          ------------------------------------

          Yahoo! Groups Links

          <*> To visit your group on the web, go to:
             http://groups.yahoo.com/group/kminternals/

          <*> Your email settings:
             Individual Email | Traditional

          <*> To change settings online go to:
             http://groups.yahoo.com/group/kminternals/join
             (Yahoo! ID required)

          <*> To change settings via email:
             kminternals-digest@yahoogroups.com
             kminternals-fullfeatured@yahoogroups.com

          <*> To unsubscribe from this group, send an email to:
             kminternals-unsubscribe@yahoogroups.com

          <*> Your use of Yahoo! Groups is subject to:
             http://docs.yahoo.com/info/terms/


        Your message has been successfully submitted and would be delivered to recipients shortly.