Embroidery format U??: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
No edit summary
Line 19: Line 19:
! Type !! Bytes !! Value !! Description
! Type !! Bytes !! Value !! Description
|-
|-
| `s16` || 2 || | Left
| `s16` || 2 || -X || Left
|-
|-
| `s16` || 2 || | - Bottom  (in y-flipped)
| `s16` || 2 || -Y || - Bottom  (in y-flipped)
|-
|-
| `s16` || 2 || | Right
| `s16` || 2 || +X || Right
|-
|-
| `s16` || 2 || || - Top (in y-flipped)
| `s16` || 2 || +Y || - Top (in y-flipped)
|-
|-
| `u32` || 2 || 0 || Unknown only seen (0)
| `u32` || 2 || 0 || Unknown only seen (0)
|-
|-
| `u32` || 2 || || Stitch Data Count, (if multiplied by 3 will give the length of body)
| `u32` || 2 || count_commands || Stitch Data Count, (if multiplied by 3 will give the length of body)
|-
|-
| `u16` || 2 || || Final X position
| `u16` || 2 || x_final || Final X position
|-
|-
| `u16` || 2 || || Final Y position (-Y if we're y-flipped)
| `u16` || 2 || y_final || Final Y position (-Y if we're y-flipped)
|}
|}



Revision as of 12:21, 23 July 2018

U?? is called FDR internally in some documentations. Barudan stitch information. Usually these are .u01 files.

  • .U01 contains command, stitch triplet data.
  • .U01 contains commands for SLOW, FAST (in both stitched and unstitched forms)

Each file consists of two parts: a header, and a body.

Header

The header comes in two parts.

Part A

  • Bunch of 0x30 "0" characters for 128 characters in all for an unknown reason.

Part B

Some basic extends information

Type Bytes Value Description
`s16` 2 -X Left
`s16` 2 -Y - Bottom (in y-flipped)
`s16` 2 +X Right
`s16` 2 +Y - Top (in y-flipped)
`u32` 2 0 Unknown only seen (0)
`u32` 2 count_commands Stitch Data Count, (if multiplied by 3 will give the length of body)
`u16` 2 x_final Final X position
`u16` 2 y_final Final Y position (-Y if we're y-flipped)

The remainder of the 128 byte section is padded with 0x00 data.

Body

The body starts at position 0x100 (256)

The body consists of encoded stitches. The stitches are in:

Control, X, Y form.

FDR (.u01) Encoding
BYTE 7 6 5 4 3 2 1 0
1 1 -x -y c c c c c
2 y y y y y y y y
3 x x x x x x x x

The control byte contains an always set value, followed by 2 bits of directional information for the X, Y values (whether they are + or -), then five bytes of control.