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-07-2011, 01:53 PM   #1
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
directfb

i am trying to write an application for directfb but it seems unable to switch to 4 bpp mode, the mode required by the e-ink framebuffer to render properly.

it seems to be unable to use LUT4; instead insisting on LUT8.

does anyone know how to either switch the framebuffer to 8 bpp or coerce directfb into a 4 bpp mode?

thanks.
fbdev is offline   Reply With Quote
Old 07-07-2011, 04:17 PM   #2
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,217
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
It doesn't even provide a definition of LUT4, does it? So LUT8 is probably all it provides (on API side). Did you check if LUT8 works out of the box? Or maybe what IDirectFB::EnumVideoModes provides?
hawhill is online now   Reply With Quote
 
Advertisement
Old 07-07-2011, 05:50 PM   #3
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
no LUT4

LUT8 doesn't work.
the framebuffer only has 4bpp, so it ends up rendering everything at 2x magnification with white stripes (from the extra bits) between the lines.
i'm working on forcing A4 by mmap()ing the framebuffer to a surface but it's being....well, a computer about it. :]
fbdev is offline   Reply With Quote
Old 07-07-2011, 07:00 PM   #4
fbdev
fbdev
fbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcoverfbdev exercises by bench pressing the entire Harry Potter series in hardcover
 
Posts: 107
Karma: 16141
Join Date: Jul 2011
Device: kindle
fixed (kind of)

what i wanted most was anti-aliased fonts (they're gorgeous with this hack!).
anti-aliasing needs A8 pixel format.
i created a surface:

einkdsc.flags
= DSDESC_CAPS|DSDESC_WIDTH|DSDESC_HEIGHT
|DSDESC_PIXELFORMAT|DSDESC_PREALLOCATED;
einkdsc.caps = 0;
einkdsc.width = 600;
einkdsc.height = 800;
einkdsc.pixelformat = DSPF_A8;
einkdsc.preallocated[0].data = screenbuffer;
einkdsc.preallocated[0].pitch = 600;
einkdsc.preallocated[1].data = screenbuffer;
einkdsc.preallocated[1].pitch = 600;
dfb->CreateSurface(dfb,&einkdsc,&eink);

then mmap()ed the framebuffer:
framebuffer
= mmap(NULL,(800 * 600) / 2,PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);

and i blit between the two:

void fbblit(char* dst,char* src)
{
unsigned aa;
aa = 0;
for(;
{
dst[aa] = ((src[aa * 2] & 0xf) << 4) | (src[1 + (aa * 2)] & 0xf);
dst[aa] ^= 0xff;
++aa;
if(((600 * 800) / 2) == aa) break;
}
}
fbdev is offline   Reply With Quote
Old 07-08-2011, 07:23 AM   #5
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,217
Karma: 2124593
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
Hm. I really wonder how the Amazon stack does this. I think I'll put v3 on my Kindle DX this weekend and try myself (2.x firmware doesn't seem to include a ready-built DirectFB). But please update this thread if you stumble upon more information, much appreciated.
hawhill is online now   Reply With Quote
Old 12-16-2011, 10:57 PM   #6
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
It appears that my kindle 4 (no keyboard) uses 8 bpp. The Touch is probably the same.
geekmaster 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
Getting SDL to work on DirectFB B_Lizzard Kindle Developer's Corner 13 10-01-2012 01:42 PM
Cross-compilation question--building directfb mark03 Kindle Developer's Corner 4 06-20-2011 12:59 PM
iLiad What if iLiad adopts GTK on DirectFB? ericshliao iRex Developer's Corner 1 01-26-2008 06:36 AM


All times are GMT -4. The time now is 11:19 AM.


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