Jump to content
ColecoFan1981

TMS-9918A and 992xA Color Differences

Recommended Posts

Since TI seemed to poorly document the R-Y and B-Y color differences for each luminance value of the 15 standard color value voltages (because of two things: the omission of arithmetic signs from the stated color difference value factors; and also not providing any unambiguous units for any said value), I would like to ask: is there anyone out there besides Richard Drushel who can better discuss how to further up on providing reliable values for the 992xA series VDP that can be reliably converted to RGB triplets? And this would include a reliable algorithm as well.

 

For the record (each basic luminance factor applies to both the TMS9918A and TMS992xA; R-Y and B-Y difference factors applicable only to TMS9928A and TMS9929A):

1 = Black (Y = 0.0; R-Y difference = 0.47; B-Y difference = 0.47)

2 = Medium Green (Y = 0.53; R-Y difference = 0.07; B-Y difference = 0.2)

3 = Light Green (Y = 0.67; R-Y difference = 0.17; B-Y difference = 0.27)

4 = Dark Blue (Y = 0.4; R-Y difference = 0.4; B-Y difference = 1.0)

5 = Light Blue (Y = 0.53; R-Y difference = 0.43; B-Y difference = 0.93)

6 = Dark Red (Y = 0.47; R-Y difference = 0.83; B-Y difference = 0.3)

7 = Cyan (Y = 0.73; R-Y difference = 0.0; B-Y difference = 0.7)

8 = Medium Red (Y = 0.53; R-Y difference = 0.93; B-Y difference = 0.27)

9 = Light Red (Y = 0.67; R-Y difference = 0.93; B-Y difference = 0.27)

A = Dark Yellow (Y = 0.73; R-Y difference = 0.57; B-Y difference = 0.07)

B = Light Yellow (Y = 0.8; R-Y difference = 0.57; B-Y difference = 0.17)

C = Dark Green (Y = 0.47; R-Y difference = 0.13; B-Y difference = 0.23)

D = Magenta (Y = 0.53; R-Y difference = 0.73; B-Y difference = 0.67)

E = Grey (Y = 0.8; R-Y difference = 0.47; B-Y difference = 0.47)

F = White (Y = 1.0; R-Y difference = 0.47; B-Y difference = 0.47)

 

Thank you,

 

 

 

Ben Edge (ColecoFan1981)

Edited by ColecoFan1981

Share this post


Link to post
Share on other sites
Since TI seemed to poorly document the R-Y and B-Y color differences for each luminance value of the 15 standard color value voltages (because of two things: the omission of arithmetic signs from the stated color difference value factors; and also not providing any unambiguous units for any said value), I would like to ask: is there anyone out there besides Richard Drushel who can better discuss how to further up on providing reliable values for the 992xA series VDP that can be reliably converted to RGB triplets? And this would include a reliable algorithm as well.

 

Ben,

 

The B-Y and R-Y are positive-going signals during active display, which is why there are no signs. You need to subtract 0.47 to get signals centered around 0.

 

I whipped up a spreadsheet that actually seems to give pretty good results. It uses the YPbPr matrix from Charles Poynton's Color FAQ, and then adds a term for scaling the color saturation. It seems to do pretty much the right thing.

 

The following image stripe shows the color set the spreadsheet generated.

 

vdp_colors.png

 

EDIT: I should add, the numbers are unitless because they are in terms of "full black-to-white swing." That is, they've all been normalized from 0 - 1 based on the full swing of the Y channel. (So if R-Y went above the Y channel, you'd see a number bigger than 1 there.)

Edited by intvnut
  • Like 1

Share this post


Link to post
Share on other sites
Since TI seemed to poorly document the R-Y and B-Y color differences for each luminance value of the 15 standard color value voltages (because of two things: the omission of arithmetic signs from the stated color difference value factors; and also not providing any unambiguous units for any said value), I would like to ask: is there anyone out there besides Richard Drushel who can better discuss how to further up on providing reliable values for the 992xA series VDP that can be reliably converted to RGB triplets? And this would include a reliable algorithm as well.

 

For the record (each basic luminance factor applies to both the TMS9918A and TMS992xA; R-Y and B-Y difference factors applicable only to TMS9928A and TMS9929A):

 

Ben,

 

You had also asked separately for my table for the TMS9118. I believe it should match what the TMS9918 does, but I don't have a TMS9918 sheet handy to compare. Here's a scan of my tables for the TMS9118/28/29:

 

vdp_color_assignments_640px.png

  • Like 1

Share this post


