Jump to content
IGNORED

Revisiting NTSC Colour Generation


ThomH

Recommended Posts

Hi again; sorry — I'm trying to figure out exactly how the TIA maps a colour to a chrominance signal. Sadly I'm trying to work this out without access to an oscilloscope so my information sources aren't fantastic.

 

From Google I grabbed RGB constants for the 16 NTSC Atari colours at maximum intensity (my assumption being that luminance and chrominance are handled orthogonally).

 

I mapped those to NTSC's IQ colour space, quadrature encoded that and plotted a whole colour cycle. That created the leftmost graph in the attached image. I noted that they are all, as implied in various posts here, phase shifts and different amplitudes of a sine curve.

 

I calculated the phase offset of each of these. That created the centre graph. I calculated the amplitude. That created the rightmost graph.

 

Likely I got a slightly off set of RGB constants, probably derived by somebody from a frame capture and therefore are subject to rounding errors; I'm therefore happy to assume that the phase offset is a triangle wave (with colour zero having any phase whatsoever, given that amplitude is zero).

 

However the amplitude doesn't look to be doing anything too obvious. Does anybody know what's meant to be going on there? Is there a clean function for that? I accept that colour zero is probably handled as a special case.

 

EDIT: attached the source data for those graphs in the very proprietary Apple Numbers format; the Excel-format version was not an acceptable attachment for this forum. Added a PDF version so that at least other people can see the numbers, if not the formulas.

post-24504-0-75352200-1440994470_thumb.png

atari colours.numbers.zip

atari colours.pdf

Edited by ThomH
Link to comment
Share on other sites

Okay, I've figured out on what premise my data above was flawed; failure to take clamping into account. So the source RGBs I was working with do not convert directly back to YIQs — the relevant YIQs often convert to RGB values outside of the [0, 1] range, which are then clamped.

 

Just having a go with providing a chrominance signal that is a fixed height sin wave offset by colour / 17 of a wave, with colour 0 being a special case that doesn't add chrominance, seems to produce an approximately correct display, though oddly dull. I'll update my emulator thread with screenshots.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...