[openfirmware] r1556 - cpu/x86/pc/olpc

svn at openfirmware.info svn at openfirmware.info
Wed Dec 9 14:11:36 CET 2009


Author: wmb
Date: 2009-12-09 14:11:35 +0100 (Wed, 09 Dec 2009)
New Revision: 1556

Modified:
   cpu/x86/pc/olpc/disptest.fth
Log:
OLPC selftest - shortened in SMT mode and centered the color gradients.


Modified: cpu/x86/pc/olpc/disptest.fth
===================================================================
--- cpu/x86/pc/olpc/disptest.fth	2009-12-09 12:34:54 UTC (rev 1555)
+++ cpu/x86/pc/olpc/disptest.fth	2009-12-09 13:11:35 UTC (rev 1556)
@@ -84,20 +84,21 @@
    width  hstripe d# 256 * -  to xbias
    height vstripe d# 256 * -  to ybias
 ;
+: half-bias  ( -- )  xbias 2/ to xbias  ybias 2/ to ybias  ;
 : gvsr  ( -- )
-   set-stripes  black-screen   ( )
+   set-stripes  half-bias  black-screen   ( )
    d# 256 0  do                ( )
       d# 256 0  do             ( )
          i j 0 rgb>565         ( color )
          hstripe i * xbias +   ( color x )
          vstripe j * ybias +   ( color x y )
-         hstripe vstripe       ( color x y )
+         hstripe vstripe       ( color x y w h )
          fill-rect
       loop
    loop
 ;
 : gvsb  ( -- )
-   set-stripes  black-screen   ( )
+   set-stripes  half-bias  black-screen   ( )
    d# 256 0  do                ( )
       d# 256 0  do             ( )
          0 j i rgb>565         ( color )
@@ -139,7 +140,7 @@
    height  0  do  i hline  d# 10 +loop
    width   0  do  i vline  d# 10 +loop
 ;
-: short-wait  ( -- )  d# 500 ms  ;
+: short-wait  ( -- )  smt-test?  if  d# 250 ms  else  d# 500 ms  then  ;
 : brightness-ramp  ( -- )
    0  h# 0f  do  i bright!  short-wait  -1 +loop
    backlight-off  short-wait  backlight-on
@@ -152,19 +153,24 @@
    d# 1000 ms
    load-base  whole-screen  fill-rect
 ;
+: hold-time  ( -- )
+   smt-test?  if  d# 500 ms  else  d# 1000 ms  then
+;
 : wait  ( -- )
-   d# 1000 ms
+   hold-time
    0 set-source \ Freeze image
-   d# 1000 ms
+   hold-time
    1 set-source \ Unfreeze image
-   d# 1000 ms
+   hold-time
 ;
 
 warning @ warning off
 : selftest  ( -- error? )
    depth d# 16 <  if  false exit  then
-   .horizontal-bars16   wait
-   .vertical-bars16     wait
+   smt-test? 0=  if
+      .horizontal-bars16   wait
+      .vertical-bars16     wait
+   then
    gvsr                 wait
    gvsb                 wait
    hgradient            wait
@@ -172,11 +178,14 @@
    crosshatch           wait
    brightness-ramp
 
-   burnin-time d# 5000 >  if
-      ." Press a key to stop early." cr
-      d# 1000 ms
+   smt-test?  0=  if
+      burnin-time d# 5000 >  if
+         ." Press a key to stop early." cr
+         d# 1000 ms
+      then
+      random-selftest
    then
-   random-selftest
+
    confirm-selftest?
 ;
 warning !




More information about the openfirmware mailing list