Link to post
Share on other sites
Since TI seemed to poorly document the R-Y and B-Y color differences for each luminance value of the 15 standard color value voltages (because of two things: the omission of arithmetic signs from the stated color difference value factors; and also not providing any unambiguous units for any said value), I would like to ask: is there anyone out there besides Richard Drushel who can better discuss how to further up on providing reliable values for the 992xA series VDP that can be reliably converted to RGB triplets? And this would include a reliable algorithm as well.

 

For the record (each basic luminance factor applies to both the TMS9918A and TMS992xA; R-Y and B-Y difference factors applicable only to TMS9928A and TMS9929A):

 

Ben,

 

You had also asked separately for my table for the TMS9118. I believe it should match what the TMS9918 does, but I don't have a TMS9918 sheet handy to compare. Here's a scan of my tables for the TMS9118/28/29:

 

vdp_color_assignments_640px.png

 

Joe,

 

Do you ever think that Rich Drushel's information concerning the TMS9918A colors for the AdamEm emulator is the right way to get the proper colors of the 9918A?

 

~Ben

Share this post


Link to post
Share on other sites

I'm posting this here rather than keeping this in a private message because I'm not necessarily the expert in NTSC to RGB conversion. :-) I'm sure there are other experts that could chime in with their 2¢.

 

Do you ever think that Rich Drushel's information concerning the TMS9918A colors for the AdamEm emulator is the right way to get the proper colors of the 9918A?

 

To recap, you mentioned he did the following:

 

We both might find these three links helpful at this moment (in regards to reproducing the TMS9918A colors):

http://users.stargate.net/~drushel/pub/col...a/wk961118.html

http://users.stargate.net/~drushel/pub/col...a/wk961201.html

http://users.stargate.net/~drushel/pub/col...a/wk970202.html

 

What Richard Drushel did to create the palette for the Coleco Adam emulator known as AdamEm, was to refer to the values of each of the 15 color luma voltage values specific to the TMS9918A emulator when he found out he wasn't able to obtain proper RGB values for the TMS9928A VDP, which is the official model of VDP used for the ColecoVision and Adam.

 

He took the TMS9918A-specific values and then referred to the phase angles relevant to the B-Y axis, subtracting 33 degrees from all of them to obtain the correct hue. He then calculated the I and Q values relevant to the trigonometric relations shown in the R-Y/B-Y graph (see wk961118), and then converted those along with the Y (luma) equations for R, G and B. Each of those converted values were then multiplied by 255 to obtain the RGB triplets.

 

That sounds like a somewhat reasonable starting point if nothing else. You could apply the same approach with the actual A', phase angle and luma values from the table I gave above to get Y'IQ values to convert. For the the 28/29, I think starting from the actual B-Y and R-Y values is a better idea than trying to compute them from the composite signal.

 

One of the issues with the TMS9918A and decoding its color output is its extreme rainbow artifacting. This is due to the fact it doesn't alternate the colorburst phase from field to field, and so the pixel edges in the luma domain alias into the chroma band. Also, the composite signal specification itself (amplitude/phase) is just an approximation anyway. I suspect the actual composite encoder is outputting samples at a sample rate of 3x colorburst that approximate the luma and chroma spec shown. You can see something similar in the spec sheet for GI's "color processor": AY-3-8915. Note that that's an unrelated part. I'm just mentioning it because it illustrates the principle of operation I'm trying to describe.

 

(As for why the 9918A has such bad rainbow artifacts: In proper NTSC, the colorburst phase flips 180° field-to-field, and I believe frame-to-frame. The luma components stay in-phase with each other and the chroma components flip sign. This makes it easier to separate the chroma from the luma more fully. That's where different chroma decoders bring you different chroma artifacts, such as vertical edge dot-crawl, horizontal edge dot-crawl and so on, when they take short cuts. The best decoders, such as "three-axis" decoders, correlate across fields and frames. But I digress.)

 

If you're just trying to get the TMS9918A's nominal colors (ie. the color you'd see if you filled a large solid area with that color), I think you can do something similar to what Richard did: Project the vector described by A' and the phase angle from the table I posted above onto I/Q, and plug Y'IQ into a Y'IQ to RGB decoder matrix. Charle's Poynton's Color FAQ covers how to convert Y'PBPR into Y'UV and then Y'IQ. You should be able to invert the steps (by inverting the matrices) to work your way back to a Y'IQ to RGB matrix. Alternately, you could project onto U/V and skip a step.

Edited by intvnut
  • Like 1

Share this post


Link to post
Share on other sites
What Richard Drushel did to create the palette for the Coleco Adam emulator known as AdamEm, was to refer to the values of each of the 15 color luma voltage values specific to the TMS9918A emulator when he found out he wasn't able to obtain proper RGB values for the TMS9928A VDP, which is the official model of VDP used for the ColecoVision and Adam.

BTW, where it looks like Richard went astray is here:

 

Since the ADAM's VDP is a TMS9928, I decided I would calculate the RGB colors using the tabulated color difference and luminance data. Unfortunately, Texas Instruments (a) neglected to include the arithmetic signs of the color differences, and (b) did not provide unambiguous units for the values. "Percent of black/white voltage swing" is ambiguous because the total swing could be anywhere between 0.75 and 1.00 volts, depending upon whether colors or black/white/grey are being displayed. (0.00 is black, 1.00 is white, but no saturated color exceeds 0.75 volts.) Playing with the values and guessing at the signs did not give me any consistent results. If somebody can help me, please do; but the tabulated color difference values don't match anything given in my two reference textbooks.

It turns out, the units ARE unambiguous, and the signs aren't missing.

 

What he missed was that the B-Y and R-Y signals are positive-swing only, and so have a DC bias applied. This is why black, gray and white all have chroma outputs of 0.47. If you subtract 0.47 from the B-Y and R-Y signals, you get the actual signed B-Y and R-Y values. The Y', B-Y and R-Y values are all normalized, so that a white signal corresponds to 1.0 and a black signal corresponds to 0.0. All other magnitudes are scaled appropriately. That is, there is one scale factor applied to all the voltages. I think he misread this as "percent of the luma swing for this color." That's not it at all. What it means is white is "1.0 by definition", black is "0.0 by definition" and all other values are scaled to match this. (Kinda like how water boils at 100°C and freezes at 0°C by definition.)

 

Since all of the transforms are defined on unit-scale signals, this is precisely what you need to be able to covert unit-scale Y'IQ to unit-scale RGB. Once you have unit-scale RGB, you can then multiply by 255 to get 8-bit RGB triples. That's what my spreadsheet did further up.

 

Richard and I actually worked from the same source material. The VDP guide he mentioned is the exact same one that I worked from. He just missed that one insight that would have saved himself a lot of time.

Edited by intvnut
  • Like 1

Share this post


Link to post
Share on other sites

More fun facts on the TMS9918A VDP. I spoke tonight with one of the VDP designers, Karl Guttag. (He and I are friends. He's also the one that hired me at Texas Instruments, where I currently work. Go figure.)

 

He mentioned that chroma magnitude and phase angles and levels for the luma were actually a bit of a hack, but the basic circuitry is all documented in a patent. If you look up patent 4,243,984 and look at figures 9 through 11, you can see just how the VDP does its magic. 4,262,302 seems to cover the composite signal generator more specifically.

  • Like 1

Share this post


Link to post
Share on other sites

4374395 describes it nicely too. The main patent only seems to describe TMS9918, btw, not the A revision, since it doesn't document mode 3 (hi-res mode that uses 12KB VRAM). Does anyone know of a patent that describes the newer revisions of TMS VDP?

 

intvnut, I don't want this to feel like I'm pushing/nagging you, but could you scan that TMS9118/28/29 data manual? :)

Edited by hap
  • Like 1

Share this post


Link to post
Share on other sites
4374395 describes it nicely too. The main patent only seems to describe TMS9918, btw, not the A revision, since it doesn't document mode 3 (hi-res mode that uses 12KB VRAM). Does anyone know of a patent that describes the newer revisions of TMS VDP?

 

intvnut, I don't want this to feel like I'm pushing/nagging you, but could you scan that TMS9118/28/29 data manual? :)

 

Actually, Karl invented that mode. He gave me a photocopy of his proposal to add it to the TMS9918A. I'll have to ask him if I can scan that and post it. (I'll also have to find where I put it. I think it's in a folder at work.)

 

As for the data manual--I will get to it someday (that book lives sitting on my scanner), but it is a huge time sink and I haven't had that block of time yet. Also, I can't get the scanner to work on my computer, so I have to use my wife's. That's another hiccup.

  • Like 1

Share this post


Link to post
Share on other sites
4374395 describes it nicely too. The main patent only seems to describe TMS9918, btw, not the A revision, since it doesn't document mode 3 (hi-res mode that uses 12KB VRAM). Does anyone know of a patent that describes the newer revisions of TMS VDP?

 

intvnut, I don't want this to feel like I'm pushing/nagging you, but could you scan that TMS9118/28/29 data manual? :)

 

