The nintendo ds in 8 bit graphic mode is using a 256 palette entry; each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c does
SDL_SetColors(…)
…
SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the palette has
changed ? The driver would have to ensure the palette is for its hardware
surfaces.
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry; each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c does
?SDL_SetColors(…)
…
?SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the palette has
changed ? The driver would have to ensure the palette is for its hardware
surfaces.
So how can I support them ? AFAICT there’s no other way to get something on
the screen in 8 bits mode.
Frank.On 02/21/2011 07:25 PM, Sam Lantinga wrote:
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.
On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago <@Frank_Zago> wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry; each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c does
SDL_SetColors(…)
…
SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the palette has
changed ? The driver would have to ensure the palette is for its hardware
surfaces.
That’s right, SDL 1.3 would always be using the DS in hicolor mode.On Mon, Feb 21, 2011 at 5:32 PM, Frank Zago wrote:
So how can I support them ? AFAICT there’s no other way to get something on
the screen in 8 bits mode.
Frank.
On 02/21/2011 07:25 PM, Sam Lantinga wrote:
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.
On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry; each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c does
?SDL_SetColors(…)
…
?SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the palette has
changed ? The driver would have to ensure the palette is for its hardware
surfaces.
As a compromise, couldn’t the Init code for the DS setup a default
palette - something like a 6-8-5 + 15 greys.
Cheers,
AndreasOn 2/21/11 6:55 PM, Sam Lantinga wrote:
That’s right, SDL 1.3 would always be using the DS in hicolor mode.
On Mon, Feb 21, 2011 at 5:32 PM, Frank Zago wrote:
So how can I support them ? AFAICT there’s no other way to get something on
the screen in 8 bits mode.
Frank.
On 02/21/2011 07:25 PM, Sam Lantinga wrote:
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.
On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry; each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c does
SDL_SetColors(…)
…
SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the palette has
changed ? The driver would have to ensure the palette is for its hardware
surfaces.
It could set up a 332 RGB palette, which SDL should support (though I
haven’t tested), but that will look bad for most applications.On Tue, Feb 22, 2011 at 1:53 AM, Andreas Schiffler wrote:
That’s right, SDL 1.3 would always be using the DS in hicolor mode.
On Mon, Feb 21, 2011 at 5:32 PM, Frank Zago ?wrote:
So how can I support them ? AFAICT there’s no other way to get something
on
the screen in 8 bits mode.
Frank.
On 02/21/2011 07:25 PM, Sam Lantinga wrote:
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.
On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago ?wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry;
each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c
does
?SDL_SetColors(…)
…
?SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the
palette has
changed ? The driver would have to ensure the palette is for its
hardware
surfaces.
SDL for the DS can only gain in setting up a default palette I guess.
Why limit it to a bit-shift palette like 3-3-2. A RGB 6-8-5 palette has
only 6?8?5 = 240 combinations, but it is - according to wikipedia - one
of the best balanced RGB master software palettes (if one adds gray).
The index can be addressed using the formula (40?R)+(5?G)+B, with R
ranging from 0 to 5, G from 0 to 7 and B from 0 to 4. A user of this
mode would simply need to index/dither any input image to this palette.
Here is an example of a random DS screen I’ve pulled off the net indexed
using RGB685 for comparison: http://www.ferzkopp.net/Resources/RGB685IndexedComparison.jpg
Doesn’t look great, but seems quite usable, considering the input wasn’t
ever meant to be indexed.
Cheers,
AndreasOn 2/22/11 6:28 AM, Sam Lantinga wrote:
It could set up a 332 RGB palette, which SDL should support (though I
haven’t tested), but that will look bad for most applications.
On Tue, Feb 22, 2011 at 1:53 AM, Andreas Schiffler <@Andreas_Schiffler> wrote:
That’s right, SDL 1.3 would always be using the DS in hicolor mode.
On Mon, Feb 21, 2011 at 5:32 PM, Frank Zago wrote:
So how can I support them ? AFAICT there’s no other way to get something
on
the screen in 8 bits mode.
Frank.
On 02/21/2011 07:25 PM, Sam Lantinga wrote:
SDL 1.3 doesn’t support hardware palettes, it’s just doing packed
pixel RGB mode for the framebuffer.
On Mon, Feb 21, 2011 at 5:19 PM, Frank Zago wrote:
Hello,
The nintendo ds in 8 bit graphic mode is using a 256 palette entry;
each entry
being in RGB555 format. It has to be uploaded to a special RAM area.
I don’t see anyplace where that could happen. For instance testwin.c
does
SDL_SetColors(…)
…
SDL_BlitSurface(…)
Would it be possible to add an optional driver callback in either
SDL_SetColors() or SDL_BlitSurface() that would be called when the
palette has
changed ? The driver would have to ensure the palette is for its
hardware
surfaces.