10-16-2006, 11:52 AM | #31 |
Fanatic
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
|
Well, I also tried a little experiment.
1) Tried adding a TTF font to the C:\Program Files\Sony\CONNECT Reader\Data\fonts directory and changing the kconfig.xml. This didn't seem to make any difference, as if the CONNECT app's use of the fonts was not really based on the XML config, but predefined in the code. 2) Added Cyrillic support to tt0011m_.ttf using FontForge (copied the Cyrillic characters from Times New Roman, AutoHint'ed and AutoInstr'ed). Once I copied the changed font to the CONNECT Reader directory, the CONNECT PC program was able to support the Cyrillic. 3) Tried to upload the new font to the ebook, using ebook.py (after backing it up, of course ). Well, this didn't work. I suspect, the directory /opt/sony/ebook/FONT may not be writable by the "user", represented in the Readed's runtime by the USB Upload helper. So, perhaps we can write into the /tmp directory, but not into the /opt/sony/ebook.... At least not yet. If you are interested, here is the message I got back when trying to overwrite the font: C:\Program Files\Sony\CONNECT Reader\Data\bin>ebook.py put tt0011m_.ttf /opt/sony/ebook/FONT/tt0011m_.ttf Sony Reader utility 0.2 (c) 2006 Igor Skochinsky Uploading tt0011m_.ttf as /opt/sony/ebook/FONT/tt0011m_.ttf Traceback (most recent call last): File "C:\Program Files\Sony\CONNECT Reader\Data\bin\ebook.py", line 430, in <module> upload(b, localfile, remotefile) File "C:\Program Files\Sony\CONNECT Reader\Data\bin\ebook.py", line 386, in upload f.write(file(local,"rb").read()) File "C:\Program Files\Sony\CONNECT Reader\Data\bin\ebook.py", line 140, in write raise os.error, "Error writing %d bytes to file '%s'"%(slen, filename) NameError: global name 'filename' is not defined |
10-16-2006, 11:56 AM | #32 | |
Addict
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
|
Quote:
|
|
Advert | |
|
10-16-2006, 12:05 PM | #33 | |
Fanatic
Posts: 556
Karma: 1057213
Join Date: Sep 2006
Location: North Eastern U.S.
Device: Sony Reader
|
Quote:
http://files.ebook.googlepages.com/Dutch801BT-Roman.ttf Just overwrite the tt0011m_.ttf with this font, and see what happens (you can of course use BookDesigner to generate Cyrillic LRFs). I never really had any doubts that it would be easy to "cyrillize" the CONNECT PC thing. The question is, how do you copy the same font into the Reader. |
|
10-16-2006, 05:16 PM | #34 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Thanks for the info porkupan! I'll see what I can do about the problem
|
10-16-2006, 06:31 PM | #35 | ||
Addict
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
|
Quote:
Quote:
Last edited by Slava; 10-16-2006 at 11:21 PM. |
||
Advert | |
|
10-16-2006, 07:05 PM | #36 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Okay, so I did some investigation (mostly consisting of reading S20libromount script ) and here's the summary:
/opt, /opt1/keys and /opt1/info are mounted from cramfs images, meaning they're read-only. /opt0 and /Data use jffs2 which is writable /etc and /var are copied to ramdisk (created in /dev/shm/) and remounted at /, so we can't access the original dirs. Sooo, the only way to change the files in /opt/ would be to change the actual cramfs images in the flash, which seems to be doable during the firmware update process. I will investigate how it's done but I don't think I'll be brave enough to attempt the actual reflashing |
10-16-2006, 07:21 PM | #37 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Here's the flash memory map:
dev: size erasesize name mtd0: 00200000 00010000 "sdm device NOR 0" mtd1: 079a0000 00020000 "sdm device NAND/SBL 0" mtd2: 08000000 00020000 "eBook-1 NAND flash partition 0" mtd3: 00040000 00010000 "Loader" mtd4: 00010000 00010000 "Reserved" mtd5: 00010000 00010000 "FIS directory" mtd6: 00080000 00020000 "nblconfig" mtd7: 00180000 00010000 "Linux" mtd8: 00010000 00010000 "msbios" mtd9: 00010000 00010000 "Id" mtd10: 00010000 00010000 "Info" mtd11: 00160000 00020000 "Linux0" mtd12: 007e0000 00020000 "Rootfs2" mtd13: 00980000 00020000 "Rootfs" mtd14: 00700000 00020000 "Fsk" mtd15: 00300000 00020000 "Opt0" mtd16: 05be0000 00020000 "Data" Mapping to the filesystem: Id -> /opt1/keys Info -> /opt1/info Fsk -> /opt Opt0 -> /opt0 Data -> /Data Can't confirm it, but it seems likely that "Rootfs" is the rest of / |
10-16-2006, 10:31 PM | #38 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
|
Quote:
|
|
10-17-2006, 02:27 AM | #39 | |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
Quote:
Couple of questions about this: 1) is the size that gets passed through for the read data just for the extra stuff; i.e. for FileOpen it would be "sizeof(FileOpenAnswer) - 16"? 2) Should the "Answer* answer" arg in UsbReceiveProc actually be "Answer** answer", i.e. something like: Code:
FileOpenAnswer *pAns = 0; HREF hErr = UsbReceiveProc(pReq, sizeof(FileOpenAnswer)-16, &pAns); if (hErr == 0) { // do something with the answer ... // free the answer UsbFreeProc(pAns); } |
|
10-17-2006, 03:36 AM | #40 | ||
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Quote:
Quote:
|
||
10-17-2006, 04:26 AM | #41 |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
Good - I think I'm almost done - I just have one area that's still a bit unclear which is the returned data from DirEnumNext. It seems you're passing in an answer size of zero in this case but are getting back a type and filename (with no length; is it nul-terminated?)
|
10-17-2006, 05:45 AM | #42 |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
No, there is a size, I just don't use it.
Code:
struct DirEnumNextAnswer: Asnswer { DWORD nType; //1=file,2=dir DWORD nPathLen; char path[1];//of nPathLen bytes }; |
10-17-2006, 11:58 AM | #43 | |
Addict
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
|
Quote:
|
|
10-17-2006, 12:09 PM | #44 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
Where'd you turn that up, Slava?
|
10-17-2006, 12:14 PM | #45 |
Addict
Posts: 285
Karma: 129
Join Date: Sep 2006
Location: New England
Device: PRS-500 · iPad · K3
|
From the Stuart Young's Post. And he (and other non-us owners) got it from Sony Connect eBooks Team's email.
Last edited by Slava; 10-17-2006 at 12:18 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PRS-500 Reader Internals 2.0 (pics!) | lint | Sony Reader Dev Corner | 60 | 11-18-2013 08:25 AM |
Kindle DX Internals | revilo | Amazon Kindle | 0 | 06-15-2009 04:50 AM |
Kindle 2 Internals | JSWolf | Amazon Kindle | 19 | 02-27-2009 02:45 PM |
PRS-500 Connect internals | igorsk | Sony Reader Dev Corner | 1 | 10-12-2006 04:50 AM |
iLiad Iliad internals | ali | iRex Developer's Corner | 39 | 07-21-2006 04:28 AM |