Actually, Karl invented that mode. He gave me a photocopy of his proposal to add it to the TMS9918A. I'll have to ask him if I can scan that and post it. (I'll also have to find where I put it. I think it's in a folder at work.)

 

As for the data manual--I will get to it someday (that book lives sitting on my scanner), but it is a huge time sink and I haven't had that block of time yet. Also, I can't get the scanner to work on my computer, so I have to use my wife's. That's another hiccup.

 

I just spoke w/ Karl on the phone. He said he has a bunch of VDP stuff that he's going to email me. This should be fun. :-)

  • Like 1

Share this post


Link to post
Share on other sites
4374395 describes it nicely too. The main patent only seems to describe TMS9918, btw, not the A revision, since it doesn't document mode 3 (hi-res mode that uses 12KB VRAM). Does anyone know of a patent that describes the newer revisions of TMS VDP?

 

intvnut, I don't want this to feel like I'm pushing/nagging you, but could you scan that TMS9118/28/29 data manual? :)

 

Actually, Karl invented that mode. He gave me a photocopy of his proposal to add it to the TMS9918A. I'll have to ask him if I can scan that and post it. (I'll also have to find where I put it. I think it's in a folder at work.)

 

As for the data manual--I will get to it someday (that book lives sitting on my scanner), but it is a huge time sink and I haven't had that block of time yet. Also, I can't get the scanner to work on my computer, so I have to use my wife's. That's another hiccup.

 

I just spoke w/ Karl on the phone. He said he has a bunch of VDP stuff that he's going to email me. This should be fun. :-)

Have him e-mail me his information to [email protected] or [email protected] .

 

Thank you,

 

 

 

Ben

Share this post


Link to post
Share on other sites

That sounds great. :) Are you allowed to make that information public? (like, uploading it somewhere and letting us know)

Share this post


Link to post
Share on other sites
That sounds great. :) Are you allowed to make that information public? (like, uploading it somewhere and letting us know)

 

I've received quite the treasure trove from Karl. I just emailed him to confirm that I can post all this. If so, then I'll post the link to everything.

 

I'm pretty certain I can share this immediately: SPPA004A 9928-29 Interface to Monitors It even includes the formulas for mixing Y, R-Y and B-Y to get RGB.

  • Like 1

Share this post


Link to post
Share on other sites

While Joe Z. (INTVnut) is waiting on a mail response from one Karl, I am, in this meantime, going to devise each of the intensities (from 0 to 7; 0 being no intensity and 7 being maximum) for the 15 colors the TMS9918A and TMS9928A/9929A produces.

 

1. Black (RGB: 0-0-0; intensity values: 0-0-0)

2. Medium Green (RGB: 35-203-50; 0-7 scale: 36-219-36 for intensity values 1-6-1)

3. Light Green (RGB: 96-221-108; 0-7 scale: 109-219-109 for intensity values 3-6-3)

4. Dark Blue (RGB: 84-78-255; 0-7 scale: 73-73-255 for intensity values 2-2-7)

5. Light Blue (RGB: 125-112-255; 0-7 scale: 109-109-255 for intensity values 3-3-7)

6. Dark Red (RGB: 210-84-66; 0-7 scale: 219-73-73 for intensity values 6-2-2)

7. Cyan (RGB: 69-232-255; 0-7 scale: 73-219-255 for intensity values 2-6-7)

8. Medium Red (RGB: 250-89-72; 0-7 scale: 255-73-73 for intensity values 7-2-2)

9. Light Red (RGB: 255-124-108; 0-7 scale: 255-109-109 for intensity values 7-3-3)

10. Dark Yellow (RGB: 211-198-60; 0-7 scale: 219-182-73 for intensity values 6-5-2)

11. Light Yellow (RGB: 229-210-109; 0-7 scale: 219-219-109 for intensity values 6-6-3)

12. Dark Green (RGB: 35-178-44; 0-7 scale: 36-182-36 for intensity values 1-5-1)

13. Magenta (RGB: 200-90-198; 0-7 scale: 182-109-182 for intensity values 5-3-5)

14. Gray (RGB: 204-204-204; 0-7 scale: 219-219-219 for intensity values 6-6-6)

15. White (RGB: 255-255-255; intensity values: 7-7-7)

 

~Ben

Share this post


Link to post
Share on other sites

You heard from your friend Karl yet, intvnut?

I noticed on your homepage you work for TI, are you planning to release information on other old TI products too?

  • Like 1

Share this post


Link to post
Share on other sites

