Why not better composite video like C64?

Modding and Technical Issues

Moderator: Moderators

User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Why not better composite video like C64?

Post by Mike »

llopis wrote:Are those horizontal lines correct? I keep getting them consistently, so I imagine it's some side effect of the way the graphic is displayed (either that or I have another faulty VIC chip).
No worries, your VIC chip is functioning correctly. I explained the reasons for those horizontal stripes to the left and right of the display window in more detail in this post. Here's how the picture is supposed to look like:

Image

The three colourful columns to the right are 'debug' output that show how the background, border and auxiliary colour are redefined for each raster line. :)

The white spot down in the fog that consistently appears in your photos is a bit strange though. As you see above, it doesn't show in the preview. Maybe we should investigate further, as this might indicate faulty RAM somewhere.
User avatar
llopis
Vic 20 Newbie
Posts: 19
Joined: Tue Sep 11, 2018 3:26 pm
Website: http://noelsretrolab.com
Location: Spain
Occupation: Game designer

Re: Why not better composite video like C64?

Post by llopis »

Mike wrote: Thu Jun 10, 2021 11:43 am Image

The three colourful columns to the right are 'debug' output that show how the background, border and auxiliary colour are redefined for each raster line. :)

The white spot down in the fog that consistently appears in your photos is a bit strange though. As you see above, it doesn't show in the preview. Maybe we should investigate further, as this might indicate faulty RAM somewhere.
Ah, very interesting! Clearly I need to crank up the color intensity just a bit too.

Interesting about those pixels at the bottom. In a few days I'll be getting Sven's test cartridge an harness, so I'll be able to test that. The memory expansion was through the Penultimate Cartridge and loaded via SD2IEC. I don't know if that could affect anything (like them using a few bytes of memory in that location or something like that).
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Why not better composite video like C64?

Post by Mike »

llopis wrote:Interesting about those pixels at the bottom. In a few days I'll be getting Sven's test cartridge an harness, so I'll be able to test that.
In the meanwhile you could try out this small program to test the colour RAM:

Code: Select all

1 FORS=37888TO38911:V=PEEK(S)
2 FORT=0TO15:POKES,T:U=PEEK(S)AND15
3 IFT<>UTHENPRINTS;T;U
4 NEXT:POKES,V:NEXT:END
It tries to write each of the 16 possible values into each address of the colour RAM and reports any differences. The "AND15" in line 2 is necessary as only the lower 4 bits exist with the colour RAM. The upper 4 bits just return "bus noise" and when comparing the fully PEEKed value with the original that would indicate an error where was none.

If you get any printout other than the "READY." prompt when it's finished, your colour RAM is defective.
The memory expansion was through the Penultimate Cartridge and loaded via SD2IEC. I don't know if that could affect anything (like them using a few bytes of memory in that location or something like that).
That's rather unlikely to be the source of the problem.

The involved graphics mode displays each colour RAM cell during two consecutive rasters and rewrites its value between first and second raster. Here, the write operation fails two times (init and rewrite) - the test above can tell at which address, and which bits of that address are affected, and how.
User avatar
llopis
Vic 20 Newbie
Posts: 19
Joined: Tue Sep 11, 2018 3:26 pm
Website: http://noelsretrolab.com
Location: Spain
Occupation: Game designer

Re: Why not better composite video like C64?

Post by llopis »

Mike wrote: Fri Jun 11, 2021 8:57 am In the meanwhile you could try out this small program to test the colour RAM:
Oh nice little program! (I didn't realize that the VIC 20 BASIC didn't need spaces, interesting). I tried it and it all came up good, so that's strange.

Anyway, I tweaked the video output a bit more and I think this is the best I can make it with the parameters I'm changing:
IMG_1962.JPG
IMG_1967.JPG
The final mod is 3 steps:
1. Change the element that usually goes from C13 to R10 (sometimes it's a resistor and sometimes it's a capacitor from what I saw in my boards) to a 220pF capacitor that fits in the C13 footprint.
2. Change FB7 to a 0.1uF capacitor.
3. Add a 470pF capacitor from pin 2 to the composite video out (pin 4 of DIN connector). I did this along the bottom.
VIC20.png
VIC20Top.png
IMG_1953.JPG
I hope that helps someone else as well. If you do try it, let me know how it goes.
User avatar
javierglez
Vic 20 Hobbyist
Posts: 107
Joined: Sat Jun 03, 2017 3:33 pm

