[OpenBIOS] r530 - dev/geode/display

svn at openbios.org svn at openbios.org
Wed Aug 8 05:14:05 CEST 2007


Author: wmb
Date: 2007-08-08 05:14:05 +0200 (Wed, 08 Aug 2007)
New Revision: 530

Modified:
   dev/geode/display/gp.fth
   dev/geode/display/gxfb.fth
   dev/geode/display/loadpkg.fth
Log:
OLPC display - sped up scrolling 20x by using the graphics processor.


Modified: dev/geode/display/gp.fth
===================================================================
--- dev/geode/display/gp.fth	2007-08-06 18:37:01 UTC (rev 529)
+++ dev/geode/display/gp.fth	2007-08-08 03:14:05 UTC (rev 530)
@@ -1,8 +1,6 @@
 purpose: Geode LX graphics acceleration
 \ See license at end of file
 
-dev screen
-
 alias depth+ wa+
 
 : gp!  ( l reg -- )  gp-base + rl!  ;
@@ -70,9 +68,46 @@
 ;
 [then]
 
+: rc>pixels  ( r c -- x y )  swap char-width *  swap char-height *  ;
+: +window    ( x y -- x' y' )  window-left 2/ window-top d+  ;
+: rc>window  ( r c -- x y )  rc>pixels +window  ;
 
-dend
+: fbgeode-delete-lines ( delta-#lines -- )
+   >r                           ( r: delta-#lines )
+   0  line# r@ +   rc>window    ( src-x,y r: delta )
+   0  line#        rc>window    ( src-x,y dst-x,y r: delta )
+   #columns  #lines r@ -  rc>pixels    ( src-x,y dst-x,y w,h r: delta )
+   gp-move                      ( r: delta )
+   screen-background16          ( color r: delta )
+   0  #lines r@ -  rc>window    ( color dst-x,y r: delta )
+   #columns  r>    rc>pixels    ( color dst-x,y w,h )
+   gp-fill
+;
 
+: gp-fb16-install  ( -- )
+   fb16-install
+   gp-setup
+   ['] fbgeode-delete-lines is delete-lines
+;
+
+: display-install  ( -- )
+   init-all
+   default-font set-font
+   /scanline bytes/pixel /  #scanlines     ( width height )
+   over char-width / over char-height /    ( width height rows cols )
+   bytes/pixel  case                       ( width height rows cols )
+      1 of  fb8-install      endof         ( )
+      2 of  gp-fb16-install  endof         ( )
+   endcase                                 ( )
+   init-hook
+;
+
+: display-selftest  ( -- failed? )  false  ;
+
+' display-install  is-install
+' display-remove   is-remove
+' display-selftest is-selftest
+
 \ LICENSE_BEGIN
 \ Copyright (c) 2006 FirmWorks
 \ 

Modified: dev/geode/display/gxfb.fth
===================================================================
--- dev/geode/display/gxfb.fth	2007-08-06 18:37:01 UTC (rev 529)
+++ dev/geode/display/gxfb.fth	2007-08-08 03:14:05 UTC (rev 530)
@@ -565,24 +565,6 @@
 " ISO8859-1" encode-string    " character-set" property
 0 0  encode-bytes  " iso6429-1983-colors"  property
 
-: display-install  ( -- )
-   init-all
-   default-font set-font
-   /scanline bytes/pixel /  #scanlines     ( width height )
-   over char-width / over char-height /    ( width height rows cols )
-   bytes/pixel  case                       ( width height rows cols )
-      1 of  fb8-install   endof            ( )
-      2 of  fb16-install  endof            ( )
-   endcase                                 ( )
-   init-hook
-;
-
-: display-selftest  ( -- failed? )  false  ;
-
-' display-install  is-install
-' display-remove   is-remove
-' display-selftest is-selftest
-
 \ LICENSE_BEGIN
 \ Copyright (c) 2006 FirmWorks
 \ 

Modified: dev/geode/display/loadpkg.fth
===================================================================
--- dev/geode/display/loadpkg.fth	2007-08-06 18:37:01 UTC (rev 529)
+++ dev/geode/display/loadpkg.fth	2007-08-08 03:14:05 UTC (rev 530)
@@ -5,6 +5,7 @@
 
 fload ${BP}/dev/geode/display/gxpci.fth          \ PCI interfaces
 fload ${BP}/dev/geode/display/gxfb.fth           \ Controller code
+fload ${BP}/dev/geode/display/gp.fth             \ Graphics processor support
 fload ${BP}/dev/video/common/rectangle16.fth     \ Rectangular graphics
 
 \ LICENSE_BEGIN




More information about the OpenBIOS mailing list