Author: mcayland Date: Sun Jun 9 14:25:22 2013 New Revision: 1148 URL: http://tracker.coreboot.org/trac/openbios/changeset/1148
Log: display.fs: Fix fb8 routines to work with bit depths > 8.
The IEEE1275 specification suggests that the fb8-* routines can be coerced into working for framebuffers with greater bit depths. Make sure that we also support this.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk
Modified: trunk/openbios-devel/forth/device/display.fs
Modified: trunk/openbios-devel/forth/device/display.fs ============================================================================== --- trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:20 2013 (r1147) +++ trunk/openbios-devel/forth/device/display.fs Sun Jun 9 14:25:22 2013 (r1148) @@ -169,20 +169,20 @@
: fb8-line2addr ( line -- addr ) window-top + - screen-width * + screen-width * depth-bytes * frame-buffer-adr + - window-left + + window-left depth-bytes * + ;
: fb8-copy-line ( from to -- ) fb8-line2addr swap fb8-line2addr swap - #columns char-width * move + #columns char-width * depth-bytes * move ;
: fb8-clear-line ( line -- ) fb8-line2addr - #columns char-width * + #columns char-width * depth-bytes * background-color fill \ 0 fill ; @@ -190,8 +190,9 @@ : fb8-draw-character ( char -- ) \ draw the character:
font
- line# char-height * window-top + screen-width * - column# char-width * window-left + + frame-buffer-adr + + line# char-height * window-top + screen-width * depth-bytes * + column# char-width * depth-bytes * + window-left depth-bytes * + + frame-buffer-adr + swap char-width char-height \ normal or inverse? foreground-color background-color