Thread: PRS-500 HTML2LRF
View Single Post
Old 01-16-2007, 01:12 AM   #58
ReadWrite
Junior Member
ReadWrite began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2007
Device: Sony PRS-500
Global patch: id needs to be static

java -jar ../BBeBook-0.2.jar leaves.xml
[/code]
The generated leaves.lrf is different from the original included in the source tarball. The generated one gives an error in the Connect Reader the original does not. The files are attached. Essentially the difference between the files is that in the generated one the toc object id is 0x32 instead of 0x33 and a whole bunch of bytes that were different values in the original are set to 0x32 in the generated version.

If the original leaves.lrf was generated by BBeBook-0.2, I'm at a loss.[/QUOTE]

GREAT JOB with the decoding!
Minor bug fix to solve 0x32 problem.
The 0x32 is the id value that is not being updated/incremented.
In BBeBObject.java, line 22; make globalBBeBObject static:

private static short globalBBeBObject = 0x32;// Magic.. Ask Sony why all LRF files start here

Not sure this is the most efficient solution, since statics usually mean sloppy programming, but it is the easiest short-term solution.

Keep up the good work.
ReadWrite is offline   Reply With Quote