gp2x_vtex 0.2 - An improvement on the standard e-book viewer

I know, the GP2X comes with a text file viewer.  But I can't stand that it doesn't make an attempt to word wrap.  This viewer wraps and breaks the text on spaces (unlike the built-in ebook viewer, that doesn't do any formatting).  It also displays what line you are on, and gives some general help in the status bar area while you are viewing text.

There should be 4 files in this zip:
gp2x_vtex.gpe    - The text file viewer
simplefont.tga   - A bitmap font
gp2x_pdb2txt.gpe - A simple pdb-to-txt converter
READAME.txt      - This file


I would recommend making a seperate folder and putting all of the files in that folder.  You can search for different text files in other folders from the application.  However, it defaults to initially looking in the directory where the app is stored.

To run, start gp2x_vtex.gpe.  A dialog appears, allowing you to select a text file to view.  Use the joystick or X/Y to scroll the list up and down one line at a time.  Use the L and R button to scroll a screen at a time.  Press B to select a file to view.  Entries that have a 'D' in the first column are directories.  Selecting a directory will move the path to that directory, and pull up a list of the files.  Press start to get back to the main GP2X display.

When a file is first selected for viewing, the program counts the number of total lines (this will take a number of seconds).  It is building an index file (named '.<filename>.vtex').  This helps speed up viewing later.  On subsequent loads of the text file, there will be no line counting, as the index file contains all the info necessary.  This allows viewing of very large text files easily.

When viewing a text file: joystick up/down or X/Y to scroll the list up and down one line at a time.  Use the L and R button to scroll a screen at a time.  Holding down any of these buttons will cause the move to be repeated.  Continuing to hold the buttons down will make the program scroll faster and faster.

Press A or start to go back to the directory list.

Joystick left will cause the viewer to go back to the beginning of the file.
Joystick right will go to the end of the file.


The program automatically keeps up with your position in every file you view.  When you come back to a file, you will be at the same line as when you last quit viewing the file.

======================================
version 0.2 changes : holding down the line & page up/down buttons will
repeatedly move up or down (you don't have to keep pressing the buttons over
and over).  Added the ability to jump right to the beginning (joystick left)
or the end (joystick right) of a file.  
======================================

The gp2x_pdb2txt.gpe uses the same basic dialog controls to select a .pdb file.  When a file is selected from this app, it creates a <filename>.txt file suitable for viewing with gp2x_vtex.gpe.  (The decoding routine comes from txt2pdb, by Paul J. Lucas... I just slapped a file selector on top of it and compiled a GP2X version).

If you run into any issues, please email at :

larryr2@bellsouth.net

and if possible, send a copy of the text file that caused the problem, so that I can correct the code.  

Thanks.
Larry Richardson
