gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > FBreader port technically possible plucker ebook format

#129566 - mrbass - Wed May 23, 2007 8:15 pm

Before I even attempt to learn or ask some developer friends for help is it possible to port FBreader to DS? It was originally developed for the Zaurus PDA and since then has been ported to:

HTML, CHM, RTF, non-DRM'ed mobipocket, plucker, plain text among others. http://www.fbreader.org/about.php

I know zip decompression is impractical on the DS, etc. due to the ARM processors and limited memory.

I know PDF will most likely never be supported and png maybe someday but author of Phidias gave up trying to implement it in his homebrew painting app.

Plucker is a GPL format and so is FBreader so the sources are readily available. But I guess my main questions is it doomed from the start due to the technical limitations of the DS?

FBreader has been ported to the following platforms:
Linux, Windows, Mac, FreeBSD, Maemo, Zaurus, Simpad, Archos, and Pepperpad, Irex iLiad, Motoroala E680i/A780.

#129747 - Karatorian - Sat May 26, 2007 1:00 am

The main problems will be code size, document size, and memory requirements. Unless you use some sort of bank switching or cart swapping, the code + documents will have to total less than 32 MiB in size. This may or may not be possible, depending on the size of the program.

While proccessor speed may be an issue, it's not a breaking one. It will simply slow things down, not make the port impossible. The major factor is going to be memory usage. How much memory does the application require and can that requirement be reduced? These are the things you need to figure out.

Without knowing anything about the code base, I'd estimate that you ought to be able to port support for the simpler formats such as plain and rich text, at least. HTML support is going to be alot harder. I don't know enough about the other formats to be able to comment on the feasability of supporting them.

As for PNG support, I suspect it can be done. If you can mangage to get an implimentation of zlib working on the GBA, the rest should be pretty easy. However, it might be better to precompile all graphics into a more GBA friendly format. As you are going to have to build a tool of some sort to make ROM images that have the documents you wish to veiw, the same tool could convert the images to 15 bit color and compress them in a format easier to handle on the GBA. A similar approach could be taken for doucment compression in general.

Good luck. I belive at least a portion of the feature set should be doable.

#129760 - tepples - Sat May 26, 2007 4:09 am

Karatorian wrote:
The main problems will be code size, document size, and memory requirements. Unless you use some sort of bank switching or cart swapping, the code + documents will have to total less than 32 MiB in size.

Only on traditional GBA cards, using GBFS or FCSR. Most other cards can use libfat on a much larger storage medium.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.