Vintage Palmtops Tips & Tricks

13Feb/134

Atari Portfolio as an e-book reader

You may think that the Portfolio is no good for reading books, but well, people read on smartphones (3,5" backlit screen with tiny letters on it) or laptops (3 kg or so), so why not give Pofo a try? After all, its screen is clear and readable (though small) and I heard of users having read quite a lot of literature on it back in the days.

The famous BJ Gleason once wrote a text viewer that became the best solution for reading books on the Portfolio. It is not only a viewer, but also a utility that "incorporates" the content into the program, making a single .com file that can be compressed, shrinking it to about half the size of the raw text (!). A few fiction and non-fiction books have been made, some of which you may find here.

If you want to make your own, here's the easy way to do it, provided you have a Linux machine. I'm sure that these tools (sed, fold, split) are also available for Windows, but surely not out-of-the-box ๐Ÿ˜‰ You'll also need either DosBox or a real DOS machine.

First, choose the book you want to have on your Portfolio. It can be pdf, epub, mobi or any of the popular formats. It shouldn't be too long (though theoretically it may be even "Ulisses", it would simply make more parts), and you'd better choose something without fancy graphics and baroquesque formatting - or you'll get quite a mess after conversion.

Enter http://www.online-convert.com/ and convert the file to .txt (raw text) format. Now the processing part.

1. Remove all custom Unicode characters (or national characters if the book is not in a Western language):
iconv -f utf-8 -t 437//TRANSLIT file.txt > file_1

2. Remove abundant newlines, which have probably appeared after conversion:
sed -r 'N; s/\n+//g' file_1 > file_2

3. Wrap the text at 39 columns:
fold -sw 39 file_2 > file_3

4. Since the size of the file probably exceeds 60 kilobytes, you need to split it to smaller parts:
split -n 3 -d file_3 chunk_
(if you want to split it into three parts; you may also use "-b size" to get the chunks of exactly that size in bytes)

5. You get a couple (in our example three) of files, e.g. chunk_00, chunk_01 and chunk_02. Now the editor's work, especially gluing back the paragraphs broken in the last step. It's also good to check the text against any suspicious characters that might have appeared or weren't correctly transliterated. (Note for Polish users: the letter "รณ" will be replaced with its 437 code page equivalent by iconv, and that might look messy in some editors. Don't worry, it will be correctly displayed on the Pofo.)

6. Change the newline characters to the DOS format:
sed -r 's/$/\r/' chunk_00 > ch1
sed -r 's/$/\r/' chunk_01 > ch2
sed -r 's/$/\r/' chunk_02 > ch3

7. Move the resulting files (ch1, ch2 and ch3 in our case), as well as the makeread and compack utilities to a directory accessible by DosBox and run the emulator.

8. At the beginning of each chapter/part (just before its title) add an ASCII 254 character (Alt-254). You can do it using most of the text editors available for DOS, for instance that coming with Volkov Commander. These markers will allow you for easy navigation through the book.

9. Make a .com version of each file:
makeread ch1 ch1.com
makeread ch2 ch2.com
makeread ch3 ch3.com

10. Compress them:
compack ch1.com part1.com
compack ch2.com part2.com
compack ch3.com part3.com

That's all, the book is waiting for your hungry eyes ๐Ÿ™‚

Comments (4) Trackbacks (0)
  1. Great post – it works and saved me a lot of time, because I was thinking about making my own program for reading eBooks on PoFo, but this is good solution ๐Ÿ™‚
    Thanks for your BLOG about PoFo, I am reading here very often ๐Ÿ™‚

  2. How do I get the file from my computer onto my atari portfolio?


Leave a comment

No trackbacks yet.