Re: [hatari-devel] How many colors when rendering in Hatari ?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On tiistai 16 huhtikuu 2013, Nicolas Pomarède wrote:
> after Hatari 1.7 is released, I'm planning to work on some rare video
> behaviour emulation in STF/STE mode.
> 
> This will require a lot of changes and will impact the video -> sdl pass
> that convert the internal ST bitplanes into an SDL surface.
> 
> Today, this conversion can convert the ST video to 8 bpp, 16 bpp or 24
> bpp in the SDL space.

There's no direct support for 24-bits, only 32-bits.
Just look at the file names in src/convert/. :-)


> This means 3 code paths to maintain, with a common
> logic in each, but really different code in the end, especially when you
> consider options to double X and/or Y (see all the files in
> src/convert/, it's really hard to follow).
> 
> So, the question is : do we need to keep 8 bpp and 16 bpp mode ?
> 
> I think most computers running Hatari are capable of 24 bpp ; for those
> that can't handle it, maybe there's an option in SDL to convert an
> internal 24 bpp surface to 8 bpp or 16 bpp.

Hatari currently supports 24-bit by converting 32-bit surface to
24-bit, i.e. 24-bit is slowest of them, by far margin.

ST VDI and monochrome modes support only 8-bits, higher bitdepths
are converted from 8-bit.


> Or we could add in Hatari an optionnal pass to convert the 24 bpp
> surface to 8 or 16 bpp before. This would be a little slower (and that's
> not even sure), but it would be much easier to maintain a 24->8 or
> 24->16 conversion of the whole surface instead of doing a specific
> conversion by blocks of 16 pixels as it is today.

Most common screen formats nowadays are probably 16 & 32-bit.

Main reason for having direct convertors for different modes
is speed, in ST emulation screen convertion is one of the
largest CPU consumers (with full timer-D interrupts).

But I think reducing & simplifying that code would be good.
You could consider changing the conversion routines to be
line based, see todo.txt for more info.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/