Hey,
I’ve had a little bit of spare time lately, so I decided to start working on my VB->TV adapter again. It’s not 100% perfect, but I’ve gotten quite a bit of it working now, and it’s playable. Here’s a video of it in action: http://www.youtube.com/watch?v=Oco0rv93qd4 . Sorry for the crappy video, nobody was around hold the camera, so I was doing everything (including playing) one handed.
Anyway, for a quick overview of what it does… the signals come from the display, go through an adapter board (to drop the voltage for the FPGA), then go into the FPGA eval board. The FPGA takes the data and stores it in internal RAM to build it’s own frame buffer, and also measures the brightness signals. Then the TV driver reads the RAM and outputs the TV signal, outputting brightness depending on which shade of red is supposed to be displayed, and also the brightness registers.
There’s a few tweaks that I still need to do. The section that samples the brightness needs to be adjusted since the brightness flickers a little bit if it’s near a decision boundary in my code… it shouldn’t be tough to fix, I just gotta do it :P. The TV output code isn’t perfect, there’s a little bit of wrapping of the image (mostly hidden off the screen), so I just gotta get the timing nailed down better.
The bigger things I’ve still gotta add are color and also the ability to do 3D (I’m currently only capturing a single screen). I’ve already added color but have it disabled because it either doesn’t lock well, or I’m seeing the effect of the low color bandwidth. I don’t see a need for messing with 3D until I get color added (or shutter glasses). I think I also need to add interlacing… currently I think it’s only drawing the odd field. I’d also like to add VGA, since that’s really a much easier signal to deal with compared to NTSC, and much more can be done with it.
I guess I should also look into designing a small board that all the hardware could mount on and fit inside the VB. That’s still pretty far off, but it’d be nice to know how much stuff would be needed and how much space it’d all take up.
Anyway, I guess I’ve rambled enough… just wanted to drop by and keep everyone updated on the current progress.
DogP
It runs at full frame rate… the only problem is that the the TV refreshes at 60Hz and the VB refreshes at 50Hz, so of course you get diagonal lines in bright flashes because they’re not in sync. You should be able to perfectly sync it w/ PAL and VGA, and some TVs can handle NTSC at 50Hz, but it’s not noticable at all during normal gameplay, and it’s not a big deal when there’s flashes, so I’m not too worried about it.
The biggest problem is the crappy color bandwidth which only really lets you display ~160 horizontal color pixels, so red/blue doesn’t look very good. It looks really good in B/W w/ the shutter glasses though.
DogP
will you implement vga output? then first mentioned problem would disappear, those would work everywhere in the world, and probably the picture is even better?
First of all, great work, DogP! I knew you could and would do it, but that was really fast! :thumpup: 😀
Second, it might be the angle between the camera and the TV, but the aspect ratio looks about right, yet the whole screen is filled… How is this possible with the VB’s 12:7 AR and the TV’s 4:3 AR? Does the picture look “squished” at all? If so, do you plan on adding “letterbox” (or “pillarbox” for 16:9) mode?
I second NamelessPlayer’s request for a cheap single-output device version; but I would prefer VGA for better stereo–both anaglyph and shutter. Also, I don’t care if it’s external and connected to the VB by some kind of umbilicus.
I had another idea, too:
For the shutter and mono modes, you could have some kind of RGB adjustment knobs so a player could tint the screen to match the level/area of the game. Like blue for the Wario swimming levels, green for Mario’s tennis, etc.
This would also be handy for adjusting the anaglyph to reduce cross-talk. BTW, have you tried Green/Magenta anaglyph? I’m still working on getting a better magenta filter, but so far it looks much better than red/blue. When I figure out the magenta, I’ll post some good Roscolux filter numbers to try.
Whew! Long post! 😀
KR155E wrote:
will you implement vga output? then first mentioned problem would disappear, those would work everywhere in the world, and probably the picture is even better?
Yeah, I’m gonna add VGA output… I don’t anticipate many problems with that since it’s a much simpler standard than NTSC. The reason I like NTSC is that video game systems are typically played on TVs… VGA monitors are typically used for computers, and plugging into one is usually more of a hassle than plugging into a TV, and most people would prefer to look at their TV. It’s more of a centerpiece of a room, and I’m not really imagining the TV adapter being used by the primary player (unless the display cables are flaky… heh) as much as by others watching someone while they’re playing in the VB (or for taking video captures).
PAL isn’t too much different than NTSC, I may be able to make a PAL build, I’d have to see whether I have anything that can display PAL (like a TV input for my PC), and I’d need to be able to generate a color carrier from my existing clock.
RunnerPack wrote:
First of all, great work, DogP! I knew you could and would do it, but that was really fast! :thumpup: 😀Second, it might be the angle between the camera and the TV, but the aspect ratio looks about right, yet the whole screen is filled… How is this possible with the VB’s 12:7 AR and the TV’s 4:3 AR? Does the picture look “squished” at all? If so, do you plan on adding “letterbox” (or “pillarbox” for 16:9) mode?
I second NamelessPlayer’s request for a cheap single-output device version; but I would prefer VGA for better stereo–both anaglyph and shutter. Also, I don’t care if it’s external and connected to the VB by some kind of umbilicus.
I had another idea, too:
For the shutter and mono modes, you could have some kind of RGB adjustment knobs so a player could tint the screen to match the level/area of the game. Like blue for the Wario swimming levels, green for Mario’s tennis, etc.This would also be handy for adjusting the anaglyph to reduce cross-talk. BTW, have you tried Green/Magenta anaglyph? I’m still working on getting a better magenta filter, but so far it looks much better than red/blue. When I figure out the magenta, I’ll post some good Roscolux filter numbers to try.
Whew! Long post! 😀
Thanks RP… once I got the TV output portion working correctly on the FPGA, it wasn’t too difficult to emulate the VB displays… I already knew how they worked, and if I couldn’t get a 500,000 gate FPGA to emulate what is basically just a shift register, that’d be pretty sad 😛 .
It really doesn’t look very squished… if you look closely, you can kinda tell that Wario doesn’t look quite as fat as he should, but the ratio is close enough. I don’t have a 16:9 TV, so I doubt I’ll mess with it, but I believe widescreen TVs can stretch the picture to be in “widescreen” mode, so someone could do that if they really wanted. I can’t shrink the vertical size on the regular TV any more than it is because the vertical resolution is fixed, and the only thing I could do is take out pixels to shrink it (like the NES emulators on the GBA), or shrink it to 224 pixels interlaced (would shrink the vertical size in half).
About actually making a final product… I’ve been looking into various ways to connect it. The pitch of the display connector is kinda small, so it may be tough, but I’m thinking of trying a PCB with a bunch of vias in a row (staggered) which I can cut in half and solder to the display connector pattern (like the quicksolder modchips), and then pass that through to the top where I’d resolder the original connector back on. Unfortunately, I doubt there’d be a “cheap” option… I think the parts alone are gonna be at least $50 (and the PCB probably won’t be cheap since it’ll likely be at least 6 layers and fine pitch). If I get VGA working, there’s no reason I couldn’t add it and allow a switch on the fly… it might make sense to have one external connector that everything outputs through (like a VGA connector with a TV dongle that plugs into the same connector).
That’d be cool to allow color adjustment, similar to the super gameboy, but I’m not sure how realistic it would be to add it. To change color on the TV, you need to adjust the phase of the chroma signal. That’s handled digitally, so the adjustment would have to control a signal inside the FPGA. The other problem is that different amplitudes of the luma signal are needed for different colors. Red and Blue both use low amplitudes (like shown here: http://www.tri-sysdesigns.com/Pages/Articles/Black_is_Black/Components/COLOR_BARSv2.gif ), but other colors would require higher amplitudes, and more pins to create the proper voltage. So basically, the user would have to tell the FPGA what color it wanted, and then it’d have to make the proper amplitude and phase shift adjustments… and really, I don’t want to deal with that 😛 . There’d be too many buttons and switches for the user to control, and really just add more complexity than it needs.
I haven’t done green/magenta anaglyph… I don’t even have a good pair of red/blue anaglyph glasses 😉 .
DogP
Woot! I spent a little time tonight writing a VGA driver and it works (at both 50Hz and 100Hz) :-). I haven’t gotten the VB actually displaying to the VGA, since I need to mux a bunch of signals so I can toggle between VGA and TV instead of only being able to use one or the other on an FPGA load, but there’s not a lot involved in reading from memory and outputting it to the monitor.
DogP
Heh, once again… I think about stopping for the night, but instead I keep going. It displays the VB to the monitor now, although I need to add a little bit of hardware to allow more shades on the VGA, so that’ll have to wait ;-). It looks pretty good though, with the exception of it being only 2 shades.
DogP
KR155E wrote:
you’re a wizard! 🙂
DogP’s skillz do indeed pay the proverbial billz 😛
BTW, I finally got around to adding the resistors for multiple brightness levels on the VGA output, so I made a video showing VGA mode: http://www.youtube.com/watch?v=04urRZjkEr4 . It’s not perfect (still have some bugs to work out), but you can see it does 2D, or 3D w/ shutter glasses or red/blue glasses, and runs at 800×600@100Hz or 50Hz (in case the monitor can’t handle 100Hz).
It still works with the TV, and supports the same shutter glasses or red/blue glasses, although of course the picture on the VGA monitor is much better, especially for anaglyph (since NTSC color bandwidth is so low).
DogP