02/19/2018 at 15:57 •
The mechanical drawing of the VGA connector included on the datasheet left me a bit puzzled, so I decided to mock-up the PCB to double-check the footprint before sending out the gerbers. I made a cardboard mock-up of the board to check things.
I printed out an image of the layout, glued it to a piece of cardboard from the back of a legal pad, then poked holes for the pins with a sewing needle held in a pin vise. I used a paper punch to make the mounting holes for the connector. The result: a perfect fit. I had properly deciphered the datasheet.
I used to make these a lot more often, especially when I used to etch my own boards. There are two gotchas - first, printers are typically more dimensionally accurate in the horizontal than vertical directions. This is caused by paper slippage and eccentricity of the rollers. So, the spacing may not be very accurate in one dimension. The second problem is caused by the paper warping when saturated with glue. I previously used white glue for these, but have found warping to be much less of an issue with a glue stick.
02/14/2018 at 13:56 •
Here's the first cut at a schematic for the game console.
The PCB will have a socket to accept either an A1 or A2 TinyFPGA board. There are sites on the PCB for either an 8- or 14-pin metal can crystal oscillator. I chose a through-hole oscillator since 25.175 MHz oscillators (640x480 @60Hz VGA) don't seem to be widely available in SMT. Additionally, when using an A2 board as brains, you are free to choose a different oscillator frequency from your junk bin and use the internal PLL to synthesize the correct dot clock. I've experimentally used 640x480, 800x600, 1024x768, and 1280x1024 with the internal oscillator on the A1, and would have gone higher except that's the maximum resolution of my test monitor.
Since most metal can oscillators are 5V, a 74LVC1T45 level translator provides a 3.3V output. I didn't see the point in messing with resistive dividers at 25+ MHz.
The VGA output uses three 3-bit weighted resistor DACs. I used similar 2-bit DACs on #PIC Graphics Demo last year, and figured I'd try to push it a little. This will give a 512 color display. The resistance values are chosen to weight the bits correctly, produce a full-scale 0.7V output, and present a 75-ohm output impedance. Similarly, the two sync lines are back-terminated in 75-ohms to damp reflections on the cable.
Audio output is PWM, but there are left and right channels. In #Oscilloscope Vector Game Display I had a look at the output produced by the Raspberry Pi's PWM audio, and it wasn't pretty. It is cheap and easy, however, so I'll take two out of three. Again, the resistors are chosen to produce line-level output (0.894V peak) and 100-ohm output impedance (not critical).
The controllers use Wii nunchuck connectors. A wide variety of retro-style controllers are available for this interface, which uses I2C communication. The MachXO2 devices on the Ax boards have a hard IP I2C port which might make a single-player game possible on the A1, which otherwise would probably be too small. I don't know if the I2C lines are pulled-up in the controllers, so I'll add sites for pull-ups on the PCB, which can go unpopulated if needed.
The PCB is waiting until I receive the parts. The mechanical drawing on the VGA connector datasheet was confusing, and I'm not sure I got it right. I'd rather not add to my collection of coaster PCBs.
Will you be able to program complex games on this? No. The challenge will be coming up with something that fits.