Testing fbxine here, I see the same - if the screen mode isn't true colour.
Setting a mode with at least 16 bits per pixel allows fbxine to work.

  $ fbset -depth 32

I also predict that, now that fbxine is happy with the screen mode, you'll
find that the palette isn't properly set up. The attached program will set it
up, but it needs to be run while fbxine is running.

-- 
| Darren Salt | d youmustbejoking,demon,co,uk | nr. Ashington,
| Debian,     | s zap,tartarus,org            | Northumberland
| RISC OS     | @                             | Toon Army
|   <URL:http://www.youmustbejoking.demon.co.uk/progs.packages.html>

One good turn deserves another.
#include <stdio.h>
#include <stdlib.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <inttypes.h>

#define EXIT(reason) do { perror (reason); exit (1); } while (0)

int
main (int argc, char *argv[])
{
  unsigned short red[256], green[256], blue[256];
  const struct fb_cmap fb_cmap = {
    0, 256, red, green, blue, NULL
  };
  int i, mask, div;
  struct fb_var_screeninfo info;

  int fd = open (argc > 1 ? argv[1] : "/dev/fb0", O_RDWR, O_EXCL);
  if (fd < 0)
    EXIT ("open framebuffer device");

  if (ioctl (fd, FBIOGET_VSCREENINFO, &info))
    EXIT ("read screen info");

  mask = (1 << info.red.length) - 1;
  for (i = 0; i < 256; ++i)
    red[i] = (i & mask) * 65535.0 / mask;

  mask = (1 << info.green.length) - 1;
  for (i = 0; i < 256; ++i)
    green[i] = (i & mask) * 65535.0 / mask;

  mask = (1 << info.blue.length) - 1;
  for (i = 0; i < 256; ++i)
    blue[i] = (i & mask) * 65535.0 / mask;

  if (ioctl (fd, FBIOPUTCMAP, &fb_cmap))
    EXIT ("write palette");

  close (fd);
  return 0;
}

Reply via email to