Thinking about STMUzebox

Discuss anything not related to the current Uzebox design like successors and other open source gaming hardware
tim1724
Posts: 30
Joined: Mon Dec 08, 2008 8:38 pm

Re: Thinking about STMUzebox

Post by tim1724 » Wed Mar 14, 2012 1:50 am

HardlyUnique wrote: So, forget 15-bit color. Now, I'm proposing 12-bit color. That's still more color depth than the Sega Genesis and it still allows for even color channel lengths. Plus, you could pack two direct colors into three bytes with minimal effort.
12-bit color can produce some pretty nice results. Even in CLUT-based modes where you only get a smaller subset of the total color palette, it's nice to have a wide variety to choose from.

If this thing ends up being able to do 320x200 with 12-bit color output, I'd be tempted to make a video mode to support a 4 bit-per-pixel frame buffer in the style of the Apple IIGS's 320x200 mode. (16 palettes of 16 colors each, drawn from a 12-bit colorspace, with the color palette selected on a per-line basis. Maybe even support the wacky and rarely-used fill mode feature.) It's certainly not the world's most useful video mode, but for nostalgia reasons alone I'd be tempted to do it. :)
HardlyUnique wrote: What you gain with more colors is obvious - everything in the future can use more vibrant colors and you don't have a very powerful chip crippled by 8-bit color (that consoles 50 times slower had already moved past). As a bonus, having even color-channel length is something that should make game programmers happy :).
Yeah, if at all possible I'd want to see the hardware support more than 8 bit color, even if many video modes only used 8-bit color due to memory constraints. PC games of the 90s looked great with VGA's 256-entry palette with 18 bit (6 bits each for r/g/b) colors.

I think VGA's 18 bit color is overkill. 12 bit output would be a great improvement over the uzebox, without using too many I/O pins.

WAHa.06x36
Posts: 31
Joined: Sat Feb 04, 2012 6:11 pm

Re: Thinking about STMUzebox

Post by WAHa.06x36 » Fri Mar 16, 2012 9:32 pm

HardlyUnique wrote:Here's a schematic of what I built:
http://sites.google.com/site/trevorsuze ... 20sch1.png
This schematic is designed to re-use some resistors from WAHa's design. What worries me about both is that they don't use 75 ohm termination. If someone can explain how that might be a problem, I'd love to hear it!

Anyways, I've read that VGA is supposed to be terminated with 75 ohm's at each end. So, if perhaps for superstitious reasons more than engineering ones, I've made this schematic, which is the one I recommend anyone else follow:
http://sites.google.com/site/trevorsuze ... %20ohm.png
I'm no electrical engineer, but when I asked a friend who is, he said that output impedances are calculated as if the resistances to ground and those to the positive voltage are connected in parallel. I don't understand the idea behind this, but I checked other similar circuits done by other people, and they are also built like this. If you calculate the resistance of all the resistors in my circuit on one channel in parallel, you'll see the result ends up being about 75 ohms.

The resistors are also selected to give the output a maximum level of about 0.7 V when all are turned on. If you add more bits, you need to recalculate all the resistances to make it properly add up to 0.7 V, or else you will get a slightly too high voltage. Your monitor might compensate for this, but then again it might not.

HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Thinking about STMUzebox

Post by HardlyUnique » Sat Mar 17, 2012 6:34 am

I've always been under the impression that "termination" refers to the resistor that's connected directly to ground. Wikipedia seems to confirm this. As I understand it, most VGA cards are designed with a 75 ohm resistor going to ground on the signal-side, and the monitor having a matching 75 ohm resistor to ground. Since your circuit uses 150 ohm terminators (I'm pretty sure I'm using the term right) and my (built) circuit uses 110 ohm terminators, I wanted to know what the harm is, since they are both calibrated to output (more or less) proper voltages.

Actually, in looking up termination, I believe I discovered the reason the 75 ohm resistor on the output should match the one in the monitor. See http://en.wikipedia.org/wiki/Impedance_matching. So, it looks like having a non-75-ohm terminator will only have the potential to degrade quality - not make anything go pop or boom.
WAHa.06x36 wrote:The resistors are also selected to give the output a maximum level of about 0.7 V when all are turned on. If you add more bits, you need to recalculate all the resistances to make it properly add up to 0.7 V, or else you will get a slightly too high voltage. Your monitor might compensate for this, but then again it might not.
That much I understood. Here is a link to the circuit simulation I used to get my values. Note the necessity of the "extra" 75-ohm resistor to the right, modeling the ones in a monitor.

WAHa.06x36
Posts: 31
Joined: Sat Feb 04, 2012 6:11 pm

Re: Thinking about STMUzebox

Post by WAHa.06x36 » Sun Mar 18, 2012 6:45 pm

As I said, the output impedance is apparently not calculate as just the resistance to ground, but as the resistances to ground and to the positive supply in parallel. This means the resistance to ground must be larger than 75 ohms to get the correct output impedance.

See, for instance, http://forums.parallax.com/showthread.p ... -resistors for some other examples of people building these circuits.

HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Thinking about STMUzebox

Post by HardlyUnique » Mon Mar 19, 2012 8:41 am

I understand what you are saying, I just don't think it's accurate. The parallax forum has the DAC's and nothing else, so it's possible the people on that forum have some scenario I don't understand that makes what they're doing sensical for them in the proper context (Gadget Gangster?). Or, they could just be misinformed.

