[hatari-devel] Hatari VDI mode colors issue
Thomas H.
th.huth at gmx.de
Fri Aug 14 09:34:16 CEST 2009
> Datum: Fri, 14 Aug 2009 00:17:30 +0200 (CEST)
> Von: npomarede at corp.free.fr
>
> On Wed, 12 Aug 2009, Eero Tamminen wrote:
>
> > On Wednesday 12 August 2009, npomarede at corp.free.fr wrote:
> >>> Your latest version in the repo seems to have fixed things for 2 & 4
> >>> planes, but the 1-plane (mono) mode shows still inversed.
> >>
> >> Very strange, you mean just the fact to return from
> Video_Sync_WriteByte
> >> when bUseVDIRes is true ?
> >
> > So it seemed.
>
> I tried to have a look at the vdi rendering code, as this could be related
> to inverted colors in the palette, but vdi mode in 2 colors doesn't use
> STRGBPalette[].
>
> Shouldn't it be the case to determine if a '1' pixel is black or white
> (which allows to change the color of the border) ? (well, it's not the
> case either in high640x8.c but it works with "hatari -m", and the code is
> nearly identical to vdi2.c, so I don't really know)
>
> Thomas, maybe you have an idea what colors are used when in vdi mode.
As far as I can tell, the problem is that in VDI mode, the code does not call Video_StoreFirstLinePalette() anymore - it was called from the HBL function, but since I've disabled HBLs in VDI mode, this does not happen anymore.
So HBLPalettes does not get initialized correctly, and Screen_CreatePalette() then sets the wrong colors.
Since HBLPalettes is also set in Video_ColorReg_WriteWord() if bUseHighRes was "false", the colors were still fine in non-monochrome modes. But since this function is only used in ST & STE mode, the colors might still be wrong when running VDI resolution in Falcon and TT mode (I haven't tried it yet).
One possible fix could be to call StoreFirstLinePalette() from the VBL function when running in VDI resolution mode. I'll try that tomorrow (don't have time today)...
Thomas
More information about the hatari-devel
mailing list