Modify TV object?
teddyp
Posts: 14
Hello all,
First time posting and propeller noob. I'm using the propeller for a project and wondering if there is some way to make the video.. um.. "better"? I'm currently interfacing the dev board to a HMD (head mounted display). This one to be exact: www.vrealities.com/eyeviewxt.html
On that website, they say "640x480 VGA display." Yet, it's NTSC through a composite connection. That part is confusing me, because I'm limited to using the TV object, right? Sorry if this sounds stupid, just haven't been able to find an answer that clarifies it for me.
First time posting and propeller noob. I'm using the propeller for a project and wondering if there is some way to make the video.. um.. "better"? I'm currently interfacing the dev board to a HMD (head mounted display). This one to be exact: www.vrealities.com/eyeviewxt.html
On that website, they say "640x480 VGA display." Yet, it's NTSC through a composite connection. That part is confusing me, because I'm limited to using the TV object, right? Sorry if this sounds stupid, just haven't been able to find an answer that clarifies it for me.
Comments
-Phil
But, for the sake of argument, suppose you could get 640x480 resolution and that the Prop could pump out 640 colored pixels per line. That's 307,200 pixels. The Propeller has 32K bytes of RAM, which has to be shared with programs and variables. That works out to 9.4 pixels per byte, or more than one pixel per bit. Clearly, no matter how you cut it, some sort of compromise has to be made. If you want full color, you have to sacrifice resolution. If you want to maximize resolution, you have to sacrifice color.
-Phil
On a non-horizontally interlaced display, anything over 160 pixels in the safe area will display artifacts. 256 pixels is about the upper, "clean" limit, beyond which the artifacts become a significant fraction of the pixel "size".
With interlaced color, you can get 320 pixels rather nicely, and with most color combinations displaying well. That can be pushed to maybe ~400 or so pixels, with the same limitations as the non-interlaced mode, where eventually artifacts end up being more of the pixel, and quality is lost.
The best overall display, on most composite capable devices is one where there is both horizontal and vertical interlacing going on. If vertical resolution is kept at two scan lines per pixel, you get a very good overall balance of quality, color, resolution. That means 320 x 200 is pretty sweet for the "safe area", which is the active graphics area, usually surrounded by a border.
Like the non-interlaced video, the 320 can be pushed up to about 480 pixels, with most color combos being acceptable. If it were me, I would try for a 480x192 pixel display on composite, for a good overall balance of all these factors.
The Parallax TV object is actually quite good, in that it will support most any composite resolution you want, and it does vertically interlaced, or non-interlaced video as well. The only thing that object does not do is non-horizontally interlaced NTSC video, and for this device, I doubt you would want that.
Tweak around with the horizontal and vertical parameters. You won't have any real trouble with horizontal. Vertical is kind of tricky. Get the display to run interlaced first, and you will see the graphics demo squished onto the upper part of the display. Once you have that, then set the vertical scale to 2, not 1, and it will double up each pixel forming a 192, or 200 pixel display, depending on the other parameters. If you can tolerate the motion artifacts, the full 400 pixels is easily done, but what you will find is motion will form tearing on an object, making it difficult to view for longer periods of time.
It's also worth a shot running a PAL display. It's not as trouble free as NTSC is, but if your device can tolerate the Propeller PAL signal, color resolution is significantly improved.
Finally, choose your colors well! Anytime you are running NTSC composite, and you are over either 160 or 320 pixels, keeping contrasting colors closer together on the color wheel is the way to go. Also, intensity changes run at much higher resolution, so white pixels on a dark blue background will resolve a lot better than red pixels on that same background, where yellow ones are only marginally impacted. Where you've got to have some contrast in the colors chosen, just make sure to avoid fine detail there, and the resulting display can be pushed up in overall resolution with few issues.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
then 640x480 resolution is possible, with clever conservation of memory involving reuse of tiles or characters
and otherwise not trying to maintain buffer space for every pixel, nor demanding to display a complex image
with zero redundancy. The only so extreme example I can think of now is zooming through the Mandelbrot Set.
I am talking about NTSC. The interlacing that allows for 640x480 looks like a checkerboard pattern (on a
fully compliant NTSC source) through a loupe magnifier on the screen. Such interlacing does not have the
same color artifacting effects that classic computers limited to 320x200 TV resolution had. Oddly, the only
classic 8-bit computer that supported interlacing that I can recall is the VIC-20, which had only 5K but could
do something like 176 x 400 resolution with demo scene effects.
Does S-video have a horizontal resolution limit? Is it merely a separate wire for a 3579545 carrier or can it
go higher than that? My immediate thought is the luminance horizontal resolution becomes indefinitely high,
limited only by the equipment bandwidth, and that the chroma gains potential artificial resolution even though
it is still 3579545 Hz, because its upper sideband can have more bandwidth than that carrier frequency.
That is not unusual, it is called "vestigial sideband" and has always been a characteristic feature of NTSC.
Post Edited (VIRAND) : 3/14/2010 1:29:10 AM GMT
The potatotext driver results on composite, with the full interlace, alternating phase was quite good. On newer devices, very good. I've noticed the newer HDTV display devices can really resolve a lot of detail on a composite signal. Impressive actually, compared to older ones, particularly older analog ones. Significant differences on the color wheel are a total mess at 640 pixels, but where that's not in play, the result is actually quite good.
S-video has a horizontal limit too. It's a separate wire, same chroma signal.
The overall level of color detail is improved, by the virtue of there being no artifacts caused by higher resolution luma information.
Essentially, the luma channel can run at a nice, high resolution, with the lower resolution color overlay on top. An S-video capable display will do 640 pixels rather nicely, monochrome. Color tops about somewhere about 320, if phase shifting, or what I call "horizontal interlace" is used.
All of the same tricks to maximize image quality remain in play, but without worries on artifacts for all but the highest contrast color combinations, which if present will present "edge" artifacts where the signal cannot carry enough information to prevent clashing. Usually rolling off the sharpness will blend these for a nice overall look, at the expense of pixel edge sharpness. Can't have it all!
S-video really works because people key off of luma first, then chroma. For most things, the eye ignores the color errors. For computer graphics, these are seen more than on a movie, for example, but the kind of artifact errors generally don't stand out like they do on a composite signal, where the artifacts actually produce color not intended, where an S-video color artifact is more like a loss of detail, not adding anything significant to the image. I've cranked an over 640 pixel test display through various S-video devices. On really good analog ones, those pixels can sometimes be resolved. On most devices, this appears as variations in luma, and on digitial devices, sometimes as noise and or luma variations. My high resolution capture device renders a full frame at 720x486, and that appears to support the idea that luma bandwidth does top out at 640 pixels on most everything.
The C64 used a pseudo-interlace display, where vertical resolution remained at 200 pixels, but phase change is used to boost horizontal resolution to 320 pixels easily. That's a nice balance, because motion artifacts are not present when this is done. On a vertical interlaced display, moving objects need to either move at 30Hz, or significant tearing will occur, as the object is in two different locations on the two frames. This generally doesn't look all that good. The NES was one of the first home consoles to apply a similar technique.
The Parallax graphics driver does this too. Actually, it's very difficult to get it to not do that, and I think it's very well designed in that way. So a 200 vertical line display will crank right up to the 640 pixels on composite and generally look very good, with the real limit being the device used to view the signal. The cool thing about the Propeller is that if one writes to the reference video circuit, S-video comes for free. Just edit VCFG, and bring the chroma signal off startpin+3, through the resistor, and onto the S-video chroma channel. The same code generates the same colors in either case.
To get higher than that, either go PAL, or component video. I've often thought about a component driver, because up to HDTV resolutions are possible, and more colors are possible, but it seems like 3 cogs are the minimum to get the video frame drawn, perhaps doing a bitmap or character driver only. Maybe it could be done in fewer colors, using VGA mode, or something with less COG's, but that's getting off into territory where most people won't have that setup.
In that scenario, full on VGA makes the best overall sense, and that's what everybody pretty much has done.
The artifacts are actually present in the interlaced display, but are just transient, and the alternating phase tends to produce artifacts that cancel out, leaving the eye to key on the luma information for all but high saturation color images. If you want, you can run potatotext with the interlace mode turned off to see how this is true. For enhanced text resolution, that driver alternates phase on every scan line on non-vertically interlaced basis, but does it in a static way. Even scans are one phase, odd scans are the other one. The effect improves resolution, cuts many artifacts, and most importantly, does not shimmer, which is quite distracting to many people, which is why it was not used on the early machines.
Found that by accident, working with Eric's template. I liked it, and left it, and as far as I know, no home electronics device ever did that. The downside is image detail does vary with vertical motion, but on a text display, this is not generally seen. Would have been a nice trick in the 80's!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!