|
|
#1 |
|
Member
![]() Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
|
Getting SDL to work on DirectFB
My problem is, I can't get anything to display on the screen. The game starts up, but the Kindle display only shows some brief garbled images here and there. I have DirectFB configured with what Amazon uses in /opt/amazon/ebook/config/wrs.ini. I've tried other configuration options but nothing seems to do the trick. I've also tried to run the game with /etc/init.d/framework stopped. No cigar. Does anyone with more experience have any idea how to make this work? I don't really know how DirectFB works, so any help would be more than welcome. EDIT: Of course, SDL over the normal Linux framebuffer was my original choice, but it can't be done because the fbcon driver for SDL needs VT support in the kernel.
Last edited by B_Lizzard; 02-28-2011 at 08:16 AM. |
|
|
|
|
|
#2 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 764
Karma: 1646497
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kindle 3 WiFi
|
I think the VT-related bits only make a really small portion of the code -- most probably just for switching to a new VT upon initialization and switching back when finishing. You should be able to easily strip this dependency from SDL.
Are you sure that using DirectFB will care for driving the eink display? Most probably it doesn't and you need to communicate the dirty regions to the eink driver yourself, just as you would when using the raw framebuffer... |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Member
![]() Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
|
Ah, I thought such logic would be built in the fbdev driver for DirectFB which included in the Kindle firmware. I'll need to look into how Amazon does it with webkit.
I'll also have to look into running Xfbdev or something, this low-level stuff isn't making my life any easier. |
|
|
|
|
|
#4 |
|
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 wifi
|
Hey b_lizzard (and others),
Were you able to make any headway on this? I'm not so much interested in SDL, but I would like to understand how the Amazon Framework is using directfb and what communication channel they are using to trigger eink refreshes via the eink hal. In other words, is it user apps triggering those refreshes, working around the rest of the directfb stuff, or does their directfb have some kind of logic to automatically do this? In my simplistic view of the world it seems like a lot of GTK+ apps could be built for Kindle, on top of directfb. |
|
|
|
|
|
#5 | |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 120
Karma: 52745
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
|
Quote:
Code:
echo 2 >/proc/eink_fb/update_display Have a look at attached file for more. HTH |
|
|
|
|
|
|
#6 |
|
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 wifi
|
Hi h1uke,
I know you *can* refresh the display using the /proc interface. There are also ioctls that can be called to do the same thing. My question, though, was not "does anyone know how to make the screen refresh" but rather, how the Amazon Framework is going about it. And in particular, have they modified their version of directfb to accomplish this? Or are they working around directfb, having the app trigger refreshes directly via /proc or ioctls? Since they already have directfb on the system, and there are a ton of apps that could run under directfb (thanks to directfb-gtk support), this seems like a promising avenue of research... |
|
|
|
|
|
#7 |
|
Member
![]() Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
|
The version of SDL I compiled used the DirectFB libs shipping with the Kindle, so no. I am guessing the screen update logic goes into each toolkit, and that directfb-gtk (which, I'm guessing, is what the web-browser is using) has been patched. Or webkit itself.
I did not know of einkfb. I'll look into it and patch SDL. Maybe then we can have nethack. |
|
|
|
|
|
#8 |
|
Enthusiast
![]() Posts: 28
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 wifi
|
Diffing Amazon's directfb-1.2.0 against the version from directfb.org is quite interesting. Probably more instructive for someone who's actually used these libraries before
They've added a "SetDirtyRectangle" call to the API. I haven't looked at this long enough to see how it works though.Their GTK+ had more extensive patches. There's a bunch of stuff in "gdk marshaling" that sailed way over my head, but I wonder if it has to do with batching up things between eink display updates? For my bicycle-computer app I intend to work at the directfb level and trigger updates manually via the ioctls if I can't figure out the dirty-rectangle stuff. |
|
|
|
|
|
#9 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
Did this ever get done. I was thinking of pursuing aalib support...
Cheers.
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set |
|
|
|
|
|
#10 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
anyone. anything further on this?
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set |
|
|
|
|
|
#11 |
|
Всё гениальное просто.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,022
Karma: 6352591
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
|
I am sure that there are LOTS of people who would be interested in WATCHING you do this. This IS a "spectator sport" isn't it? You know, like the "Kindle Developer's Channel" on cable TV?
![]() Actually, we need more DEVELOPERS in the Developer's Corner. And yes, I want SDL. Not enough time in a day (or a lifetime) to do all I want...
__________________
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
![]() |
|
|
|
|
|
#12 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
I'm digging around best I can.
It is probably a few screen to eink calls away from working
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set |
|
|
|
|
|
#13 |
|
Member
![]() Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
|
I did manage a few more tests but nothing conclusive. SDL will need to be patched for it to work, and I didn't find any time to do so, sorry.
|
|
|
|
|
|
#14 |
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,121
Karma: 5288897
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW, K5 B011, K3 us, K4, DXG, XDA I&II, Omnia, Ematic E6 + E8 :) etc.
|
no worries. I got it working for the 5 in the end. (posted)
http://www.mobileread.com/forums/sho...9&postcount=65 and http://www.mobileread.com/forums/sho...9&postcount=66 and built for the 3. (needs 4bpp FB tweaks to be useful or aalib support which I have) Thanks mate!
__________________
Audiophile and electron bully. My tunes (for free) soundcloud.com/twobob. DONATE TO KUAL BY CLICKING THIS SIMPLE LINK Kung-Fu. Hard work over time to accomplish skill. A painter can have kung-fu... The musician can have kung-fu, or the poet who paints pictures with words and makes emperors weep. This, too, is kung-fu. Formless, nameless, the true master dwells within. Only you can free him. The album I'm headlining on at the moment: s.beatport.com/OCp9dT - FREE: 2012 Award winning set Last edited by twobob; 10-01-2012 at 12:45 PM. Reason: posts |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Which one will work for me? | Adramandoni | Which one should I buy? | 6 | 02-21-2011 11:43 PM |
| I will never get any work done now. | sparrowgrass | Introduce Yourself | 13 | 07-17-2010 06:46 PM |
| iPad How well does it work outside? | TallMomof2 | Apple Devices | 9 | 04-04-2010 06:49 PM |
| How does it work*? | Sultan Rahi | OpenInkpot | 3 | 12-29-2009 08:59 AM |
| iLiad What if iLiad adopts GTK on DirectFB? | ericshliao | iRex Developer's Corner | 1 | 01-26-2008 05:36 AM |