Skip to content

bcm2708_fb: Support for 256 color indexed mode with custom palette? #41

Closed

Description

@maxnet

Older games that operate in 8 bpp 256 colors mode, expect to be able to choose which colors they want in their palette.
However setting colors does not seem to be implemented. ( bcm2708_fb_setcolreg( ) does nothing for color numbers over 16?)

Is this something that might be added to a future version, or is this not supported by the hardware?

Activity

  1. popcornmix commented on Jun 21, 2012

    @popcornmix
    Collaborator

    I believe it can be supported by hardware, but the palette currently isn't passed through.
    If you can point me at simple example code that uses a 8bpp palette mode, I'll look into it.

  2. maxnet commented on Jun 21, 2012

    @maxnet
    ContributorAuthor

    Created a minimal example: http://pasteit.com/18040

    Should output a Dutch red, white and blue flag, like in this screenshot: http://s13.postimage.org/ithb0hzrb/screenshot_testpng.png

  3. popcornmix commented on Jul 1, 2012

    @popcornmix
    Collaborator

    Thanks for testcase. Please update and test.

  4. maxnet commented on Jul 1, 2012

    @maxnet
    ContributorAuthor

    << Store palette info where GPU can see it, so 8bpp modes can work. Requires updated start.elf to work properly >>

    Is the updated start.elf available for download as well?
    firmware repo is 3 days old.

  5. maxnet commented on Jul 1, 2012

    @maxnet
    ContributorAuthor

    nvm
    I see that the new start.elf is available on Hex's git, just not on https://github.com/raspberrypi/firmware/tree/master/boot

    Thanks for the update.
    Have tested it, and Duke Nukem 3D looks a lot better now :-)

    (Was affraid some other older games may use pallete cycling with a subset of the colors to simulate flowing water and other minor animations.
    But checked the SDL fbcon source code and it indeed always sends a colormap with all 256 colors to the kernel.
    So your hack should be safe for all games using libSDL for graphics)

  6. 40 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions