Page 1 of 2

measured colour output levels?

Posted: Wed Feb 06, 2019 10:49 am
by vdpcolor
Hello there. There's documents written about voltages for systems like nes (kevtris), megadrive (TmEE), master system (TmEE), SC-3000 (TmEE). I haven't been able to find measurements for other systems like snes (byuu says non-linear ramp with notably darker greys), psx (no$cash mentions a non-linear ramp, largely brighter than normal greys), pc engine, n64. Mostly interested for "purist" sake. Thanks.

Re: measured colour output levels?

Posted: Wed Feb 06, 2019 7:44 pm
by tepples
I'd like to see voltages for Super NES and GameCube in order to display IRE levels in Super Game Boy and Game Boy Player software.

Re: measured colour output levels?

Posted: Wed Feb 06, 2019 11:31 pm
by TmEE
If someone can make a test ROM that shows a greyscale ramp I'll be able to take measurements on SNES and PCE/TG16 aswell. The ramp needs to show a solid white bar on left edge, then go to black and progressively higher until it reaches white and then to black again. White on left allows to me to know exactly where the useful image begins.
End result is a bunch of vertical bars of all available shades.

PCE is going to be fun because it has two types of outputs, RGB and Y with modulated chroma components and latter uses a LUT to create a different result. I'm not sure how one will go about measuring the chroma components, one will have to know the phase difference compared to color subcarrier to get anywhere. My equipment is not able to report such info and doing it manually is very error prone.

Hardware with a very fine ramp would need it to be split up into multiple ramps, separated by a button press or such. One quarter on one screen, other quarter on the next etc. Otherwise it will be too difficult to tell individual levels apart.

Re: measured colour output levels?

Posted: Thu Feb 07, 2019 12:54 am
by lidnariq
Here's something I quickly whipped together for measuring the SNES DACs. Displays grey ramp on every scanline, starting with white on both leftmost and rightmost pixels, black bars to separate things, and then 224 pixels going from <0,0,0> black to <31,31,31> white. Additionally uses HDMA to adjust the reportedly-analog dimming factor, 7 scanlines for each value.

Re: measured colour output levels?

Posted: Thu Feb 07, 2019 1:01 am
by TmEE
That analog dimming should be under a button press or such if I were to measure it. My scope lacks video line triggers (DRM option no less lol) and it has not enough memory to do a full frame capture. I can only work with a stable frame with solid vertical bars per one test, once all bars are measured I can go onto the next.

Re: measured colour output levels?

Posted: Thu Feb 07, 2019 11:21 am
by lidnariq
.... lulz.

Up (brighter) and down (dimmer) change analog dimming level, wrapping around.


(edit: this was apparently my 8086th post)

Re: measured colour output levels?

Posted: Thu Feb 07, 2019 6:52 pm
by ccovell
Here's a similar simple PCE ROM that I whipped up.

You can cycle through some basic RGB etc palettes by pressing any button or pad direction (except for RUN or I to account for flashcart menu buttons).


[edit] ROM updated to guarantee SPR palette & screen border are black.

Re: measured colour output levels?

Posted: Thu Oct 31, 2019 3:34 am
by turboxray
TmEE wrote: PCE is going to be fun because it has two types of outputs, RGB and Y with modulated chroma components and latter uses a LUT to create a different result. I'm not sure how one will go about measuring the chroma components,
I have a VCE patent doc somewhere, where it has the first few and last entries of the LUT. It's 5bits for each channel of U, U, V. So the RGB to LUT translation is kinda unique (certain colors blend better on the composite out). RGB out was never official on the system, even if the back port had it.
luma_scale_capture.png
You can see the coarse luma stepping here. This is ccovell's 512 color demo. Do the same on an emulator and remove the color, and it'll look much different.

It's been known for like 10 years and no one's figured it out haha.

FYI, composite is made by mixing Y+C before the amp, but C is actually Q and I simply added. So VCE actually outputs Y, Q, and I separately and it's mixed before the amp.

Re: measured colour output levels?

