grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Framebuffer ieee1275 support & test commands


From: Vincent Pelletier
Subject: [PATCH] Framebuffer ieee1275 support & test commands
Date: Thu, 25 Aug 2005 12:19:29 +0200
User-agent: Debian Thunderbird 1.0.6 (X11/20050802)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here is my patch to add support for framebuffer on IEEE1275 machines, a
fractal drawing test program, and a mouse test program.

Framebuffer support includes :
 -setting the palette colours
 -drawing a rectangle filled with a colour
 -drawing a rectangular image (may have some width & height limitations,
I had some glitches when I used a non-power-of-2 width)
 -grabbing a rectangular image from screen (not tested)
 -getting the framebuffer address (the function I provide doesn't work
for some strange reason... Should be a cast problem somewhere.
Mandelbrot command uses a workaround until I find the problem).

Mandelbrot draws directly in the framebuffer memory. It returns, but
doesn't restore the colours. It calculates the fractal, so it uses fixed
point operations (double).

As I said in a previous mail, mouse support is very limited - but it
just works :). Mouse support is actualy 100% handled by mousetest.c.
It understands Microsoft 2 buttons mouse protocol. Once started, the
mousetest command doesn't exits (except if there is an init error). The
rectangle on the top left corner of the screen shows the data received
(3 bytes, first top, msb on the left). The format is described in
mouse(4), coloured for better readability :
 red : left mouse button
 green : right moue button
 yellow : y axis
 blue : x axis
That command uses the (draw,fill)-rectangle functions, so the
framebuffer must have them (my Creator3D doesn't).
Usage :
 mousetest [screen_device mouse_device]
 default : mousetest screen mouse

Please tell me if it doesn't build on PPC as modules (Marco : It's not
the patch I sent you, I improved it a bit.) and if it doesn't work.
Marco told me he was only getting a grey image with Mandelbrot.

2005-08-25  Vincent Pelletier  <address@hidden>

        * commands/ieee1275/mandelbrot.c: New file.
        * commands/ieee1275/mousetest.c: Likewise.
        * include/grub/ieee1275/fb.h: Likewise.
        * include/grub/ieee1275/fbprops.h: Likewise.
        * video/ieee1275/fb.c: Likewise.
        * video/ieee1275/fbprops.c: Likewise.
        * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add
        mandelbrot.mod, mousetest.mod and fb.mod.
        (mandelbrot.mod): New module.
        (mousetest.mod): Likewise.
        (fb.mod): Likewise.
        * conf/sparc64-ieee1275.rmk: Likewise.
        (grubof_HEADERS, grubof_SOURCES): Add needed files to statically
        link the commands.
        (grubof_CFLAGS): Add -DGRUB_EMBED to make commands build as
        embedded and rescue commands.
        * kern/sparc64/ieee1275/init.c: Handle the commands
        initialisation and finish when embedded.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDDZsxFEQoKRQyjtURAgtTAJ9qclafmsNNvgVkC1r8jvhP7kDZYQCffffX
koq32EYbF4X0teVkqhCQmg0=
=TF0X
-----END PGP SIGNATURE-----

Attachment: mandel_mouse.diff
Description: audio/mp3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]