Re: Why not better composite video like C64?

Post by javierglez »

llopis wrote: Wed Jun 09, 2021 11:05 am Wow! That's much, much better! I'm pretty sure that my Sony 14" Trinitron CRT doesn't support s-video internally, so the cheap adaptor must be generating a composite signal, but somehow it does it a lot better than what I could do directly on the board of the VIC 20!
I'd bet you have a 14" Sony Trinitron like mine, being in Spain. It has a flaky connector, but if you keep trying then it eventually detects the S-Video signal and switches the video input.

AFAIK a SCART cable can carry composite, S-Video and RGB. I think the cheap adaptor doesn't have any electronics. Though some SCART-equipped TVs don't recognise S-Video, I think it's just the early ones.

My method to check if a TV supports S-Video on SCART is to load GEOS with an 8-pin connector Video cable for the C64. If the background pattern is displayed with an awful arctifact then it doesn't.

There's two cables for this, one has a SCART connector or the other has an S-Video connector, plus you plug the cheap adapter).
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Why not better composite video like C64?

Post by Mike »

Hi, Noel,
llopis wrote:Oh nice little program! (I didn't realize that the VIC 20 BASIC didn't need spaces, interesting). I tried it and it all came up good, so that's strange.
I need cross check the picture on my own VIC-20. The white spot does not appear in emulation (I am using a build of WinVICE 3.1 at the moment) so that is something worth to investigate.

You really should try out Javier's suggestion for a proper S-Video input via your Scart Adapter. As long as you still admix Chroma into Luma, you have a Composite signal - this then is no kind of S-Video mod! There is still visible distortion of pixels even with your latest modification. With the S-Video mod, you get a perfectly sharp array of pixels with no partial shifts to the left or right. Some 'leakage' of colour will remain, as I described in my earlier posts. I will also take photos for a comparison.

Greetings,

Michael
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Why not better composite video like C64?

Post by Mike »

Mike wrote:I need cross check the picture on my own VIC-20. The white spot does not appear in emulation (I am using a build of WinVICE 3.1 at the moment) so that is something worth to investigate. [...] I will also take photos for a comparison.
Here we go:

Image
(download)

No white spot. This is with a Mega-Cart as RAM expansion and C64SD V2 used as SD2IEC device.
llopis wrote:The memory expansion was through the Penultimate Cartridge and loaded via SD2IEC. I don't know if that could affect anything (like them using a few bytes of memory in that location or something like that).
I do not own a Penultimate and thus cannot easily replicate your setup.

Please try to start up your VIC-20 with the Penultimate strictly acting as RAM expansion only (+24K at least) - no DOS wedge, no fastloaders (like SJLOAD), no file browser. Just the plain startup screen with 27159 BYTES FREE. Place the file "MD.PRG" into the root of the SD card file system, do not put it into a *.d64 file. Then load the file from the startup screen with LOAD "MD.PRG",8 (not ",8,1"!) and view it with the RUN command.

This procedure should exclude any influence from 3rd party software that might tamper with the display routine of the picture.

Please tell if the white spot persists or goes away.

Greetings,

Michael
User avatar
llopis
Vic 20 Newbie
Posts: 19
Joined: Tue Sep 11, 2018 3:26 pm
Website: http://noelsretrolab.com
Location: Spain
Occupation: Game designer

Re: Why not better composite video like C64?

Post by llopis »