Personally, when using an interface to something, I always like to start by going to the original sources that spec the interface if at all possible. One reason I do this is because I don't want to copy someone else's paradigm, limitations or mistakes. Another is because I feel like I'm "cheating" if I skip this step.

I don't have IBM's specs for VGA but for now, I am willing to believe what I see online in reference to those specs:
http://en.wikipedia.org/wiki/Video_Graphics_Array
http://www.microvga.com/faq/electrical

From the microVGA electrical FAQ:
Q: How is VGA terminated?

Answer:
VGA uses 75Ohm termination at both ends (max. current 18.7mA, power 13mW). It is possible to measure color signal voltage level to detect connected monitor or graphics card. Most monitors measure GREEN signal.
That is very simple. It's the only reference to resistor values, and I don't think the scenario you describe would be explained as such.

Note also that the Parallax forum members use the term "termination resistor" in exactly the same way I use it - a resistor that takes a signal to ground. However, they also introduce me to the terms, "output impedance" and "source impedance." Neither the microVGA FAQ nor Wikipedia use such terminology or give any discussion to those concepts in the context of VGA, outside of specifying the max current. I suspect that part of the discussion is focused on ensuring the sink / source limits of the Propeller chip are not exceeded.


Like you, I have seen many homebrew video projects, most for NTSC but some for VGA. I rarely do any calculations on them, but I often notice a 75 ohm terminating resistor. Prior to seeing your schematic, I would have predicted to see a 75 ohm terminating resistor or three in any video project I looked at.

However, as you point out, if impedance is calculated as they do it on the parallax forums, no circuit should have a 75 ohm resistor going to ground from the signal.

Although, Project VGA uses just such a scheme:
http://wacco.mveas.com/img/schema1d.png

As does the example circuit on page 20 of the AD725 data sheet:
http://www.analog.com/static/imported-f ... /AD725.pdf

Finally, I tested an old Matrox card I have:
Image

WAHa.06x36
Posts: 31
Joined: Sat Feb 04, 2012 6:11 pm

Re: Thinking about STMUzebox

Post by WAHa.06x36 » Mon Mar 19, 2012 2:59 pm

As I understand it, the difference is that the circuits with 75 ohm resistors to ground have active drivers on the output. This is different from a resistor DAC like the simple ones we are building here. You can not compare the two directly.

HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Thinking about STMUzebox

Post by HardlyUnique » Mon Mar 19, 2012 7:17 pm

I can if I'm a monitor :P

EDIT: After thinking on it some more, I figured what they might be trying to do is calculate the case where all bits are off, counting those paths to ground as part of the termination. Again, this doesn't seem right to me intuitively, nor have I found any technical documentation to indicate that's how things should be done.

I did try though, but instead found a very nice tutorial which seems to indicate the opposite:
http://www.javiervalcarce.eu/wiki/Binar ... _Converter

WAHa.06x36
Posts: 31
Joined: Sat Feb 04, 2012 6:11 pm

Re: Thinking about STMUzebox

Post by WAHa.06x36 » Tue Mar 20, 2012 3:20 am

That page is for a design that uses no ground resistor at all on the output side, and just relies on the terminating resistance in the monitor. This works, because VGA signals aren't that picky, but it's theoretically completely wrong.

HardlyUnique
Posts: 65
Joined: Tue Dec 08, 2009 7:44 pm

Re: Thinking about STMUzebox

Post by HardlyUnique » Tue Mar 20, 2012 8:49 am

You're right! I didn't actually do the math or pay that close attention to the schematic on that page. :oops:

This only goes further to prove my point that you should go to the specs and not copy someone else's work! :P

Seriously though, for me, the definition of, "VGA uses 75Ohm termination at both ends," can only mean that the terminator - the part that is always connected to ground, separate from what comprises the signal - must be a 75 ohm resistor. That's how I understand the definitions of these things.

The good news however, as we both say, is that VGA isn't that picky. As long as you go from 0.0 to 0.7 and don't exceed the max current (18.7mA), you're fine. People can [design and] build their own DAC's and, assuming they do the math right, nothing will go pop or boom. Also, it's cheap and (relatively) easy to build one or two boards the discovery board can mate with, which means that a qualitative analysis isn't at all outside the realm of possibility for the curious. And - crap - now that I mention it, my circuit does push the current and power limits ever-so-slightly (18.75mA). So, maybe round the values up a wee bit if you build my circuit.

My last thought is that, like you, I'm not an Electrical Engineer. Although, I'm pretty sure there's at least one or two bona-fide Video Engineers that hang out on the forum and I really hope they pop in and give some insight.

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Thinking about STMUzebox

Post by uze6666 » Wed Mar 21, 2012 1:53 am

My last thought is that, like you, I'm not an Electrical Engineer. Although, I'm pretty sure there's at least one or two bona-fide Video Engineers that hang out on the forum and I really hope they pop in and give some insight.
Ah, we had a great one not so long ago...Clay Cowgill was the guy behind the AVCore,had an arcade and gave so many great insights. IIRC he mentionned once that the only standard thing about VGA was there was no standard!

Honestly I think both circuits you guys came up with are way more on spec than my NTSC dac, but still the latest just worked well for 99.99% of all folks out there. So I'd rather spend the next hours adding game controllers so that we can start doing some games here! ;)

Uze

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests