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

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-17-2011, 04:24 AM   #16
seaniko7
wannabe developer
seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.seaniko7 can grok the meaning of the universe.
 
seaniko7's Avatar
 
Posts: 181
Karma: 156548
Join Date: Mar 2011
Device: Kindle: 2xKeyboard, Classic, 2xTouch, 2xPW, PW2; Onyx: Boox M92
@mobad I'm not sure, we're allowed to decompile reader. Creating mods/hacks which depend on open linux parts of software isn't as harmful and "illegal" as messing with closed java sources.
seaniko7 is offline   Reply With Quote
Old 07-17-2011, 05:18 AM   #17
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
Yeah, I doubt it's legal to distribute (not sure about the legality of a patch though.) Either way it's too much work.
mobad is offline   Reply With Quote
 
Enthusiast
Old 07-17-2011, 08:32 AM   #18
rockiecxh
Junior Member
rockiecxh began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 3G/WIFI
Nice work, guys. I will follow up this thread. THank U for UR efforts.
rockiecxh is offline   Reply With Quote
Old 07-17-2011, 07:25 PM   #19
metoo999
Enthusiast
metoo999 began at the beginning.
 
Posts: 31
Karma: 10
Join Date: Feb 2011
Device: Kindle 3 Wifi
Those are some neat findings there. I think the ghosting would annoy me though.
metoo999 is offline   Reply With Quote
Old 07-18-2011, 01:23 AM   #20
khmann
Enthusiast
khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.
 
Posts: 43
Karma: 1658
Join Date: Jul 2011
Device: b006
fixflash

some thoughts and observations...

there are timing issues with this approach. maybe a future version could delay the reFresh2 in cases where you are turning a lot of pages. the timing values I have hard coded seem "close" for the illustrated pdfs I have been testing with.

(18 2) doesn't render things quite right somehow, but it's fast and better than nothing, and you can fire it without liability. I think it provides a nice user-feedback while the page is getting ready to turn.

(19 3) sets the contrast to be on par with Kindles default, but (19 0) is far more accurate. This is especially noticable on photos, where (19 3) kinda sucks. So currently, we must accept a slight loss of contrast. Perhaps Kindle requires the flash to keep it's contrast marketing numbers high?

this script works quite well (ignoring the menus for now : ) Alt+G will trigger a Kindle refresh, I have also mapped "select" to do similar.
Attached Files
File Type: txt fixflash1.txt (1.2 KB, 234 views)
khmann is offline   Reply With Quote
Old 07-18-2011, 01:48 AM   #21
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
Couple suggestions:

key="$(waitforkey)"
Instead of putting it into a file and concatenating it.

Use { blah ; } instead of (blah) as it doesn't have to spawn a subshell (it's basically a unnamed function) so it's faster.
Actually you could probably combine it all in to one echo like:
echo -e "19 0\n18 0\n19 7" >

Use [[ blah ]] instead of [ blah ] as it's faster.

Instead of `seq 1 5` which has to spawn a subshell, it's faster when using small intervals to just do "1 2 3 4 5" (with no quotes)
mobad is offline   Reply With Quote
Old 07-19-2011, 01:34 AM   #22
khmann
Enthusiast
khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.
 
Posts: 43
Karma: 1658
Join Date: Jul 2011
Device: b006
Quote:
Originally Posted by mobad View Post
key="$(waitforkey)"
loving it

Quote:
Use { blah ; } instead of (blah)
Use [[ blah ]] instead of [ blah ] as it's faster.
don't understand.

Quote:
Actually you could probably combine it all in to one echo like:
echo -e "19 0\n18 0\n19 7" >
This is what I want, but for some reason its not working for me.

Quote:
Instead of `seq 1 5` ... , it's faster when using small intervals to just do "1 2 3 4 5"
DOH! thought I had 1 up'd you here - less instructions... ; )

-------------------

I went to Barnes & Noble today. Nook STR... wow. Nice form factor, touch screen is very responsive, page turn buttons suck. Screen refresh...

First off, the Nook tries to do full-flashes "about" every 6 pages, or at the start of chapters. Sometimes it seems like it flashes much more than it has to, probably software bugs - like it would full-flash multiple pages in a row around chapter endpoints, etc. Ghosting effect minimal, seemed about the same as with the FixFlash1 script above; the lighting wasn't good...

