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.

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.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| Red 0 | Red Bit 0 | Output | P98 | P118 | 36 |
| Red 1 | Red Bit 1 | Output | P2 | P119 | 37 |
| Red 2 | Red Bit 2 | Output | P3 | P120 | 38 |
| Red 3 | Red Bit 3 | Output | P4 | P121 | 39 |
| Green 0 | Green Bit 0 | Output | P68 | P84 | 20 |
| Green 1 | Green Bit 1 | Output | P66 | P82 | 21 |
| Green 2 | Green Bit 2 | Output | P63 | P80 | 22 |
| Green 3 | Green Bit 3 | Output | P61 | P78 | 23 |
| Blue 0 | Blue Bit 0 | Output | P85 | P99 | 16 |
| Blue 1 | Blue Bit 1 | Output | P83 | P97 | 17 |
| Blue 2 | Blue Bit 2 | Output | P78 | P92 | 18 |
| Blue 3 | Blue Bit 3 | Output | P71 | P87 | 19 |
| HSync | Horizontal Sync | Output | P95 | P117 | 35 |
| VSynch | Vertical Sync | Output | P94 | P116 | 34 |
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.


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.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| Audio- | Audio Left | Output | P84 | P98 | 14 |
| Audio+ | Audio Right | Output | P86 | P100 | 15 |

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.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| Left | Left | Input | P58 | P74 | 24 |
| Up | Up | Input | P54 | P95 | 25 |
| Right | Right | Input | P36 | P59 | 27 |
| Down | Down | Input | P41 | P62 | 26 |


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
| Name | Function | Direction | DB9 Pin | Papilio One Pin | Papilio Pro Pin | Arduino |
| Up | Up | Input | 1 | P5 | P123 | 40 |
| Down | Down | Input | 2 | P10 | P126 | 42 |
| Left | Left | Input | 3 | P11 | P127 | 43 |
| Right | Right | Input | 4 | P15 | P132 | 45 |
| Fire 2 | Fire 2 | Input | 5 | P17 | P134 | 47 |
| Fire 1 | Fire 1 | Input | 6 | P9 | P124 | 41 |
| 5V | 5V | Input | 7 | N/A | N/A | |
| GND | GND | Input | 8 | P12 | P131 | 44 |
Joystick B
| Name | Function | Direction | DB9 Pin | Papilio One Pin | Papilio Pro Pin | Arduino |
| Up | Up | Input | 1 | P34 | P57 | 28 |
| Down | Down | Input | 2 | P25 | P50 | 30 |
| Left | Left | Input | 3 | P22 | P47 | 31 |
| Right | Right | Input | 4 | P23 | P51 | 1 |
| Fire 2 | Fire 2 | Input | 5 | P33 | P58 | 3 |
| Fire 1 | Fire 1 | Input | 6 | P32 | P55 | 29 |
| 5V | 5V | Input | 7 | N/A | N/A | |
| GND | GND | Input | 8 | P18 | P48 | 0 |


The Arcade MegaWing provides 4 LED’s for visual feedback of game status.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| LED1 | Player 1 | Output | P57 | P75 | 7 |
| LED2 | Player 2 | Output | P53 | P67 | 6 |
| LED3 | Flipped | Output | P40 | P66 | 5 |
| LED4 | Output | P35 | P61 | 4 | |


The Papilio Arcade MegaWing has two PS/2 ports that can be used to connect a keyboard and mouse.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| PS/2 A CLK | Clock | Output | P92 | P115 | 33 |
| PS/2 A Data | Data | Input | P91 | P114 | 32 |
| PS/2 B CLK | Clock | Output | P79 | P93 | 13 |
| PS/2 B Data | Data | Input | P70 | P88 | 14 |


The Papilio One has a reset button that resets the game instead of the entire FPGA.
| Name | Function | Direction | Papilio One Pin | Papilio Pro Pin | Arduino |
| Reset | Reset | Input | P67 | P85 | 11 |
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.