disk image management for brother kh940 knitting machine
Fetching latest commit…
Cannot retrieve the latest commit at this time
Disk image manager for knitting machines. Machine capabilities: * Brother Electroknit KH-940 * Brother Electroknit KH-930 (BETA=not tested) * ! Your machine here? Help out the project! :) Disk image capabilities: * 80k disk image files (our proprietary format) * Steve Conklin's Tandy PDD1 floppy drive emulator data folders Picture read capabilities: * raw (our proprietary format) Emulation capabilities: * PDD1 floppy drive FDC emulation mode (limited) == FILES ============================================================= bin-X/ Binaries/executables for operating system X lib/ Source files for the disk image manager/emulator cli/ Source files for command line interface cpp_class/ Source files for C++ wrapper disk_images/ Samples of disk images 1.img Three small designs (actual data from machine) 2.img Two wide/tall designs (actual data from machine) 3.img Seven very different designs (generated file) doc/ File/memory layout description ptn/ Sample patterns as both original bmp and raw win-cli-make.bat Build CLI program (windows batch file) linux-cli.make.sh Build CLI program (linux shell script) == HOW TO USE ======================================================== Compile and launch knit executable. Typing ? or help will give ?/help show this r/read read in data from file w/write write out data to file m/machine select knitting machine f/format clear all tracks t/track set working track a/add add pattern to track s/show display content of track i/info additional track info e/emulate emulate floppy q/quit end program x/halt halt on errors read - Reads image on disk to memory The file can be either disk image or folder with emulator files. Entering the name of a file will read it as a disk image, ie: filename> sample/1.img Entering a folder name, ending with a (back)slash, will read Tandy FDD1 emulator file folder, ie: filename> fddemu/img/ write - Write memory to image on disk The file can be either disk image or folder with emulator files. See "read" command for more info. machine - Select knitting machine This will show the currently selected machine as well as list the available/supported machines. After listing, you are prompted to select a new machine and this is selected by typing the short name of the machine you wish to use, ie: machine> kh940 format - Clear computer ram contents This will delete everything currently contained in memory and ready the program for input of a new file. track - Set working track The machine can store patterns in two separate tracks and this is chosen when saving/loading from the machine. This will sets the current working track for add, show and info commands. Tracks are entered as a number between 1 and 2, ie: track> 1 add - Add a pattern to memory The pattern is read from a raw image file, ie: filename> patterns/903.raw See doc\raw_format.txt for a description of the format. show - Show patterns contained in memory This will list all available patterns and to into pattern display mode. In this mode you get the following promt: pattern> instead of the regular one. To exit this mode enter d, done or simply enter a blank line. While in this mode, enter the pattern number of an available pattern to print out a graphical representation of the pattern as well as it's binary data representation. info - Shows additional non-pattern information This will display all important fields in the currently loaded file and run a verification suite against all of the know values. Verifications are done against the most common and verified to work values that have been downloaded from the machine. Therefore it MAY give FAIL on "write pointer" entries and/or the "loaded head" entry for some files because the machine sometimes inserts a 0x00 byte between patterns which causes a mismatch of 1 for these values. Exactly when/why this is done is uncertain, but it is not needed when writing patterns, so it may actually be a bug in the machine. Additionally, MOST parameters WILL give FAIL on a blank formatted file, regardless if done via device or this program. For a file generated using this program all parameters should give OK before attempting download. emulate - Start floppy emulator This will ask for a serial device and the format is different depending on your system. For linux-flavors, it will usually look like: serial device> /dev/ttyS0 For windows, it will look something like: serial device> COM1 After entering a serial device, the program will go into floppy emulation mode. You can exit this mode by sending a SIGINT, which is usually Ctrl+C on most systems. While in this mode, you can use the knitting machine to save or load data into program memory, which can first be build using add or read using read. After saving from the machine you can keep it with write. quit - Self explanatory Go outside and enjoy the weather halt - Enable/disable halt on errors Enabling halt on errors is good for command line execution == BATCH EXECUTION =================================================== All commands can be executed from command line, for example: knit x a ptn/tile.raw a ptn/inca.raw a ptn/text.raw w test.img q Will do the following: * Enable halt on error * Add ptn/blocks.raw as #901 * Add ptn/inca.raw as #902 * Add ptn/text.raw as #903 * Write disk image to test.img * Quit In addition commands can also be piped in, or typed manually in succession at any prompt within the program.