From Gadget Factory

Main: ArcadeMegaWing

Hardware| Hardware Overview - Arcade MegaWing - Papilio One 500K

Arcade MegaWing

The Arcade MegaWing provides all of the arcade hardware in one convenient and easy to connect circuit board. It snaps into the Papilio One and gives it the necessary hardware resources to communicate with the outside world. Continue reading for more information about each hardware section of the Arcade MegaWing. Be sure to visit the Papilio Arcade wiki for more information.

Specifications

MegaWing VGA

The VGA section of the Arcade MegaWing uses 12 resistors to implement 4K color depth. VGA video is analog in nature so there needs to be some way to vary the RGB (Red, Green, and Blue) signals between 0V and .7V. For each RGB signal the shade, or intensity, of the color is controlled by varying the voltage of the pin between 0 and .7V. The finer control you have over the voltage the more colors you can create. For the Arcade Wing we are able to control 4 different bits per color which allows us to generate 16 different voltage levels between 0 and .7V. This means we can generate 16 shades for each color. If we add all three colors together we have 12 bit video which gives us (2^12=4096) the possibility of 4096 colors.

The usual options for controlling voltage on a pin are to use a DAC, PWM, Delta-Sigma, or a resistor ladder. For the Arcade Wing we wanted to use the lowest cost and easiest method for a hobbyist. PWM and Delta-Sigma were ruled out because we did not think we would be able to vary the voltage with these methods fast enough to keep up with the VGA timing requirements. A DAC would be a good solution but was more than we needed for our modest requirements. A resistor ladder fit the bill perfectly because it is very low cost and easy to implement. The resistor ladder is made up of 4 resistors per RGB color that all connect, in common, to the VGA connector on one side and individually to a digital I/O pin on the other side. The lowest resistor starts at ~500 ohms and each successive resistor doubles in size with the final resistor ending with ~4K ohms. Each digital I/O pin is controlled by the VGA controller inside the FPGA. Each pin can be set to either 0 or 1 with a 1 causing the resistor to contribute its voltage to the final voltage level. The voltage can be stepped up from 0 to the desired output voltage which in this case is .7V.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
Red 0Red Bit 0OutputP98P11836
Red 1Red Bit 1OutputP2P11937
Red 2Red Bit 2OutputP3P12038
Red 3Red Bit 3OutputP4P12139
Green 0Green Bit 0OutputP68P8420
Green 1Green Bit 1OutputP66P8221
Green 2Green Bit 2OutputP63P8022
Green 3Green Bit 3OutputP61P7823
Blue 0Blue Bit 0OutputP85P9916
Blue 1Blue Bit 1OutputP83P9717
Blue 2Blue Bit 2OutputP78P9218
Blue 3Blue Bit 3OutputP71P8719
HSyncHorizontal SyncOutputP95P11735
VSynchVertical SyncOutputP94P11634


The way the desired output voltage is accomplished is by carefully managing the parallel voltage that the 4 resistors add up to. Using a Parallel Resistance Calculator we see that 500 ohm, 1000 ohm, 2000 ohm, and 4000 ohm give a total resistance of 266 ohm. The final key bit of information is that there is a 75 ohm resistance built into VGA cables, so that means that the point where our 4 resistors come together on our VGA connector forms a Voltage divider circuit. Using a Voltage Divider calculator with 3.3V as the Input Voltage, 266 ohm as R1, and 75 ohm as R2 we end up with an Output Voltage of .73V. The end result is that if all 4 resistors are set to Ď1í then we will see .73V at the VGA connector. If all 4 resistors are set to Ď0í then we will see 0V at the VGA connector, any combinations in between will give us evenly stepped voltages between 0 and .73V. The voltages will be evenly stepped because we picked resistors that double in size.

MegaWing Sound

The sound section implements a 1/8th inch stereo jack with a low pass filter. Arcade projects simply implement a Delta-Sigma DAC as outlined in Xilinx App Note 154. A Delta-Sigma DAC allows high quality audio to be implemented with a minimum amount of physical hardware required. The high speed of the FPGA clock allows the FPGA to do the heavy lifting of the Digital to Analog conversion.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
Audio-Audio LeftOutputP84P9814
Audio+Audio RightOutputP86P10015



MegaWing Directional Buttons

The Arcade MegaWing provides 4 directional buttons that can be used for general input. They can be used with homebrew games that do not need joysticks or for the coin/start buttons on classic games.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
LeftLeftInputP58P7424
UpUpInputP54P9525
RightRightInputP36P5927
DownDownInputP41P6226



MegaWing Joystick

The Papilio Arcade Wing supports Atari 2600, Commodore 64, classic Arcade joystick, and any joystick that uses digital inputs. The board comes with a Male DB9 connector that allows an Atari 2600 joystick to be plugged in and used without any custom wiring. For a custom Arcade style joystick it is necessary to wire the joystick to a female DB9 connector using the diagram below. Each pin of the DB9 connector is protected by a current limiting resistor to provide compatibility with 5V powered joysticks.

Joystick A

NameFunctionDirectionDB9 PinPapilio One PinPapilio Pro PinArduino
UpUpInput1P5P12340
DownDownInput2P10P12642
LeftLeftInput3P11P12743
RightRightInput4P15P13245
Fire 2Fire 2Input5P17P13447
Fire 1Fire 1Input6P9P12441
5V5VInput7N/AN/A 
GNDGNDInput8P12P13144


Joystick B

NameFunctionDirectionDB9 PinPapilio One PinPapilio Pro PinArduino
UpUpInput1P34P5728
DownDownInput2P25P5030
LeftLeftInput3P22P4731
RightRightInput4P23P511
Fire 2Fire 2Input5P33P583
Fire 1Fire 1Input6P32P5529
5V5VInput7N/AN/A 
GNDGNDInput8P18P480



MegaWing LEDís

The Arcade MegaWing provides 4 LEDís for visual feedback of game status.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
LED1Player 1OutputP57P757
LED2Player 2OutputP53P676
LED3FlippedOutputP40P665
LED4OutputP35P614



MegaWing Keyboard and Mouse

The Papilio Arcade MegaWing has two PS/2 ports that can be used to connect a keyboard and mouse.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
PS/2 A CLKClockInputP92P11533
PS/2 A DataDataInputP91P11432
PS/2 B CLKClockInputP79P9313
PS/2 B DataDataInputP70P8814



MegaWing Reset Button

The Papilio One has a reset button that resets the game instead of the entire FPGA.

NameFunctionDirectionPapilio One PinPapilio Pro PinArduino
ResetResetInputP67P8511



Images

Papilio Arcade MegaWing

Click the images for full size hi-resolution views of the Papilio Arcade MegaWing.


Arcade MegaWing Schematic

Click the image to load a PDF version of the Arcade MegaWing Schematic

Assembly View

Click the image for a full size view of the boards part layout.


Retrieved from http://arcade.gadgetfactory.net/index.php?n=Main.ArcadeMegaWing
Page last modified on December 18, 2015, at 11:14 AM