Posted: Thu Oct 31, 2019 9:57 am
by lidnariq
turboxray wrote:but C is actually Q and I simply added. So VCE actually outputs Y, Q, and I separately and it's mixed before the amp.
It emits modulated U and V components? Or is there something (like the CoCo's MC1372 IC) that multiplexes U,V,-U,-V in sequence?

Re: measured colour output levels?

Posted: Thu Oct 31, 2019 12:51 pm
by turboxray
lidnariq wrote:
turboxray wrote:but C is actually Q and I simply added. So VCE actually outputs Y, Q, and I separately and it's mixed before the amp.
It emits modulated U and V components?
Yeah. If you can demodulate U and V outputs, you can do a component setup. I cut the traces to U and V amp circuit and fed just Y+sync (well, color burst too haha) to component Y on my TV and it was the most incredibly sharp image. I'm not an EE so I didn't have the ability to build a component converter myself.

Re: measured colour output levels?

Posted: Tue Oct 13, 2020 8:58 pm
by lidnariq
lidnariq wrote:
Thu Feb 07, 2019 12:54 am
Additionally uses HDMA to adjust the reportedly-analog dimming factor, 7 scanlines for each value.
I got around to testing my ROM in my own SNES and my own oscilloscope, composite output into a 74Ω termination resistor. Some observations:

The DAC is very linear, to the extent of my abilities to measure.
There's substantial noise (7-12mV depending on ???) from the high-resolution pixel clock, even though I'm not using a high-resolution mode.

The brightness multiplier appears to be linear (for each scanline, the ramp on that scanline seems linear).
The brightness control itself is a little non-linear, with slightly smaller steps at higher brightnesses, i.e.
INIDISP=$0F - solid <31,31,31> to solid <0,0,0> difference is 748mV
$0E - 712mV
$0D - 672mV
$0C - 620mV
$0B - 580mV
$0A - 532mV
$09 - 488mV
$08 - 440mV
$07 - 382mV
$06 - 336mV
$05 - 284mV
$04 - 230mV
$03 - 178mV
$02 - 127mV
$01 - 72mV
$00 - ≈4mV (very hard to measure, SNR=1/2)
(This is just barely quadratic)

This 1-1-1 SNES S-video output has slight artifacts on the edges of certain brightnesses, for example, the transition from <7,7,7> to <8,8,8> has an overshoot of roughly 4mV lasting three 512px pixels, and the transition from <15,15,15> to <16,16,16> the overshoot is roughly 11mV.

Sync tip is 296mV deep. The SNES's video output is AC coupled, so all I can really measure is relative differences.

Re: measured colour output levels?

Posted: Sun Oct 18, 2020 4:41 am
by Opatus
That's really interesting. Is that a 1chip or a 3chip SNES?

I've been working on a DAC for the 3chip, using the TST pins from the PPU2. And for that I read out the brightness register from the PPU. Then I multiply this brightness with the color information in a linear fashion. But maybe I should change the linear mixing for authenticity.

Also 748 mV seems a little bit high.

Re: measured colour output levels?

Posted: Sun Oct 18, 2020 2:00 pm
by lidnariq
Opatus wrote:
Sun Oct 18, 2020 4:41 am
That's really interesting. Is that a 1chip or a 3chip SNES?
3chip, specifically a rev1 PPU2.
I've been working on a DAC for the 3chip, using the TST pins from the PPU2. And for that I read out the brightness register from the PPU.
Any public documentation about this?
Then I multiply this brightness with the color information in a linear fashion. But maybe I should change the linear mixing for authenticity.
I do wonder how much it matters. Because TVs have a gamma, and this curve is in the same direction, this just makes that same effect even more pronounced. (Not only is (INIDISP=0xF)-(INIDISP=0xE)=36mV vs (INIDISP=1)-(INIDISP=0)=58mV, but gamma adjustment means that (INIDISP=0xE)÷(INIDISP=0xF) = 97.7% the photons while (INIDISP=2)÷(INIDISP=0xF) = 44.6% the photons. (vs 96.9% the photons and 40.0% the photons were this curve linear)

librecalc found that the regression for my measurements here was
mVmax = 5.707 + 58.828*INIDISP - 0.6094*INIDISP²
with R² = 0.99983
Also 748 mV seems a little bit high.
It is a little high.
Normalized to sync tip depth (i.e. via RF modulator) it works out to 101 IRE. Directly (not normalized) via the S-video pins, it's 105IRE. Both are still less hot than the NES's bright whites (110 IRE).

Re: measured colour output levels?

Posted: Mon Oct 19, 2020 2:21 am
by Opatus
Any public documentation about this?
Thank you! You can find it on the Shmups forum:
https://shmups.system11.org/viewtopic.php?f=6&t=66597

As I think the most commonly used brightness settings are 100, 75, 50 and maybe 25% and these are fairly linear, I won't implement it just yet, but I'll keep it in mind.

Re: measured colour output levels?

Posted: Mon Oct 19, 2020 11:39 am
by lidnariq
That's so cool!!

Since you've already got everything tidily broken apart, I'd be casually curious what the inter-PPU bus (holding sprite data) looks like.
As I think the most commonly used brightness settings are 100, 75, 50 and maybe 25% and these are fairly linear, I won't implement it just yet, but I'll keep it in mind.
I think I'd honestly just assume that the difference isn't visible.

I could make a test ROM that specifically puts two (palette+INIDISP) values that should be the same brightness (at least, closer than 1 part in 256). There's a bunch of them, such as:
620mV (COLDATA=31,INIDISP=12 -vs- COLDATA=27,INIDISP=14)
580mV (31 & 11 -vs- 29 & 12)
520mV (26 & 12 -vs- 24 & 13)
But I'm not clear what the point would be, other than trollish precision.