View Single Post
Old 03-20-2012, 07:59 PM   #26
geekmaster
Carpe diem, c'est la vie.
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: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by kaminkatze View Post
The goal was to access single pixels. With 4 bits per pixel one dd call set 2 pixels. "setpix" reads 2 pixels, modifies one side and writes them back. But a 2x2 pixel grid and dd updates would be the better choice.


You should see the glider in the top left corner. At the moment only a 8x8 pixel field is updated. Change the last line to "loop 100" so it runs more iterations.
Yes, I can see it when I get out my stereo microscope.

I was planning to try a different approach when I get around to supporting the K3. There are two options. The easiest is to ASSUME that the kindle has 300 byte-wide pixels per line, with values "dd if=$DZ of=$DF ..." or "echo -e '\xff'|dd of=$DF ...". Another option I thought of was to use a 600-byte wide /tmp/buffer (to hold a scan line for both touch/k4 8-bit pixels or the k3/dx 4-bit pixels) and then for the k3/dx draw 4 different pixel pair bytes to the framebuffer based on the values (\x00 \xf0 \x0f \xff). Either of my methods should be faster than yours. Also, updating the screen too fast will make the eink drivers not even bother to update the display, which could need a "usleep 80000" call added after the eips '' call.

Last edited by geekmaster; 03-20-2012 at 08:09 PM. Reason: severe typophrenia http://justinharder.la/stills/item/typophrenia/
geekmaster is offline   Reply With Quote