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

198Re: [kminternals] Re: KH-950i - interfacing - Anyone?

Expand Messages
  • Kevin Blain
    Apr 10, 2012
    • 0 Attachment
      PDDemulator.py is producing files for pairs of 1K block. The KH950i (which has a 62256 32Kx8 static ram chip in it) has 32K of memory, and writes its memory image to disk across 32 1K files. In order to manipulate them on a PC, either the app which plays with them needs to either load in all 32 files, or load a single 32K file.

      Currently Steve's tools for the 930 load in a 2K file (e.g. file-01.dat) - the 930 seems to be a 2K machine - to manipulate.

      I haven't yet played with your image2track program, but I'm looking forward to taking a look soon, it sounds good.

      We're running a set of Steve's tools which I've modified accordingly 'to speak 950' and they are working well so far as we can tell.

      I'll also document and upload what we've seen on the 950i for you guys soon.

      My earlier post had an error, and the correction is as follows:

      "So the 950i therefore has 32K of memory, 0x0000 through 0x7FFF, with the config block starting at 0x7EE0, and the pattern data back filling from 0x7EDF."

      Kevin

      On 9 April 2012 19:16, ayargh <post@...> wrote:
       

      Thanks Kevin, I'm interested in the details on the memory of the KH-950i.

      I don't think you'll need modifications to PDDemulator.py, unless the KH-950i uses a different floppy drive. (For the 950, it would be more appropriate to produce a file-nn.dat that holds all 32 sectors of data, but that file is only for debugging.) The knitting machine knows how to store its memory in 1K disk sectors.

      Have you seen my img2track program (announced in another thread)? It makes several improvements to the process. I'm hoping to add support for the other models in the 900 series that use the same floppy disc interface.

      Your info will help. Please upload one or two examples of your data to the Files area of this group. (Just file-01.dat and file-16.dat are sufficient for each track 1 pattern.)

      Thanks,

      --Davi



      --- In kminternals@yahoogroups.com, Kevin Blain <kevin.blain@...> wrote:
      >
      > Ok. Progress made overnight.
      >
      > I've made some guesses at the 930 and seem to have come up with a winner (
      > http://www.flickr.com/photos/kentfield/6904212212/)
      >
      > I'm assumed that the 930 only has 2K of internal memory, mapped 0x0000 to
      > 0x07FF, as per Steve's document (
      > https://github.com/adafruit/knitting_machine/blob/master/docs/file-data.txt#L324).
      > This I've assumed produces 2 files when run on the PDDemulator, 00.dat and
      > 01.dat. The emulator then concatenates these two files as file-01.dat as
      > Becky kindly pointed out I'd missed in the documentation.
      >
      > The 950i behave differently. I get 32 files: 00.dat through 31.dat, which
      > the PDDemulator bunches up as file-01.dat through file-16.dat.
      >
      > file-01.dat looks like Steve's document starts - with the 'catalogue' of
      > pattens, and file-16.dat ends with the 'config' at the end of Steve's
      > document - the current machine state I believe.
      >
      > So the 950i therefore has 32K of memory, 0x0000 through 0x7FFF, with the
      > config block starting at 0x76E0, and the pattern data back filling from
      > 0x76DF.
      >
      > So Ideally I need a change to the PDDemulator.py script which can take a
      > flag saying we're talking to the 950i and create a 32K large memory image.
      > I don't know yet if the insertpattern.py script will accept a large file
      > like this as input - we'll see I guess! The the splitfile2track.py script
      > will need to be able to split out a 32K image to 16 2K files - no idea yet
      > if it will do that, time to find out I guess.
      >
      > I don't know a lot of Python - I do C, but I'll take a look, unless anyone
      > jumps in and offers....
      >
      > Some of the bytes in the 'config' area (0x06e0 to 0x07ff on the 930) which
      > Steve says are always the same are different on the 950i - I'd guess at
      > least one of these says which machine this is, and maybe we could work the
      > tools to autodetect this from the file if we can work this out.
      >
      > I get to play with my Aunt's KH-970i next weekend, maybe I can learn some
      > more from this, and also a PPD pattern programming device, which should be
      > able to create a disk image for each of the machines in theory, so perhaps
      > can learn more from this.
      >
      > I'll keep you updated.
      >
      > Kevin
      >
      >
      >
      >
      > On 5 April 2012 21:34, Kevin Blain <kevin.blain@...> wrote:
      >
      > > Cool, thanks.
      > >
      > >
      > > Yeah, I'd clearly missed that, but deduced it from what I saw.
      > >
      > > When we try to knit the pattern we create, we get a blank pattern out. I
      > > think the 950i stores everything in a slightly different format to the 930,
      > > so I guess I'm testing the water here to find out if I'm going over new
      > > ground... If so I'll dive in!
      > >
      > > How many nn.dat files do you get, and how many file-nn.dat flies? We're
      > > getting file-01.dat through 16 or 'track1' from the machine, 17-32 for
      > > track2 and 00.dat to 31.dat as track 1 and 32.dat through 63.dat as track
      > > 2, but we also get 64.dat through 79.dat
      > >
      > > The latter group seem blank, but those in file-16.dat seem to contain
      > > 0x06e0 to 0x07ff data containing the machine setup data - though with
      > > differences to Steve's document.
      > >
      > > Worth me detailing it then?
      > >
      > > Kevin
      > >
      > >
      > >
      > > On 5 Apr 2012, at 20:47, Becky Stern <becky.stern@...> wrote:
      > >
      > >
      > >
      > > Hi Kevin,
      > >
      > > I can't help with 950-specific info, but the "file-01.dat" thing is
      > > documented in the tutorial on adafruit:
      > >
      > > http://ladyada.net/learn/electroknit/backup.html (last part) &
      > > http://ladyada.net/learn/electroknit/dumppatt.html
      > >
      > > It's a file that contains all the patterns, and it's made by the emulator,
      > > not the knitting machine. Hope that helps a little!
      > >
      > > Becky
      > >
      > > On Thu, Apr 5, 2012 at 3:06 PM, Kevin <k.blain@...> wrote:
      > >
      > >> **

      > >>
      > >>
      > >> Hi
      > >>
      > >> Let me introduce myself briefly, I'm an embedded electronic engineer by
      > >> trade, with a girlfriend who has a knitting passion and now a KH950i.
      > >>
      > >> So I've been playing with the excellent work by Becky, Steve, John, and
      > >> others to try and get the thing to talk to me.
      > >>
      > >> Where I'm at:
      > >>
      > >> Reading and Writing disk images to the laptop seems to be going without
      > >> much pain, the PDDemulate python script seems to do its job just fine.
      > >>
      > >> Has anyone actually got it working properly with the 950i?
      > >>
      > >> So far, there seems to be differences in the file contents to what I've
      > >> been reading on the net, which is mostly 930 based information.
      > >>
      > >> For example, the stucture of the 00.dat file looks like it follows the
      > >> structure mentioned here:
      > >> https://github.com/adafruit/knitting_machine/blob/master/docs/file-data.txt#L324but moving on through the doc, where it looks at addresses 0x06e0 onwards,

      > >> I don't see this, tough I see similar data in the 63.dat file
      > >>
      > >> I also note that as well as having 00.dat and 01.dat, the contents of the
      > >> two together appear in file-01.dat - this doesn't seem to be documented
      > >> anywhere, is this unique to the 950i or has this info just missed
      > >> documenting up till now?
      > >>
      > >> Kevin
      > >>
      > >>
      > >
      > >
      > >
      >


    • Show all 12 messages in this topic