Page turn speed is very fast, probably "technically" about the same speed as kindle full-flash, but optically much less disruptive. I completely agree that "your brain filters out the kindle flash", mine did... I really wasn't ever bothered by it in the first place, it's just that the Nook feels faster because your brain starts to interpret the page quicker - my brain just kind of pauses for the whole flash duration. Anyway...

...

I think the FF1 script above achieves "real world usable" optical and usability results, but it won't win any speed contest. Side by side (unfortunately very different source material), I would say the Nook is easily twice as fast as FF1.

Also, the nook refresh algo. is visibly different. It seems to draw the outline (lighter?) edges of words first - almost like it's pre-darkening areas which would ordinarily become the ghosting halo when the page is later cleared. Then the darker core of the text fills in.

When clearing a page, the main text goes to white and then the residual outline kind-of swaps to the outline for the next page, then the text fills in...

so it's essentially a total of 3 updates to the eInk per page turn, all of which are really quick.

I wonder if any part of the Nook's improved refresh is inside the eInk firmware. The Kindle loads it from flash when it initializes the display, the nook is newer and presumably uses the same panel, but perhaps the binary firmware has been updated for new capability? I'd love to get my hands on a copy...
khmann is offline   Reply With Quote
Old 07-19-2011, 01:42 AM   #23
khmann
Enthusiast
khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.khmann once ate a cherry pie in a record 7 seconds.
 
Posts: 43
Karma: 1658
Join Date: Jul 2011
Device: b006
fixflash2

OK, so before I even hit submit on the last post I started a couple hours ago, I had whipped up a new technique. This is sync'd to actual page updates, so there are no timing issues. However, since I abandoned key-press altogether, nothing is done to improve the menus. Perhaps somebody can help me write a script that simultaneously monitors both keyboard and logs? I'm playing with two simultaneous scripts now, but that's a little much...

add to /etc/syslog-ng/syslog-ng.conf and /etc/init.d/syslog-ng stop and start.

log { source(src); filter (f_eink); destination(eink); };
filter f_eink { facility(kern) ; };
destination eink {
pipe("/tmp/eink.pipe"
);
};

----------

#!/bin/sh
# fixflash2a (alpha)

mkfifo /tmp/eink.pipe

# must do this for now because "head -1" is not really good enough
echo 0 > /sys/devices/platform/eink_fb.0/skip_buffers_equal

reFresh3 () {
echo 19 0 > /proc/eink_fb/update_display
echo 0 > /sys/devices/platform/eink_fb.0/override_upd_mode
echo 18 0 > /proc/eink_fb/update_display
echo 1 > /sys/devices/platform/eink_fb.0/override_upd_mode
# echo 19 2 > /proc/eink_fb/update_display # menus usable, will need refresh
echo 19 4 > /proc/eink_fb/update_display # menus no good, but much clearer
}

while :; do
match=0
key="$(head -n 1 /tmp/eink.pipe)"
reFresh3
done


-------------------

wow, good quality display, and twice as fast as FF1. No timing issues! Any suggestions about how to also implement key detect to help clean up the menus, or better ways to handle "scheduling" refreshes based on pipe content, or maybe even just a nice "sanity" check of the input - matching all 'kern' messages is probably not the smartest...

Last edited by khmann; 07-19-2011 at 02:20 AM.
khmann is offline   Reply With Quote
Old 07-19-2011, 03:32 AM   #24
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
Don't have much time to test anything at the moment but I'll check it this weekend...

A better way to monitor the pipe would be to use something like:
while read key ; do blah ; done < /tmp/pipe
Not 100% sure if that will work directly but the "read" command is probably what you want.
(tail -f would probably work as well but read is better)

By the way what I meant with { } and [[ ]] was
( blah ; blah ; blah ) is slower than { blah ; blah ; blah ; } as () has to spawn a subshell.
if [ blah ]; is slower than if [[ blah ]]; as [[ ]] is a native bash command.

Last edited by mobad; 07-20-2011 at 09:02 PM.
mobad is offline   Reply With Quote
Old 07-23-2011, 02:09 AM   #25
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
OK, I've improved things a bit.
http://pastebin.com/tzFsFWrg

Instead of creating a separate pipe for eink I just check the modification time of the existing /var/log/messages, it is usually only updated on eink updates and occasionally wifi.

By the way, the reason that your script worked so well with timing was because it's running as fast as the Kindle can run it which will drain the battery and slow things down.