Thanks, Michael. I'll give it a try.
The other day I tried the diagnostics cartridge and it reported an error on UC8 (but there's no UC8 on the board), so I'll have to investigate that a bit.

In the meanwhile, I released the video today:


I'll definitely revisit that VIC 20 and maybe try to improve the image circuit a bit more.
Cheers.
User avatar
Lechuck
Vic 20 Enthusiast
Posts: 174
Joined: Wed Nov 11, 2020 7:23 am
Location: Madrid
Occupation: IT

Re: Why not better composite video like C64?

Post by Lechuck »

Thanks for the video. Very informative, and interesting!

Cheers
a4000bear
Vic 20 Amateur
Posts: 57
Joined: Sun Jan 27, 2008 10:01 pm
Location: Australia

Re: Why not better composite video like C64?

Post by a4000bear »

Just saw your video, and I posted some suggestions there, which I have also pasted below so that the people here can see it:

I'm the guy who developed the S-video mod as described in the Denial wiki. While I never made any attempts to improve the composite output, I can give some explanations and suggestions you might find of value. Firstly, the red trimmer adjusts the colour subcarrier frequency, if it is incorrectly adjusted, you may get 'Hannover Bars' in coloured areas. You can see an example of those in the bottom two images in the Denial S-video wiki page. If the adjustment is off by too much, the colour may completely drop out. This applies to PAL. NTSC does not have the 180 deg alternate phase reversal, so if this trimmer is out of adjustment, the colours will all be wrong.

The key to maximum video quality is correct video levels. Firstly, your TV/monitor should be presenting a 75 ohm load to the input video signal. The video should be 1 volt, measured between the bottom of the sync pulse and the white level. This is adjusted with the trimpot as you describe in the video. Additionally, with the entire video signal at 1 volt, you should have 0.3 volts between the bottom of the sync pulse and black level. This relationship is fixed within the VIC chip.

The colour level should be at 0.3 volts peak-to-peak on the colour burst signal. There is no means to adjust this in an unmodified VIC-20 and it is normally way too high. This is why you get the serrated edges between different coloured areas. It is actually called 'Dot Crawl'. Normally on a proper interlaced video signal, these dots will slowly crawl up or down, but on a VIC-20 they are stationary. You will never be able to eliminate dot crawl, however it can be reduced by two methods.

The first method is to reduce the colour level to at least the correct 0.3 volts. You could reduce the colour level further, which will further reduce dot crawl, but you will eventually get to a point where the colour will get noisy or blurry or even become prone to dropping out.

The second method (and which is possibly what is happening in your modification) is to restrict the low frequency bandwith of the colour signal (before it is combined with the luminance signal). This will have the side effect of smearing the colours somewhat, and may even cause some smearing of the luminance signal too.

Your LCD monitor would most likely have a comb filter in it which is a far more sophisticated method of separating the chrominance from the luminance. This almost entirely eliminates dot crawl as you have observed. Your CRT monitor would use the old bandpass filter method which is far less effective.

Finally, I have noticed there is an amazing variation in picture quality between different VIC chips. Often these are temperature sensitive. I have one VIC chip that gives an OK image when cold, but after a while the blue parts of the image go all noisy, blurry and are full of 'jailbars' once the chip warms up.
SX64man
Vic 20 Newbie
Posts: 1
Joined: Fri Jun 25, 2021 6:48 pm
Location: Florida USA
Occupation: retired musician

Re: Why not better composite video like C64?

Post by SX64man »

Great thread! Fantastic information from all. Just watched Noel's video and also read the thread above.
Currently I have 2 NTSC VIC-20 early models and was struck by how much better the colorbars image looks on this model compared to all the screenshots. So the NTSC early two prong power models also appear to have a superior image to the CR. I did try loading the complex test image also posted above but it appears it only works for PAL (I also confirmed that using VICE - the image loaded fine on PAL with 28k but not NTSC).
I am particularly interested in this because in a week or so I will be bringing up a VickieTwenty PAL to life which is based on the CR model. I am curious if the same video issues are present on this board - I am assuming so. Like Noel I also have a Sony 14" CRT (KVG14C1 MultiSystem CRT) for composite, and can also use a PAL/NTSC capable converter for composite or svideo to connect to a Viewsonic 17" LCD on DVI. So the screen comparisons should be similar.
Post Reply