GameBoy Advance eBook
by Dan Cotter

Version 0.3 (bld. 38)
New version with SAVE RAM support! Automatically saves all your settings and loads them next time your turn on your GBA.

This software package is 2001 by Dan Cotter.
Do not distribute or copy this software. It is only available from: members.optushome.com.au/dancotter on the net.


Contents:
[1] Controls
[2] Features
[3] Whats coming soon
[4] How to include a text file into the ROM
[5] Notes / extra
[6] Credits
[7] History


~[1] Controls

A - Next page
B - Back page
Up - Scroll up line
Down - Scroll down line
Left - Change background color
Right - Change text color
Start - Back chapter
Select - Next chapter
L - Next page
R - Next page


~[2] Features

- Variable width 'verdana' font
- Line by line scrolling
- Page by page scrolling
- Color change abilities
- Slapped together intro with really crappy looking colors

NEW:
SAVE FEATURES-
-Automatically saves your reading position.
-The colors you choose are also saved.
-All saves are automatic (no need to hit a save button or anything before turning your gba off.
-Settings are automatically loaded the next time you run the ebook software.



~[3] Whats coming soon

-Subpixel rendering, nearly had this done for this version but didn't get the blends working properly.
-Support for multiple fonts
-Rotation and scaling with on the fly text wrapping
-Support for different orientations



~[4] How to include a text file into the ROM

- Unzip everything in the .zip file to any folder.
- Edit the 'text.txt' file to include all the text you want to be on the rom.
- You can place tildes any where in the text file and it will act as the start of a chapter (ie. you can use start and select to jump between the tildes).
- Run the 'make_rom.bat' file. The rom to use is called 'ebook.gba'



~[5] Notes / extra

- The character 0xFF is reserved for EOF use. If your text file contains this character at a place apart from the end of the file, errors may occur.
- Each tilde character should start on a new line. And they must be at least a screen apart otherwise they won't count.
- In this version there is only support for 1 text file. So if you want to include multiple ones just but all the text into one file and use the tilde chapter things to jump to what file you want.
- There are limits on the amout of text data you can fit. 192KB of space is reserved for the program. So if you have a 64Mb flash cart you can fit about 8000KB of text data.
- Please note I don't think unix or mac text files are supported yet. Also please note that the text files are wrapped before they are put into the GBA rom. If you text files are already wrapped then you must unwrap them using the 'unwrap.exe', just type 'unwrap.exe in.txt out.txt' at the dos prompt.
- There are some minor bugs which allow you to goto the next page when you are on the last page but oh well.
- This version was test on real hardware using flash advance linker and worked fine. Also tested on these Emus: MappyVM 0.7b (worksfine), BoyCott 0.21b (splash screen is wrong, emu does not support rotation scaling correctly, also displays text wrong sometimes or something...) and iGBA (works fine). 
- Please do not make the files available at your site. I want to keep it at my site so I can see how many hits I get, if there are heaps I will develop this project alot more, otherwise I won't waste my time.
- SRAM format info: Very simple. First 8 bytes must be "EBOOKGBA" (its the header). Next 4 bytes are the number of charaters into the text file the read is (this should be the start of a new line). Next byte is the background color, and the next byte after that is the text color (only 20 colors at the moment, 0 - 19).
- If you change what text files are stored you will need to reset your SRAM, else the saved data will be incorrect for the new book. To do this use faw20.exe (or whatever) to write junk to SRAM area (ie. some other games save file).


~[6] Credits

Coded by Dan Cotter.

I welcome all comments, suggestions and questions. Email dancotter@optushome.com.au, or ICQ: 70100050. Please be sure to say that your talking about the text reader!

Special thanks to these people for excellent software which helped me out:
- Jeff Frohwein (for Flinker)
- Alexander Davidson (for Metapad)
- Christain Maas (for XVI32)
- Joat (for Hackit and MappyVM)

Special thanks to Neil Sidlow for the intro graphics.

There have been heaps of people who have helped me out relating to GBA DEV and coding problems mainly from the Mail list and on #gbadev on EFnet, and I thank you all!

~[7] History

0.3 - New graphics. SRAM support which automatically save you reading position and colors.
0.22 - Speed improvements, and new graphics.
0.21a - You can now use L or R to change pages as well.
0.2a - First properly working version, can now read a whole text file.
0.1a - Displays strings on the screen in the variable width font.
The End