|
A counter called line_cnt gets incremented each BURST and reset each VSYNC. This way there's a counter that runs from 0 to 262 that can be used thoughout the program to signify the line we're looking at. I've found that line 175 works well. A similar counter that increments at CLOCK RATE (50Mhz) and resets at burst called samp_cnt generates a number between 0 and 3054 signifying a specific location on the line. Although this counter isn't locked to the video signal, the clock is so fast in comparison to the signal, there's very little jitter.
By using line_cnt, samp_cnt, ODD/EVEN and the SLICE output of the comparator, we can tell if a specific spot on the screen is LIGHT OR DARK. On the Wii Guitar Hero there are frets that are broken in 5 places. By looking at the video signal at these breaks we can tell if there's a puck passing that spot on the screen or not.
Since we're looking at line 175 and the button press can't happen until the puck reaches approximately line 212, we store the presence of the puck in a shift register clocked by VSYNC and use a tap about 6 frames later to actually press the note button.
To generate the Strum signal, we "OR" the five Note Buttons together, stretch the output, and send it to the Strum Button output.
The output from the Digital Processing Board is a signal for each Note Button (5), one for the Strum Button(1), and a HIGHLIGHT signal. The Highlight signal goes back to the Analog Processing Board and is used to visually locate a spot on the screen or present indicators on the bottom of the screen to show what the program is doing. The fret and strum signals go to the Guitar interface board to buffer these signals for their trip down the RS-232 cable.
We added a male RS-232 connector to the Wii Guitar. It's not an RS-232 signal, but a convienent way to get up to 9 signals from the interface board (only 6 used) to the Wii Guitar. Inside the guitar we've added a board that holds 6 opto-isolators, each wired across one of the switches of interest. Read more about the Modification to the Wii Guitar HERE. |