8 bit device kindles eBook fire: An e-reader for the microtouch.

With all the fuss over Kindle Fire I thought it might be fun to see if the humble 8-Bit microtouch hardware would do a servicable job as an e-reader. With a bit of fiddling it turns out to be a quite capable if not entirely practical eBook.

Ebook

There are hundreds of thousands of books available in the epub format. The format is essentially a collection html/css/jpeg files and xml metadata such as author/title/table of contents bundled into a zip file (If you want to look inside an epub file simply change ‘.epub’ extension to ‘.zip’ and double click). I thought it might be possible to build a reader for the microtouch that would directly read a standard epub but the code and memory requirements for things like jpeg/png/gif decoders, xml parsers and decompression overwhelmed the available 2.5k RAM/32k Flash. The alternative was to transcode into a format that retained all the structure of the epub in a form easily digestible by a small, 8-bit device.

 

 

 

The transcoding tool (epubgrider) reads standard epub format files and creates ‘.epb‘ files readable by the microtouch code. The transcoder has a rudimentary layout engine that formats and paginates the html content, mapping font sizes and styles to those appropriate for viewing on a 320×240 screen. It records and stores hyperlinks within the html and resizes and transcodes images from jpg/png/gif etc to a raw 16bit RGB format. The transcoder then packages text/images/links/fonts etc with a spatial index in a ‘.epb‘ file. The spatial index allows fast scrolling through books with thousands of pages – 8500 for the largest book I found. Fonts are stored along with book so in theory books can have any typeface they like – epubgrinder can generate anti-aliased bitmap fonts from outlines. ‘.epb‘ books can be bundled into ‘.bks‘ bookshelves. Both formats are based on ‘blob’ files, a simple hierarchical data format that is suitable for 8-bit micros with microSD cards.

The net result is a little handheld device with virtually any number of books containing any number of pages. When launched the app shows a scrolling list of available books. Touching a book opens it in the reader, touching the right edge scrolls by page, touching the black bar at the bottom returns to the book list and saves your place in the book. The reader supports illustrations, hyperlinks within books for navigation and footnotes.

 

As always code is posted at https://github.com/rossumur/microtouch. The epubgrinder tool is based on the QT framework, contains a microtouch simulator and runs on Windows, Mac and Linux. There are a number of interesting .epb books and .bks bookshelves in the microSD folder and in the books.zip file in the tools directory.

 

If you don’t want to build your own microtouch, the lovely folks at adafruit will sell you a prebuilt one. 

 

until next time,

Rossum

 

Advertisement

15 thoughts on “8 bit device kindles eBook fire: An e-reader for the microtouch.

  1. colinb

    Really great.

    Where do you get your TFT LCD displays? I haven’t found too many good sources in the U.S. (Newhaven Display, DisplayTech, ?), and most Chinese suppliers prefer to deal in high volumes.

    Reply
  2. Gerald Crawford

    Wonderful job, dude!

    While the screen size is small, a pocket reader would be any awesome thing to have in, say, your pocket.

    Protip: Market it before someone else does!

    Reply
  3. Anonymous

    Rossum, if you’re interested, I’d like to help by designing and maybe supplying a case for the microtouch. I think it would transform it…

    james (at) diago.co.uk

    Great work by the way…. 🙂

    Reply
  4. Anonymous

    Hi – maybe it is late and I am too old to focus when the sun goes down, but I see the sources. However, can someone direct me to a parts list and schematic? Sorry if I seem like a dummy, but I just don’t see it.

    Thanks

    Glen

    Reply
  5. Anonymous

    Hi , very cool project. I was interested in trying out the epubgrinder app
    but I don’t know how to build it from sources and how do I run the simulator in ubuntu, Can you point me in the right direction please?

    Reply
  6. pdrift

    Hi I’ve just recently come across your projects and i’m in awe…
    I hope to be able to undertake projects like these some day.
    I’m going to teach myself.
    I would like to know how to build the epubgrinder app and the microtouch sim for ubuntu.

    can you point me in the right direction please?

    Reply
  7. glfranco

    pretty cool device – so much so it has sparked my interest in using it as a proof of concept platform for an idea i have,.
    by the way who is the manufacturer of the lcd panel, would like to see if they have a 4 nch panel that could be retrofitted to the microtouch

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s