Hacking the Xyron Design Runner Chapter 1: Homebrew USB Card Reader/Writer

Code 2: PC Software

The PC software is pretty lame, but it works. It’s written in VB6 and talks to the Teensy as if it were a USB COMM port. So it’s much quicker than a standard COM port, but overall the speed is nowhere near what you’d get if you rewrote it in C or something. If you do, let us know and we’ll post your work.

The present read write speed is as follows:

  • 25-30 seconds to read an entire 2MB card
  • 75 seconds to erase/write an entire 2MB card.

Which really isn’t that bad considering 4096 10mS page erases would take 40 seconds anyway. Let’s start with an overview of the tool


Fig 8 – The XYRW Software Tool



There’s the screenshot, with the interesting bits numbered. Like most of the tools you get from OS, this one has some low-level debug features you’ll probably never use. But at least you can rip into the code and look at how each crappy function works. :)

  1. Open COM button attaches to the Teensy using the USB COM port you fill in next to this button. Or dies ungracefully if no Teensy is found.
  2. Close COM. Not really needed, but in some cases you can hang stuff if you don’t release your ports.
  3. COM Indicator. Green if the USB COM port is successfully attached. Red if not.
  4. Init/Get Status. Gets the DataFlash card status, and clear’s the card’s command buffer. Also clears the tool’s internal memory buffer to all 00′s. Used mostly to see if a card is attached, but the tool also parses out the status value sent back by the card to determine what the size of the DF card is. The Xyron cards usually have an “all good” status of $AC, meaning 2MB in additon to being all good.
  5. The number of pages parsed out of the status byte
  6. The bytes per page parsed out of the status byte.
  7. Get the page designated in the text box next door, and stick it in the proper location in the tool’s internal buffer.
  8. Buffer Status. Red if blank, green if even a single page has been retrieved.
  9. GET ALL. Probably your most common usage. Counts from 0 to the number of pages designated by the status, and fetches each one in turn. You can watch the page count and status bar update. The BREAK button stops the fetch, keeping the data in memory that’s already been fetched. Get status again to clear the internal buffer.
  10. Writes entire buffer to the file designated, even if it’s only holding one page and is 2MB of 00′s.
  11. Loads the file to the tool’s buffer, overwriting anything that’s already there.
  12. Writes the specified page from the tool’s buffer to the DataFlash Card. First, the page (and only that page) is erased. Then the data is loaded and flashed to that page only.
  13. WRITE ALL. Your other most common usage. Steps through each page in the buffer and writes them all to the DataFlash. Break interrupts the writing process, leaving all completed pages as-is.

There you have it. Very basic stuff.

We’d love to develop a full-featured “card editor” tool, where you can just drag & drop your pics right in, but we’ve still got to figure out the format of the cards. In order to do THAT, we needed some low-level tool in order to do test reads and writes. So here it is.

At this point, you’ve endured enough punishment to earn your reward. The schematic and PCB layout are above, and here’s the source and executables for each of the software tools.

Teensyduino Sketch and Precompiled Hex File for the Reader Firmware


VB6 Project and Executable of XYRW Read/Write Tool

Of course, the Teensyduino sketch could be ported to the big boy WINAVR version with relative ease. The XYRW tool would need to be rewritten entirely to port to C or .NET, but it’s a chore that can be left to the future when we have some greater abilities with the device.

As we mentioned, the next task is to determine the format of the data on the card. All of you are welcome, of course, to take a crack at it. The email for this project is XDR at openschemes dotcom if you’d like to get in touch or contribute.

If you have any Xyron cards, you can easily read them in and begin investigating with a hex editor. Our final gift to you (for those who don’t have an XDR but just love hex) is a couple of bin files from a test card we’ve made. A blank card simply contains all $FF’s, so that’s not interesting. What we’re posting here are two card images written with the chalkboard font and several test phrases.

The first test image has 56 enties: First, each capital letter saved as it’s own entry, then A-Y (Z wouldn’t fit – too long), then each lowercase letter as it’s own entry, then a-z in lowercase. Finally, two test messages: The first in CAPS, the second in LOWERCASE. Hax0r respect goes out to the first one to decode the test messages, as evidenced by your posting it in a comment. Extra 733t points if you can link to an image rendering the test messages – remember folks, we believe we are looking for black & white bitmaps. BTW – The space reported by disc maker is 106/215 blocks remaining.

The second test image will help decode the FAT table. First, there are ten entires containing only the capital letter “A” in increasing lengths in Chalkboard Font. For example: A, AA, AAA… Next, the same sequence using Distressed Font. Finally, three random pics from the “Starter Disc”, #5, 15, and 34 – chosen for their variable length, and named “e”, “o”, and “H” due to the weird way they are indexed by the Disc Maker. The remaining space on test image 2 is reported as 122/215.

Here are the Openschemes Xyron Test Discs



These test discs are made by us, they are not Xyron discs. However, they do contain images and artwork from Xyron so if they ask us to take them down, we will. Hopefully it should not take long to decode the disc format and begin generating our OWN stuff in an awesome printing frenzy. Personally, we just wanted a way to datestamp lab notebooks, and look where that got us.

Until next time – happy scheming!

This entry was posted in Hacks and tagged , , , . Bookmark the permalink.

26 Responses to "Hacking the Xyron Design Runner Chapter 1: Homebrew USB Card Reader/Writer"

Leave a reply