scrapcomputing / MCEBlaster

A Pi Pico based MDA/CGA/EGA to VGA adapter
18 stars 2 forks source link

Output too 'hot'? #6

Open SanguineBrah opened 4 days ago

SanguineBrah commented 4 days ago

I'm not sure if this is just a problem with my build. I could source resistors that were quite close to the values on the BoM but not exactly right (820ohms and 430ohms). On my oscilliscope I can see that the RGB outputs are at about 1v p-p, which is 0.3v too high for spec. I with try with the alternate values of 1k and 470 to see if that helps.

In terms of symptoms, some of my monitors go through AGC adjustment then stabilise with a good image but some show distorted colours when the intensity bit is used.

scrapcomputing commented 4 days ago

That's interesting. Could you measure your monitor's resistance from one of its RGB pins to ground? This is supposed to be 75 Ohms, but I would like to know if this is not always the case. Could you also list the the monitor model number for future reference?

Thanks!

SanguineBrah commented 4 days ago

Luckily, I am a terrible hoarder so I have many old VGA monitors to test with!

All of the monitors I tested showed about 78/79ohms on the RGB lines, which includes the cable so this is probably very close to 75 in reality. On the scope, all of them showed RGB hitting up to 1v p-p at the cga_comp colour bars test.

The following three monitors worked perfectly, with no unusual behaviour: Dell E176FPm NEC Multisync LCD1770NX Samsung 2043BW

This one is an LCD TV, which worked but could be seen to be making AGC adjustments whenever the picture changed: JVC LT24C660(D)

This one showed major colour issues wherever the intensity bit was used: HP L1910

This lines up with what I have read, which is that 1v VGA signals are supported by some monitors but that it is inconsistent.

scrapcomputing commented 3 days ago

I checked my adapter, and I am actually using 1K and 470 resistors instead of the "theoretically optimal" 845/422 ohm ones. And I can see some spikes at ~680mV.

The formula for calculating the optimal resistor is 5.571 * RGBresistance, so for RGBresistance 75 Ohms, R = 418 Ohms. But if the RGBresistance is a bit higher, say 80 Ohms, then the R = 446. So a 470 / 1K resistor pair is probably a safer choice.

SanguineBrah commented 3 days ago

I have changed over to the 470/1k now, which brought the levels down close to 700mv, although my scope sometimes measures 800vm due to noise and over/undershoot. However, after some more testing, this symptom seems to be quite a bit stranger than I thought and it is not caused by the intensity of the signal. This is the cga_comp's colour bar test on the HP monitor (IBM CGA card):

IMG_20241012_035428663

It looks perfect. No colour issues with any of the colours. Now this is the RGB intensity test:

IMG_20241012_035447753

The left bar should be bright red, and the right bar should be white. For comparison, this is the same HP monitor plugged into the 31khz port of my Morse KP 800/16:

IMG_20241012_090445943

Here is the same symptom at the EDIT screen:

IMG_20241012_035657672

Another thing I noticed was that the first column of text looks darker than everything else:

IMG_20241012_035744214

It looks the same at the DOS prompt (the C in C:\ is darker.

scrapcomputing commented 3 days ago

Thanks for the detailed bug report!

Bright Cyan RGB is #55FFFF and White is #FFFFFF, so if you are seeing cyan instead of white it means that red (rR) is 10 instead of 11. The red bar should be (rR) 01 but it's showing as 00, so both are showing one level lower.

I wonder if this is related to the brown-color fix (which lowers the green signal by one level) but applied to red instead of green for some reason. Have you tried power-cycling the Pico while running this test?

Regarding the first column showing darker, I suspect this is a VGA sync issue that has to do with the signals being slightly off, in an attempt to avoid black bars on the sides of the screen.

I will try to reproduce both issues locally so I can investigate further.

SanguineBrah commented 3 days ago

Power cycling the Pico doesn't change the behaviour. The RGB intensity test shows correctly when I test with my other monitors, so I think it is more likely to be some feature of the output VGA signal that this monitor can't tolerate. It is difficult to see from my photos but on both of the faulty example screens (the EDIT screen and the RGB intensity test), the colour is correct at the very top of the screen and then it very quickly fades to a different colour (red -> dark red, white/cyan).