Black and white NTSC is simple – it can, and was, done with vacuum tubes for a long, long time. Color is just weird, though. It runs at 29.976 frames per second, uses different phases of the carrier for different colors, and generally takes a while to wrap your head around. [Sagar] is doing a series on the intricacies of NTSC, and the latest post deals with color and progressive scanning versus interlacing, or as it is better known, how classic game consoles and home computers generate video.
The test bed for [Sagar]’s video experimentations is a circuit containing an ATMega16, a 4-bit shift register, and a 14.31818 MHz clock. This clock is much faster than the 3.579545 MHz clock in an NTSC carrier frequency – exactly four times as fast – allowing the shift register to output four different phases of the carrier frequency a 0°, 90°. 180°, and 270°. Playing with some of the pins on the ATMega in the circuit results in a palette being generated on any old TV.
NTSC requires interlaced scanning, or sending an entire screen of even lines, then an entire screen of odd lines, at around 60 fields per second. The Nintendos and Segas of yesteryear didn’t bother with this, instead opting to send half the vertical resolution at double the frame rate. This is known as a progressive scan. [Sagar] found that this resulted in some image artifacts when displayed on a modern LCD, and moving back to an interlaced mode fixed the problem. All the code and files are up on the gits. If you’re feeling adventurous, this is exactly how projects like the Uzebox have created homebrew game consoles using little more than the ATMega found in [Sagar]’s build.
Back in the days of analog TV, vectorscopes were used to view video signals. [Aaron] has taken an old Tek 520A NTSC vectorscope and converted it into his newest oscilloclock.
The scope was originally designed to look at the signal provided by composite video. It draws vectors on a polar plot. By using test patterns such as color bars, you can ensure equipment is creating the correct color output. These scopes were so commonly used that many digital systems still provide a simulated vectorscope for color analysis. Vectorscopes were designed to be left on constantly, which is a good quality for a clock.
[Aaron] has a history of converting oscilloscopes into clocks, which we have featured in the past. This build is similar, using his custom control hardware to drive the display. Since analog vectorscopes are pretty much obsolete, you can find them on eBay at low prices, so these oscilloclocks could be relatively cheap to build.
In the write up, you get a teardown of the Tek 520A, showing the modifications made to build the clock. After the break, check out a video of the Tek 520A Oscilloclock.
Continue reading “A Video Vectorscope Oscilloclock”
The game of Anti-Tetris is played by standing in front of a monitor and watch falling Tetris pieces overlaid on a video image of your body. Each hand is used to make pieces disappear so that they don’t stack up to the top of the screen. We don’t see this as the next big indie game. What we do see are some very interesting techniques for hand tracking.
An FPGA drives the game, using a camera as input. To track your hands the Cornell students figured out that YUV images show a specific range of skin tones which can be coded as a filter to direct cursor placement. But they needed a bit of a hack to get at those values. They patched into the camera circuit before the YUV is converted to RGB for the NTSC output.
Registering hand movement perpendicular to the screen is also a challenge that they faced. Because the hand location has already been established they were able to measure distance between the upper and lower boundaries. If that distance changes fast enough it is treated as an input, making the current block disappear.
Continue reading “Anti-Tetris project is a study in hand tracking”
We’ve seen composite video out from AVR chips many times before. But we can’t remember coming across one that managed to produce a color signal. This project does just that, producing a color video signal from an ATmega168 without using external integrated circuits.
[CNLohr] is seen here showing off his accomplishment. You’ll remember him from the glass-slide PCB server project he’s been working on recently. This time around it’s a small piece of gaming hardware which he’s working on. But using four pins from the microcontroller, connected via resistors in parallel, he is able to generate a color NTSC signal without using a chip like the AD723.
After the break you can see the two minute demo in which he shows the game running for just an moment, then gives a general overview of how the signals are being built. There isn’t a ton of explanation, but he did post his code as well as a resource for you to teach yourself more about the NTSC standard. Maybe you can make a color version of that AVR tetris game?
Continue reading “Color NTSC video directly from an AVR chip”
[Derecho] grabbed a PAL format Super Nintendo but wanted to make it play nicely with a 60 Hertz NTSC screen. His hack added a single switch to choose between 50 Hz and 60 Hz.
Take a look at the image above to see his alterations to the mainboard. The jumpers soldered to the two chips at the top are by far the trickiest part of the project. Each of the pins he soldered to needed to first be lifted from the PCB pad so that they no longer make contact with the etched traces. The technique he used involves heating the pin with an iron, then gently lifting it with a pin or a razor knife/blade. If you’ve got some experience populating SMD boards with a handheld iron this shouldn’t prove too difficult. The rest of the hack involves adding a 3-position switch (along with a 2k2 resistor) to choose between output modes based on what format game is being played.
Confronted with a monitor that would display neither HDMI signal, nor composite video, [Joonas Pihlajamaa] took on a rather unorthodox task of getting his oscilloscope to work as a composite video adapter. He’s using a PicoScope 2204 but any hardware that connects to a computer and has a C API should work. The trick is in how his code uses the API to interpret the signal.
The first thing to do is make sure the voltage levels used in the composite signal are within the tolerances of your scope. [Joonas] used his multimeter to measure the center pole of the RCA connector and found that the Raspberry Pi board puts out from 200 mV to 2V, well within the PicoScope’s specs. Next he started to analyze the signal. The horizontal sync is easy to find, and he ignored the color information — opting for a monochrome output to ease the coding process. The next big piece of the puzzle is to ascertain the vertical sync so that he knows where each frame starts. He got it working and made one last improvement to handle interlacing.
The proof of concept video after the break shows off the he did. It’s a bit fuzzy but that’s how composite video looks normally.
Continue reading “Using an oscilloscope as a composite video adapter”
Here’s two builds that print text to a TV with only two pins:
Still Alive with an Arduino
After seeing all the builds that play Still Alive, [Bob] decided to take a 1972 amber monitor and recreate the cut scene at the end of Portal. The build uses the TVout library for Arduino. There were a few problems with running the Unix and Still Alive animations at the same time, so [Bob] flips a bit in the EEPROM at the end of the command line animation and restarts into GLaDOS’ report. You can check out the old school color monitor here
ATMega Video Text Generator
[Stian] didn’t think his build was good enough for Hackaday, but his friend [Mikael] thought otherwise. [Stian] wrote a library to generate an NTSC video signal in real time. It’s a text-based build with 37×17 character resolution and only requires about 3kB of RAM. As a bonus, it only takes up two pins on [Stian]’s ATMega128.
You can check out the videos for both these builds after the break.
Continue reading “Controlling a TV with a microcontroller”