Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-08-2008, 10:54 AM   #1
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Question Partial screen refresh?

Hello developers,

Is there really no way to do a partial refresh (a rectangular section) of the screen? That's what the include fles suggest (not implemented yet)...
... but the 'walking busy bricks' seem to do just that?!?

Hansel
hansel is offline   Reply With Quote
Old 09-08-2008, 03:21 PM   #2
M@rcel
Connoisseur
M@rcel began at the beginning.
 
Posts: 50
Karma: 32
Join Date: Aug 2008
Device: Irex iLiad
I was told there are four different controller chips each handling 1/4 of the screen.
M@rcel is offline   Reply With Quote
Old 09-08-2008, 06:20 PM   #3
igorsk
Wizard
igorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfoldedigorsk reads XML... blindfolded
 
Posts: 3,443
Karma: 52235
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
Haha that's a good one.
igorsk is offline   Reply With Quote
Old 09-08-2008, 06:22 PM   #4
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
What I'm looking for is a way to refresh only the dirty part of the display, like this (in .../arm-linux/include/liberdm/erdm.h)
Quote:
// Not implemented
int dmDisplayPartial(eDmCmdPriority prior, eDmQuality qual, int xUp, int yUp, int xDown, int yDown );
hansel is offline   Reply With Quote
Old 09-09-2008, 08:29 AM   #5
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by hansel View Post
What I'm looking for is a way to refresh only the dirty part of the display, like this (in .../arm-linux/include/liberdm/erdm.h)
I'm also interested in that. Also in the scribble way of updating, but I've not investigated it yet.

AFAIK, to do partial refreshes you have to open /dev/fd directly and do some ioctls. I don't know the ioctl's numbers or calling conventions, though.

The resources I know that can be useful to learn how to do that are:
- nalim's (Milan Votava) patch for 2.6 kernel has an implementation of the delta driver (display driver). http://www.kwik.cz/irex/
- use strace with the scribble program. AFAICT strace works in the iliad, and outputs to stdout every syscall, including ioctls. ltrace would be great too, but it doesn't work in the iliad, so we can't know what calls to liberdm are done in the scribble program.

If you need more pointers on how to investigate this, just ask :-).
Antartica is offline   Reply With Quote
Old 09-09-2008, 10:17 AM   #6
illiad_fan
Member
illiad_fan began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Jul 2008
Device: Illiad
Quote:
Originally Posted by Antartica View Post
I'm also interested in that. Also in the scribble way of updating, but I've not investigated it yet.

AFAIK, to do partial refreshes you have to open /dev/fd directly and do some ioctls. I don't know the ioctl's numbers or calling conventions, though.

The resources I know that can be useful to learn how to do that are:
- nalim's (Milan Votava) patch for 2.6 kernel has an implementation of the delta driver (display driver). http://www.kwik.cz/irex/
- use strace with the scribble program. AFAICT strace works in the iliad, and outputs to stdout every syscall, including ioctls. ltrace would be great too, but it doesn't work in the iliad, so we can't know what calls to liberdm are done in the scribble program.

If you need more pointers on how to investigate this, just ask :-).
Hi Antartica,
I'm also interested in it, I'm writing a small program like scribble. Although I call dmDisplay(dmCmdPriorUrgent, dmQTyping); each stylus touch the screen, but the display update too slow(about 0.5s later). Could you show me how to strace the scribble?
Thank you very much
illiad_fan is offline   Reply With Quote
Old 09-12-2008, 10:47 AM   #7
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by illiad_fan View Post
Hi Antartica,
I'm also interested in it, I'm writing a small program like scribble. Although I call dmDisplay(dmCmdPriorUrgent, dmQTyping); each stylus touch the screen, but the display update too slow(about 0.5s later). Could you show me how to strace the scribble?
Thank you very much
For these instructions I assume that you have ssh access to the iliad (it can be done in mrxvt, but it can be somewhat frustrating to type the commands there).

I attach a version of strace compiled for the iliad.

First of all, to strace scribble you have to install strace in the iliad (i.e in /usr/bin/).

Then, substitute scribble with a script that calls strace and logs the results to a file

