[stella] TIA color scheme

Greg Kennedy kennedy.greg at gmail.com
Fri May 8 14:25:26 CDT 2009


Just out of curiosity, are you writing a new 6507 core?  Why not start from
the T65 already out there?

On Fri, May 8, 2009 at 1:20 PM, samuel nascimento <snpagliarini at gmail.com>wrote:

> I will stick with the colorchart I have posted before. It is simple and
> quite accurate. Nevertheless, I have read the link you provided. In the
> second page one of the posters says:
>
> "but one thing I found out long ago is that there is no true conversion
> from the way TV's present color on the screen to the ways computers deal
> with color. TV systems and photography deal with the Y Cr Cb form of color
> and with computers they are RGB. When converting from Y Cr Cb to RGB some of
> the color is lost."
>
> Tks again Bob
>
>
> 2009/5/8 <Bob.Montgomery at thomsonreuters.com>
>
>>  Hi,
>>
>>
>>
>> Well, I wasn't thinking that you would implement those hideous formulas in
>> real time, but - assuming those formulas are valid for a 2600 - you could
>> derive all the RGB values ahead of time and then use them instead of
>> emulator-derived numbers.
>>
>>
>>
>> The chart you linked to is based on z26 colors which, as has been pointed
>> out many many times, are close to the real thing - but not exact.
>>
>>
>>
>> You might also look through this thread on AA:
>> http://www.atariage.com/forums/index.php?showtopic=132561
>>
>>
>>
>>
>>
>> -Bob
>>
>>
>>
>>
>>
>>
>>
>> *From:* stella-bounces at atari2600.org [mailto:stella-bounces at atari2600.org]
>> *On Behalf Of *samuel nascimento
>> *Sent:* Friday, May 08, 2009 10:43 AM
>>
>> *To:* Atari 2600 programming list
>> *Subject:* Re: [stella] TIA color scheme
>>
>>
>>
>> >From the digital hardware point of view it is quite difficult to do
>> multiplications, specially with decimal values. One could use a resistor
>> balanced analog circuit, but meh, i dont like it.
>>
>> I ll be definetly be using a code that looks like this:
>>
>> always @(posedge clk)
>> begin
>> case (hue, lum[3:1]}) // NTSC Colors
>>    7’d0: outColor = 24’h000000;
>>    7’d1: outColor = 24’h404040;
>>     ...
>> endcase
>>
>> just the old simple decoder.
>>
>> regards ;-)
>>
>>  2009/5/8 <Bob.Montgomery at thomsonreuters.com>
>>
>> Hi,
>>
>>
>>
>> Incidentally, Eric Ball posted his derivation of a formula for converting
>> *7800** *colors to RGB here (link sadly broken):
>>
>> http://atari7800.xwiki.com/xwiki/bin/view/Main/RGB
>>
>>
>>
>> I saved part of the page's text:
>>
>> >Relevant bits:
>>
>> >R' = Y' + 1.140V'
>>
>> >G' = Y' - 0.3947U' - 0.5808V'
>>
>> >B' = Y' + 2.033U'
>>
>> >
>>
>> >Y' = ( COLU AND 15 ) * Contrast + Brightness
>>
>> >U' = sat * cos( hue )
>>
>> >V' = sat * sin( hue )
>>
>> >hue = Tint - ( COLU / 16 - 1 ) * Phase
>>
>> >sat = 0 if COLU = $0x, otherwise sat = Color
>>
>> >
>>
>> >COLU is the color value (hex $00 through $FF) that the 7800 uses.
>>
>> >
>>
>> >Contrast = 0.0526
>>
>> >Brightness = 0.0
>>
>> >Color = 40 / 185 = 0.2162
>>
>> >Tint = 180
>>
>> >Phase = 360 / 14 = 25.714
>>
>> >
>>
>> >Note: because the 7800 generates YUV directly, the RGB values may be
>> outside the range 0..1 in which case they should be clipped to 0 or 1.
>> Multiply by 255 for >24 bit RGB values.
>>
>>
>>
>> As far as I know, the 2600 (TIA) is NOT the same as the 7800 (MARIA) in
>> this respect...but I assume it's close?  Maybe the hardware guys on the list
>> can chime in and we can have this discussion/argument about the proper
>> COLUxx->RGB derivation all over again. (=
>>
>>
>>
>> -Bob
>>
>>
>>
>>
>>
>>
>>
>> *From:* stella-bounces at atari2600.org [mailto:stella-bounces at atari2600.org]
>> *On Behalf Of *samuel nascimento
>> *Sent:* Friday, May 08, 2009 10:23 AM
>> *To:* Atari 2600 programming list
>> *Subject:* Re: [stella] TIA color scheme
>>
>>
>>
>> "the color registers ignore the lowest bit"
>>
>> That was exactly the information I was looking for. Thank you.
>>
>> 2009/5/8 <Bob.Montgomery at thomsonreuters.com>
>>
>> Hi,
>>
>>
>>
>> If you look at the charts, you'll notice that, for each luminance, there
>> are two values listed.  E.g., 0-1, 2-3, E-F, etc.
>>
>>
>>
>> That's because luminance uses only 3 bits; the color registers ignore the
>> lowest bit, so the luminance $E is the same as luminance $F.
>>
>>
>>
>> -Bob
>>
>>
>>
>>
>>
>> *From:* stella-bounces at atari2600.org [mailto:stella-bounces at atari2600.org]
>> *On Behalf Of *samuel nascimento
>> *Sent:* Friday, May 08, 2009 9:43 AM
>> *To:* stella at atari2600.org
>> *Subject:* [stella] TIA color scheme
>>
>>
>>
>> Hello guys
>>
>> I am currently working on a Atari 2600 related project (
>> http://www.opencores.org/?do=project&who=t6507lp).
>>
>> The thing is: right now I am working on the video part of the Atari, the
>> TIA chip. Since my goal is to test my project on a CRT monitor I need to
>> convert the TIA color scheme to RGB. When i realised that wouldnt be a
>> simple task i googled for it and found these websites:
>>
>> - http://www.biglist.com/lists/stella/archives/200109/msg00285.html
>> - http://qotile.net/minidig/docs/tia_color.html
>>
>> As you can see on both sites, luminance is expressed in the 0-F range.
>> When I checked this against the Stella Programmer's Guide, Luminance seens
>> to be registered using only 3 bits, therefore in the 0-7 range. Which one is
>> correct?
>>
>> Att.,
>> Samuel N. P.
>>
>>
>> _______________________________________________
>> Stella mailing list
>> Stella at atari2600.org
>> http://atari2600.org/mailman/listinfo/stella
>>
>>
>>
>>
>> _______________________________________________
>> Stella mailing list
>> Stella at atari2600.org
>> http://atari2600.org/mailman/listinfo/stella
>>
>>
>>
>> _______________________________________________
>> Stella mailing list
>> Stella at atari2600.org
>> http://atari2600.org/mailman/listinfo/stella
>>
>>
>
> _______________________________________________
> Stella mailing list
> Stella at atari2600.org
> http://atari2600.org/mailman/listinfo/stella
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://atari2600.org/pipermail/stella/attachments/20090508/4b4ef0a9/attachment.html>


More information about the Stella mailing list