?

Log in

No account? Create an account
Forth: baby steps with Geode - Luke's Weblog [entries|archive|friends|userinfo]
Luke Gorrie

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Forth: baby steps with Geode [Aug. 7th, 2007|07:06 pm]
Luke Gorrie
[Tags|, ]
[Current Location |jerusalem]

I did my first little odd job on OLPC: making the firmware's console snappier by scrolling the screen using the Geode graphics processor instead of the CPU. This turns out to be really simple using the tiny library for accessing the graphics processor registers:
: ypos ( line# -- y ) char-height *  window-top + ;

: fbgeode-delete-lines ( delta-#lines -- )
   line# + ypos  window-left  swap ( src-x,y )
   window-left  line# ypos         ( src-x,y dst-x,y )
   screen-width screen-height      ( src-x,y dst-x,y w,h )
   gp-move
;

\ Patch geode acceleration into an installed (fb16) framebuffer
: fbgeode-accelerate  ( -- )
   gp-setup
   ['] fbgeode-delete-lines is delete-lines
;   
This improves the speed of inserting a new line of text into the framebuffer from 58ms to 4.5ms.
LinkReply