Code:
ereader# cd /usr/bin
ereader# mv scribble scribble.real
ereader# echo "#!/bin/sh" > scribble
ereader# echo "exec /usr/bin/strace /usr/bin/scribble 2> /mnt/free/scribble.strace.`date +%Y%m%d%H%M%S`" >> scribble
ereader# chmod 755 scribble
NOTE: Beware of the backticks (`) in the exec line; if unsure how to enter them, left the line as shown below instead and copy the resulting /mnt/free/scribble.strace file to a new name between tests;
Code:
reader# echo "exec /usr/bin/strace /usr/bin/scribble 2> /mnt/free/scribble.strace" >> scribble
Then comes the boring part, that is to generate the logs and analyze the output.

Fist generate a baseline compare file; just open scribble and exit it.
Copy the resulting /mnt/free/scrible.strace.<numbers> to your PC as scribble.strace.base

Then start doing more interesting things (like jotting a dot, then a line, then a lot of lines, etc).

Compare the resulting files with a source compare tool. If you're using Linux, meld is a good one ( http://meld.sourceforge.net/ ).

With that you'll get what does the app for the updates. What is missing is the initialization part. You could look in the scribble.strace.base for a line that mentions /dev/fb and if it's opened, look for lines that contain the file descriptor number that the open returned. if it access the screen by other means, you will have to investigate.

If you post here as an attachment some of the scribble.strace files, I can help analyzing them as time permits...

Good luck!
Attached Files
File Type: gz strace-iliad.tar.gz (139.6 KB, 226 views)

Last edited by Antartica; 09-12-2008 at 10:50 AM.
Antartica is offline   Reply With Quote
Old 09-12-2008, 05:33 PM   #8
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
One neat trick with strace: you can hook into a running process with 'trace -p pid'. Of course you miss the startup events, but you can 'see' what happens on files and sockets... You can trace the window manager, contentlister, etc...

When you run it like 'strace -o outfile -ff program' it creates one output file per process (handy when the main process forks).

Antartica: any idea why ltrace doesn't work? I Tried several versions... They all fail with 'unexpected events' and stack overflows... :-(

Happy tracing!
hansel is offline   Reply With Quote
Old 09-13-2008, 10:59 AM   #9
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Quote:
Originally Posted by hansel View Post
Antartica: any idea why ltrace doesn't work? I Tried several versions... They all fail with 'unexpected events' and stack overflows... :-(
Same here; tried several versions and none of the worked. I don't have any idea of the reason of failing to work as I don't know how it does its magic.

Personally, the method I would use to do it would be examining the list of shared libraries,creating .so with stubs but with a trace prior to calling the "real" function the original library and load that .so with LD_LIBRARY_PRELOAD. But it seems that ltrace is far more smart that the method I supposed (it patches the elf in memory, it seems), so...

I've just found this link about the internals of ltrace:

http://people.redhat.com/~pmachata/r...ace-works.html

Browsing the document, it says that ltrace uses the debugging facilities of the system (it's a special-purpose gdb)... perhaps there is a problem placing breakpoints :-?.
Antartica is offline   Reply With Quote
Old 09-13-2008, 12:02 PM   #10
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Hansel, reading the above link (the one about ltrace), I've learned that redhat's Frysk tool comes with an alternative ltrace implementation. The website is:

http://sourceware.org/frysk/build/
Antartica is offline   Reply With Quote
Old 09-15-2008, 04:36 AM   #11
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Hi,

- I straced scribble (and ipdf) for a few hours... It doesn't show the interesting parts (I think), because they dont' involve system calls.
- I spent a few hours experimenting with the ltrace sources (and googling)... without success and lots of segmentation faults ;-)
- I'm sceptic about the frysk stuff... megaproject (10.000s files), abnormal quantity of dependencies.
- For now I'll focus on making small apps with Gtk and Fox, refreshing with the liberdm stuff as described by Scotty1024 (Thanks Scotty!!!) http://www.mobileread.com/forums/sho...63&postcount=4


PS: maybe gdb is an alternative for ltrace. It is already available in scratchbox, and it allows for remote debugging over tcp

PS2: FOX is a *very* nice cross-platform (C++ object oriented) gui toolkit. It supports Linux and windows. See: http://www.fox-toolkit.org/fox.html and http://www.mobileread.com/forums/showthread.php?t=28733
hansel is offline   Reply With Quote
Old 09-15-2008, 10:51 AM   #12
Antartica
Evangelist
Antartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-booksAntartica has learned how to read e-books
 
Posts: 415
Karma: 754
Join Date: Jun 2006
Location: Madrid, Spain
Device: iliad, onhandpc, newton, zaurus
Hansel,
Sorry to hear that the hours spent stracing didn't bear fuit :-/.
Didn't know the complexity of frysk; you're right that it's better not pursuing that path .
About FOX: I reply in the other thread :-)

Ok then, I go back to xepdmgr (and leave this partial update investigation for a time when new ideas to tackle it appear ;-).
Antartica is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen refresh on KOBO gandor62 Kobo Reader 13 08-28-2010 09:55 AM
Help! Is there a way to force K2 screen refresh. schex86 Amazon Kindle 5 02-02-2010 12:31 PM
Screen Refresh Question nremondelli Amazon Kindle 3 12-24-2008 10:55 AM
How to force a screen refresh? mkaluza Sony Reader Dev Corner 0 08-24-2008 05:54 PM
iLiad Screen refresh tomchek iRex Developer's Corner 7 07-27-2007 06:36 PM


All times are GMT -4. The time now is 05:10 AM.


MobileRead.com is a privately owned, operated and funded community.