OK, now, another question: what would be the optimum color saturation level suitable for NTSC and PAL TVs? I represent the former area, and the latter market segment would have an obvious lower level of color saturation, probably in the neighborhood of 50%-55%. For NTSC TVs, it would be in the neighborhood of 70%-75%.

 

Both the TMS9918(A) and TMS9928A were designed for NTSC-market computers and consoles; while the TMS9929A would represent the PAL-market equivalents. The same applications apply for the lower-end TMS9100 series.

 

~Ben

Share this post


Link to post
Share on other sites

I have another to contribute as to color corrections for the TMS-9918A: The values of the two yellows as per original TI data seem to be incorrect, because the stated values make them look a bit green. On the TMS-992xA line, these have different values that make them look more like true yellows.

 

Case in point:

TMS-9918A Dark Yellow

Hex: A

Y' (luminance): 0.73 (original), 0.71 (corrected)

R-Y: 0.49 (original), 0.54 (corrected)

B-Y: 0.20 (original), 0.21 (corrected)

RGB triplets: 194, 204, 64 (original), 206, 191, 64 (corrected)

RGB % values: 0.76, 0.8, 0.25 (original), 0.81, 0.75, 0.25 (corrected)

 

TMS-9918A Light Yellow:

Hex: B

Y' (luminance): 0.8 (original), 0.79 (corrected)

R-Y: 0.48 (original), 0.52 (corrected)

B-Y: 0.28 (original), 0.29 (corrected)

RGB triplets: 209, 219, 120 (original), 219, 208, 120 (corrected)

RGB % values: 0.82, 0.86, 0.47 (original), 0.86, 0.82, 0.47 (corrected)

 

TMS-9928A Dark Yellow:

Hex: B

Y' (luminance): 0.73

R-Y: 0.57

B-Y: 0.07

RGB triplets: 204, 195, 96

RGB % values: 0.8, 0.76, 0.38

 

TMS-9928A Light Yellow:

Hex: B

Y' (luminance): 0.8

R-Y: 0.57

B-Y: 0.17

RGB triplets: 222, 208, 136

RGB % values: 0.87, 0.82, 0.53

 

The R-Y and B-Y values for the TMS-9918A colors that I did, if you want to know, were done by multiplying the RGB % values (as seen in TI's European proposal of producing the TMS-9929A PAL VDP) by the calculations in the RGB to Y'PbPr matrix devised by Charles Poynton. These values following calculation, I added +0.47 to each of them to arrive at their Y', R-Y and B-Y values.

 

~Ben (ColecoFan1981)

Share this post


Link to post
Share on other sites

I haven't gotten a hold of Karl, but I can't see why he wouldn't want me to release all this stuff.

 

As for releasing details of other TI products (as someone had asked), sorry... I am only 34, having joined TI fresh out of college in the mid 90s. While I do get to talk to some of the folks that were around at TI during my formative years, that doesn't mean I regularly get access to the related documentation.

 

Enjoy.

  • Like 1

Share this post


Link to post
Share on other sites

I haven't gotten a hold of Karl, but I can't see why he wouldn't want me to release all this stuff.

 

As for releasing details of other TI products (as someone had asked), sorry... I am only 34, having joined TI fresh out of college in the mid 90s. While I do get to talk to some of the folks that were around at TI during my formative years, that doesn't mean I regularly get access to the related documentation.

 

Enjoy.

 

Joe,

 

I do hope that you get a follow-up to all this from him in the future.

 

~Ben

Share this post


Link to post
Share on other sites

Joe,

 

I reworked the TMS9928A palette and set the maximum saturation level to 51%, which is bright enough yet that the RGB values do not read past 1.0 (255):

01 - Black - 0,0,0 (#000000)
02 - Medium Green - 62,184,73 (#3EB849)
03 - Light Green - 116,208,125 (#74D07D)

04 - Dark Blue - 89,85,224 (#5955E0)

05 - Light Blue - 128,118,241 (#8076F1)

06 - Dark Red - 185,94,81 (#B95E51)

07 - Cyan - 100,220,239 (#64DCEF)

08 - Medium Red - 219,101,89 (#DB6559)

09 - Light Red - 255,137,125 (#FF897D)

10 - Dark Yellow - 204,195,94 (#CCC35E)

11 - Light Yellow - 222,208,135 (#DED087)

12 - Dark Green - 58,162,65 (#3AA241)

13 - Magenta - 183,102,181 (#B766B5)

14 - Gray - 204,204,204 (#CCCCCC)

15 - White - 255,255,255 (#FFFFFF)

 

~Ben

Edited by ColecoFan1981

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...