Page 11 of 19
Posted: Mon Mar 12, 2012 11:41 pm
by ElEctric_EyE
Ok, will try that tomorrow!
EDIT (3/13/2012): I can try this wednesday 3/14. Almost done the .b core... I can't stop until it's finished or I'll lose my train of thought.
Posted: Tue Mar 13, 2012 7:29 am
by Arlet
In any case, I was planning to use RGB internally, and perform the RGB -> YUV conversion as the last step in the video pipeline. Switching between YUV and YCbCr is then just a matter of using different coefficients.
I've been giving this some more thought. Since the CS4954 accepts YUV data in 422 format, using RGB isn't really an efficient way to encode images. Storing images in native YUV422 format seems like a better way. It preserves maximum information in the least amount of space. YUV422 also matches well with the 16 bit wide SDRAM, each pixel requiring exactly 16 bits. The only annoying part is that there are alternating "YU" and "YV" pixels. This means that you can only place images on the screen in 2-pixel steps, but I think that's only a minor issue. If you're really desperate to move something by 1 pixel, you can always provide two different images.
Using this method, we need 216 Mbit/sec from the SDRAM during active display. If you include the horizontal blank/sync time, the average throughput is about 180Mbit/sec for full-color/high resolution. Since the SDRAM can easily run at 1600Mbit/sec, there's plenty of bandwidth.
Posted: Wed Mar 14, 2012 2:09 pm
by ElEctric_EyE
I'm digging out the C-64 composite monitor out of the garage. The wife will not be happy.

Posted: Wed Mar 14, 2012 6:13 pm
by ElEctric_EyE
It works! Sorry about the delay, had to run some errands then solder in the components...

Posted: Wed Mar 14, 2012 6:50 pm
by Arlet
Cool. Did you try to use the '+' and '-' on the USB port to move the picture sideways ? There should be a blue area on the left, and I'm curious if the color turned out okay.
Do the fine vertical lines really turn purple/blue on the screen, or is that an aliasing effect of the camera ?
Posted: Wed Mar 14, 2012 7:01 pm
by ElEctric_EyE
Cool. Did you try to use the '+' and '-' on the USB port to move the picture sideways ? There should be a blue area on the left, and I'm curious if the color turned out okay.
Do the fine vertical lines really turn purple/blue on the screen, or is that an aliasing effect of the camera ?
I just tested this now after setting the baudrate to 115200. It scrolls to the right with the '+' key depressed revealing a blue screen sliding in from the left of the stripe pattern. And the pattern scrolls to the left with the '-' key depressed.
That's a real purple/bluish "meshed" type pattern.
Posted: Wed Mar 14, 2012 7:24 pm
by Arlet
That's a real purple/bluish "meshed" type pattern.
This is what I get:
Image no longer available: http://ladybug.xs4all.nl/arlet/fpga/bars.png
I suppose your C-64 monitor has a few years on my TV set. Anyway, those fine bars have 360 pixel resolution, and the CS4954 can even go double that. It would take a fairly modern TV set to discern those pixels !
By the way, I've ordered a cheap USB composite video grabber. I should receive it this week. That way, I can test the image by just capturing it on my PC, and playing it in a small window on the desktop, rather than on a bulky TV set on my desk.
Posted: Wed Mar 14, 2012 7:34 pm
by ElEctric_EyE
Yeah it's old alright. C-64 hi-res was 320x200. HSync frequency low with pixel clock @14.318MHz...
The CS4954 has all the signals present necessary for an RGB display. I should have pursued that in V1.1 like I did V1.0. I'm thinking a 15-pin VGA-style connector should replace the S-video connector for V1.2 of the Devboard (it's a space hog though), while keeping the composite video connector onboard.
Posted: Wed Mar 14, 2012 7:36 pm
by Arlet
Do you know if a VGA monitor will sync on the NTSC/PAL signal ?
Posted: Wed Mar 14, 2012 8:21 pm
by ElEctric_EyE
...By the way, I've ordered a cheap USB composite video grabber. I should receive it this week. That way, I can test the image by just capturing it on my PC, and playing it in a small window on the desktop, rather than on a bulky TV set on my desk.
Ah, sweet! I had been looking for small(<13"diagonal) TFT/LCD TV/monitors with 'composite-in', but way too expensive @$200+, especially when larger VGA 20"+ LCD monitors sell here for <$50. It's why I was pursuing VGA...
Where did you get it from?
Do you know if a VGA monitor will sync on the NTSC/PAL signal ?
I don't know, but I
was going to experiment.
Posted: Wed Mar 14, 2012 9:52 pm
by Arlet
Where did you get it from?
I got it from Conrad, a German electronics retailer, but I'm sure they sell similar stuff in the US too. Look on Ebay for "USB video adapter" for example.
Posted: Sat Mar 17, 2012 12:10 am
by ElEctric_EyE
I found 1 for cheap @$14US. Great idea there! Good up to 720P resolution.
Posted: Sat Mar 17, 2012 7:45 am
by Arlet
My USB video grabber has arrived. The nice thing is that it will do both PAL and NTSC, so I can test them both. Here's the same test image, grabbed in NTSC mode. The device also has an S-Video input, so if I install the connector on the board, I could use that for better quality.
Image no longer available: http://ladybug.xs4all.nl/arlet/fpga/ntscbars.png
Posted: Sat Mar 17, 2012 3:38 pm
by Arlet
By the way, don't expect too much resolution, especially not with the chroma part of the signal. For PAL the chroma bandwidth is 1.3 MHz, and for NTSC it is only 650 kHz. Because the pixel clock is 13,5 MHz, this means that it takes quite a few pixels for a color change.
I was playing around with a image consisting of constant luma, and single pixel lines where only chroma is changed. It's quite shocking to see how these lines turn into big blurry bars. When I change both luma and chroma in a single pixel, the big blurry chroma pixels are still there, but they aren't nearly as obvious anymore. That's why in a normal TV program, you don't really notice how poor the quality is.
Posted: Sat Mar 17, 2012 6:37 pm
by ElEctric_EyE
What kind of resolution are we talking about? Hopefully at least 320x200...