Hello, Guest the thread was called9.6k times and contains 228 replays

last post from mathop at the

Helligkeiten der C64 PAL-Palette - zum 100. Mal

  • Wie gesagt handelt es sich um eine THEORIE, wie man die Helligkeiten evtl. hat aufteilen wollen damals.

    Es geht also ausschließlich darum, die Gedankengänge der Entwickler nachzuvollziehen, oder? Denn wenn man die Intensitäten am C64-Output misst, dann hat man ja z.B. das Monitor-Gamma nicht mit erfasst. Es geht also nicht um die Helligkeiten, die man letztlich auf dem Bildschirm sieht, sondern rein um die Erzeugung im VIC II, wenn ich dich richtig verstehe.

  • Wie gesagt handelt es sich um eine THEORIE, wie man die Helligkeiten evtl. hat aufteilen wollen damals.

    Es geht also ausschließlich darum, die Gedankengänge der Entwickler nachzuvollziehen, oder? Denn wenn man die Intensitäten am C64-Output misst, dann hat man ja z.B. das Monitor-Gamma nicht mit erfasst. Es geht also nicht um die Helligkeiten, die man letztlich auf dem Bildschirm sieht, sondern rein um die Erzeugung im VIC II, wenn ich dich richtig verstehe.

    CRT-Anzeigegeräte haben ein Gamma von ~2.5

    TFT-Monitore sind ansich linear, sind aber u.a. wegen "Rückwätskompatibilität" ebenfalls intern auf ~2.5 eingestellt.
    PAL (auch NTSC) sowie auch sRGB (hier näherungsweise) arbeiten mit einer Gammakompression von 1/2.2

    Daher muss man aus meiner Sicht keine Gammakorrektur machen, wenn man vom C64-Signal ausgehend sRGB Werte herleitet. Demnach wäre eine mit falschen (unterschiedlichen) Gammas durchgeführte Korrektur sogar falsch.

    Eine Gammakompression von 1/2.5 wird daher nicht gemacht, weil das in der üblichen Betrachtungsumgebung zu "flach" aussieht.

    Was ich sagen will: Was am C64 rauskommt, "sieht" man auch so am Bildschirm. Der Bildschirm "weiß" ja nicht, ob das Signal jetzt vom TV-Antennensignal, VHS-Rekorder oder vom C64 kommt und macht da unterschiedliche Korrekturen.

  • mathop

    ODD/EVEN check of your measurements is very interesting. ;)

    Yes I noticed that also. I believe this is a bug/feature in the 6569 variations. (Not sure about the 8565.)
    What happens is that the color is generated by running a sine and a cosine signal (one or both sine and cosine can also be inverted) through two resistors. The resistors values are different for each color. This creates a voltage divider. The midpoint of the divider is then used to generate the color signal. But these resistors also have some parasitic capacitance, which introduces a phase shift. The end result is that the phase (and amplitude) is off in one direction during odd lines, and in another direction during even lines. This is because the cosine input is inverted during odd lines to make the signal PAL-compliant.
    Due to the magic of PAL, the phase and amplitude differences then cancel out.

  • Due to the magic of PAL, the phase and amplitude differences then cancel out.

    Yes, regarding phase, the C64's output ist totally twisted. You'd get rejected with a "subcarrier problem" report in broadcast. ;-)

    Video digitizer hardware that uses only one video field for chroma information (which is one q&d way of chroma subsampling to 4:1:1) is also lost here.

    But most capture systems don't even come this far due to the slightly early VSync.

  • Yes I noticed that also. I believe this is a bug/feature in the 6569 variations. (Not sure about the 8565.)

    I would not call it a feature as I don't think this was implemented by purpose.
    As far as I know, all VIC-II have this phenomenon (maybe some more, some less, due to chip revisions and/or tolerances) that for the PAL-delay-line-color-mixing of the luminance partner colors will result in different mix colors, depending which color is on odd or even line.
    Here we can see why. Because we are mixing different line colors.


    But these resistors also have some parasitic capacitance, which introduces a phase shift.

    That explains it I guess. It's not wanted I think, it's just there. Maybe if they used "better" resistance layout, capacitance could be lowered and phase shift would be almost zero. But Commodore has never been famous to go the expensive way, right? :)

  • Due to the magic of PAL, the phase and amplitude differences then cancel out.

    Will it really cancel out and show the correct color angle or the two lines wil ljust appear as a mix of both lines?
    As you can see, if one line matches the target color angle, the other line has the biggest deviation. Only for colors where the lines have opposite and equal size deviations, the mix of both lines might show the target color (angle).
    It means depending on the color, looking at one line, the color deviation is -18..0° and 0..+18°, if combining 2 lines of the same color, the mix colors deviation is -9..+9°.
    Or if the even line angle error is mirrored on the x-axis, it will result in a constant color angle deviation of +9° for combining both lines?

    Your avg color values just lay between both lines color angles.
    Thanks

  • Will it really cancel out and show the correct color angle or the two lines wil ljust appear as a mix of both lines?

    Telling from my memory of TV tech basics classes, I remember that phase ("angle") deviations after PAL color signal modulation cancel out in phase entirely because they're "flipped" 90° each line. Phase will thus always be perfect while the chrominance (color amplitude) _will_ suffer. It's just less perceivable.


    But what we might have here is simply a faulty signal or faulty modulation within the chip, so PAL color restoration will have its effect on a phenomenon that was not foreseen.

  • I think we can more or less predict what the color values should have been, by comparing resistor sizes in the analog circuit. (The square counting I mentioned earlier.) Since all the color resistors are internal to the chip we don't have to know the exact values of these resistors, only the relative values of each half of the voltage divider. I can do that later based on the 6569r1 die shot. As far as I can tell all 6569s use the same resistor values for colors.

  • I think we can more or less predict what the color values should have been,

    For "target" color angles, I used the PAL defined color angles know from the test pattern. As there seems some pattern in the deviations using those "target" color angles, maybe those are the values that should have been.

    Question: The avg palettes of your measurement is what can be seen if one watches a bigger area of the same color, right?


    This would mean that just a green area reaches the target color (angle) as both lines have a similar deviation, just opposite.
    All other colors areas have more or less advanced/delayed (averaged) color angles.

  • The line-wise measurement really might teach us alot of the VIC-IIs magic. Thanks again for the data.:thumbup:


    As you could see, orange and brown data did not really follow the deviation graphs very well.
    First, I was thinking that this is caused by measurement tolerance. But then I questioned my assumed color angles for orange and brown. Sometimes you have to make one step back to see things clear again. ;)
    My opionion is that all the other 6 "base" colors are intended to be like PAL descibes them. But orange and brown are not definded there.


    After reviewing my assuption of the orange and brown angles, the deviation graphs look very nice.
    If I am correct, it means that the line-wise analysis helped us to define the intended angles for orange and brown quite precisely.
    The graphs react quite sensitively, so I would say accuracy might be around +-0.5°.

  • Graphs show old measurements by Marko and calculated/simulated by resistor values from Michiel.
    The measured curves can be matched by modifying the parallel resistor.
    For 5-step R1, I modified 2 resistor values that were measured by Michiel on R5.

  • I did some square counting on several die shots.

    The idea is that you can find the relative resistance of a trace on a chip by counting the squares in that trace. Traces tend to zig-zag a lot, I believe the corners in these count as half a square. So if trace A is, say, 40 squares long, and trace B is 80 squares, then the resistance of B is twice that of A.

    So this is by no means an exact science and I may even go about this the wrong way, but anyway. :) Also I did not count the part of the trace where it attaches to the metal layer, since its resistance should be negligible (except perhaps for the 'black' resistor.)

    Square counts

    6569R16569R38565
    black13.112.412.5
    yellow
    153.1167.2192.4
    cyan (grey on R1)
    62.383.594.7
    grey (dark grey on R1)
    27.645.354.7


    I used the die shots that are available here:
    http://visual6502.org/images/p…odore_8565_die_shots.html
    http://mail.lipsia.de/~enigma/neu/6581.html

  • Wow. It seems now you are touching the soul of the VIC. ;)
    I understand the length/resistance thing, but: Where do you know the locations of the "snakes" and what they are for?
    For my calculation, I kept the "VIC internal" resisitors (R1) unchanged, I could follow the curves by just modifying the "outer" resistance (R0)
    I think at the end, it is just the ratio that counts, right?


    For 6569R1, R0 could be set to 470 Ohm, I just had to change two of the internal resistors and of course reduce combinations from 7->3
    See attached.
    Can you see some correlation with your "snakes"?

    If keeping R0=470 constant, one should be able to find the partial resistor values (combined to R1) of each chip revision, right?

  • It doesn't look like the square counting is very accurate, as was expected I guess.
    If you look at the square counts on R3, the yellow : cyan ratio is about 2 : 1.

    But on the measurements the ratio is more like 7 : 4.


    I don't remember exactly how I found which snake does what. I think I first mapped the pins on the chip to the pads on the photo, then looked at what happens at the luma out pin.

  • Attached an Excel sheet.


    I tried to convert the old Marko measurements to "real" luminance voltage.

    It seems that white is always overshooting (~1.050 V) the reference target 1.000 V. On the other side, black never really goes to 0% black level (0.300 V).
    So the big question is, where to define 0 and 255 RGB "brightness".:whistling:

  • I believe most capture cards have some kind of automatic gain circuit. This multiplies and/or shifts the input voltage such that the sync signal is then effectively at 0V and blank/black at 0.3V (with the assumption that pure white is then at 1V). Then you can adjust the voltages to obtain brightness levels (0.3V = 0, 1V = 255.)


    To convert a luma voltage V you would then compute 255*((V-Vblack)/(Vblack-Vsync)*0.3)/0.7

    Then black is always 0 by definition.

    So for example using my earlier values, sync was 0.05V, black was 0.34V. Black-sync = 0.29 (which is almost correct.)


    0.49 blue -> 57

    0.54 red -> 75

    0.59 purple -> 94

    0.66 grey -> 121

    0.68 green -> 128

    0.78 cyan -> 166

    0.88 yellow -> 203

    1.04 white -> 264 (255)


    No idea if this is how capture cards actually work though :)

  • Guys, I'm trying to follow you on that matter and did so since the discussion began (already on Facebook).

    But I'm seriously losing track of it. What exactly are you trying to find out that was previously unsolved?