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.


  • VGA Port - DB15 Female VGA connector capable of generating 4096 colors.
  • Stereo Audio Jack - 1/8" Stereo jack with low pass filter is ready for CD quality Delta-Sigma audio output.
  • Joystick Ports - Two DB9 Male joystick ports accept Atari, Commodore, and classic arcade joysticks.
  • PS/2 Ports - Two PS/2 ports accept a keyboard and mouse.
  • 4 Way Buttons - 4 buttons in a plus configuration for user input.
  • 4 LED's - 4 LED's for user feedback.
  • Reset Button - A single reset button.

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

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
Fire 2Fire 2Input5P17P13447
Fire 1Fire 1Input6P9P12441

Joystick B

NameFunctionDirectionDB9 PinPapilio One PinPapilio Pro PinArduino
Fire 2Fire 2Input5P33P583
Fire 1Fire 1Input6P32P5529

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

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


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.


Share |