Last edited by mobad; 07-23-2011 at 02:15 AM.
mobad is offline   Reply With Quote
Old 07-23-2011, 02:04 PM   #26
space4
Member
space4 began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Mar 2011
Device: Kindle DXG, Kobo Aura HD
I love this idea of fixing the flash problem. The page turn speed on DXG is much slower than K3! If without the "Instant page turn" function in Duokan, I would have returned the Kindle already.

After seeing a youtube video on the Nook Touch, I am fascinated on how fast an eink reader can turn the page, it responds quickly even the page down button is pressed down continuously!

I tried the fix on post #23, #30 on my DXG, page update speed is faster, but words are very thin/broken and not quite readable. Probably due to the fact that the command version and waveform version are different from that of K3, and the constants are different also. Listed below for reference:

_FX_UPDATE_PART=0
_FX_UPDATE_FULL=1
_EINK_UPDATE_DISPLAY_PART=1
_EINK_UPDATE_DISPLAY_FULL=2
_EINK_UPDATE_DISPLAY_AREA=3
_EINK_UPDATE_DISPLAY_FX=7

I wish there will be a hack for DXG one day. I'll keep watching this thread. Great work!

Last edited by space4; 07-24-2011 at 02:19 PM. Reason: Update
space4 is offline   Reply With Quote
Old 07-23-2011, 04:13 PM   #27
Enthir
Junior Member
Enthir began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2011
Device: Kindle 3
Quick info on how to get this running? Sorry to ask this way, but I am too lazy to find out on my own ;p
Enthir is offline   Reply With Quote
Old 07-23-2011, 10:10 PM   #28
stoke451
Junior Member
stoke451 began at the beginning.
 
Posts: 2
Karma: 12
Join Date: Jul 2011
Device: Kindle 3 Wifi KSO
Quote:
Originally Posted by Enthir View Post
Quick info on how to get this running? Sorry to ask this way, but I am too lazy to find out on my own ;p
You'll need launchpad installed.

Download the zip earlier in the thread which includes 3 files, test, exittest, and test.ini

update the test file (copy mobad's latest) with the newest changes

The files test and exittest go in the root folder of your kindle (/mnt/us/)

test.ini goes in your launchpad folder (/mnt/us/launchpad)

Now on your Kindle, "Shift Shift Space" will make Launchpad scan for new .ini files

"Shift T T" now turns on the no flash page turn
"Shift Y Y" turns it off
stoke451 is offline   Reply With Quote
Old 07-24-2011, 02:32 AM   #29
Enthir
Junior Member
Enthir began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2011
Device: Kindle 3
Thanks a lot for the instructions. They worked a charms, mostly. I can't seem to turn it off. No matter how many times I use "Shift YY" and it returns "Success!". Hoping uninstalling launchpad will help.
Enthir is offline   Reply With Quote
Old 07-24-2011, 06:59 AM   #30
mobad
Enthusiast
mobad began at the beginning.
 
Posts: 27
Karma: 23
Join Date: Jan 2011
Device: Kindle 3 WiFi
http://pastebin.com/uWvGBM6X

I've made it detect whether a book is open so the menus should work. (So no need to disable when you aren't using it)
I went back to the key detection method as it works better and it much cleaner.

While playing around with the Kindle I also found something cool.
I remember hearing about some people being annoyed with the progress bar at the bottom of the screen so I made something that will blank it out when in a book (you wont get more book space unfortunately)

http://pastebin.com/0mksGGBu

It basically just prints whitespace over the progress bar and it will detect whether you are in a book or not so you shouldn't have to disable it.

You can use the "eips" to print text/image onto the screen:
eips X-Pos Y-Pos "blah"
X-Pos goes from 0-49 and Y-Pos 0-39


My open book detection is not very nice as it takes 0.05s, if anyone knows any better ways, please share

Last edited by mobad; 07-24-2011 at 07:40 AM.
mobad 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
PRS-650 Flashing the firmware ShellShock Sony Reader Dev Corner 167 08-08-2011 02:34 AM
Classic Why is my screen flashing at random intervals? elizilla Barnes & Noble NOOK 1 04-15-2011 11:41 AM
Opus Flashing LED Jorick Bookeen 3 11-19-2010 07:54 AM
Kobo screen flashing when plugged in but no image! Weblady Kobo Reader 2 05-11-2010 08:27 PM
Flashing screen question johngreen99 Which one should I buy? 6 01-12-2008 07:54 PM


All times are GMT -4. The time now is 09:08 AM.


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