Arvid - homebrew arcade videocard

[ news & download page ]



Arvid is an open source and open hardware videocard with the main goal to produce perfect TV output for arcade games of the past emulated on modern PCs.

To achive it the video card has to be able to:

  • set exact screen refresh rates in the range of 50 - 61Hz
  • draw distinct pixels (no interpolation or pixel scaling) for the basic arcade resolutions: 320, 256, 288, 384 pixels horizontally. Vertical resolution has to always match the number of lines available for certain refresh rate. If total available video mode lines is greater than the game's resolution the game screen is positioned by user preferences (TV capabilities) and never scaled.
  • natively support scan lines via progressive video mode
  • use RGB inputs on SCART connectors (European TVs) to achieve best picture quality

    Futhermore, few extra non-arcade related goals were set:

  • the card has to be external so it can be used along with any computer or mini-pc
  • the card has to be easy to build
  • the card has to be affordable (less than $100 in total production costs)

    What is such a card good for? Can we simply use TV output from our standard PC video card? Or can we use HDMI to CVBS (TV) convertor? These questions are frequently asked. The answer depends whether you are happy with the output of the avaialble solutions. Many arcade fans are not because of several reasons, but the main one is the refresh rate of the TV output signal produced by the standard video cards, which is locked to either 50 or 60Hz. There is plenty of arcade games that use frame rates different than the standard rates. When such a game is displayed on a TV screen and especially if the game uses scrolling the animation of the scrolling judders and it spoils the game. Some people don't mind, some do. For those who want the best results without having an arcade cabinet in their living room Arvid may be the final solution as it doesn't need arcade monitor yet delivers perfect picture on standard European TV equipped with SCART connector. Note, the TV has to support RGB inputs which was quite common feature for the last 10 years or so these TV sets were produced.

    A video of Arvid video card prototype running the port of arvidmame emulator is here.

  • Technical stuff

    Arvid is based on Beaglebone mini computer - either Beaglebone Black (BBB) or Beaglebone Green (BBG) can be used. It employs the board's GPIO pins to output digital signals and then converts them to analog signals via digital-to-analog converters (DAC). The DACs are made of array of resistors to keep the cost and compexity down.
    Arvid outputs 5 signals in total:

  • 3 color components RGB (via 3 DACs, 5 bit each)
  • 1 composite sync (vsync and hsync mixed together, so called negative csync)
  • 1 signal to switch the TV to RGB mode

    Beaglebone (Black or Green) was selected as the base hardware for several reasons:

  • contains 2 embedded microcontrollers (PRU) which allow exact timing the video signal needs.
  • has a 100 MBit ethernet interface for communication with the host PC
  • has enough memory and horse-power to decompress video stream (loseless compression via zlib) in real time.
  • is reasonably priced (around $50 BBB, $39 BBG atm.)
  • there is a big hobby community around it with plenty of programming examples (that was quite important for me as I didn't have any previous experience with BBB and PRUs).

    An extra circuit with the DACs has to be build according the schematics listed bellow. The circuit is now in matured state and meets the goals I set for the project.

    The circuit is fairly simple and can be build without soldering just on a breadboard. The scart connector is connected to the breadboard either with soldered wires or via test hooks.

    Beaglebone and a PC running an emulator is connected through an ethernet cable. I prefer to use network crossover cable to minimize data transfer latencies (no switch or hub is involved). The Beanglebone runs a network server application that receives compressed screens from the emulator, then sends them to GPIO pins to produce TV signal. On the PC side the emulator has to suport Arvid by calling functions defined in arvid client library. The arvid library is simple and straightforward and emulator authors should have no trouble adapt their programs to use it. Arvid firmware (video mode drivers) and software (network server, arvidmame emulator) are ready, see download section for more info.

  • How to make your own Arvid video card

    ! Before you start please read this disclaimer!
    I'm not responsible for any damage caused directly or indirectly by Arvid or activities related and/or unrelated to its production or usage. You are doing so solely on your own risk. If you set your house on fire while soldering the circuit or if you damage your TV, don't blame me, I'm not responsible for any of that. If you don't agree with that, please stop reading and don't build it.

    The circuit schematics looks like this:

    Click to see bigger image.

    List of parts:

  • breadboard and connection wires. Or order your pcb here.
  • scart female connector (connection to TV via standard SCART cable)
  • resistors 10k ohm - 3x
  • resistors 4k7 ohm - 3x
  • resistors 2k2 ohm - 3x
  • resistors 1K05 ohm - 3x (yes, the 50 ohm makes a difference in color scale)
  • resistor 1K ohm - (alternatively you can use 1k05)
  • resistors 510 ohm - 3x
  • resistors 470 ohm - 2x
  • resistor 220 ohm
  • resistor 200 ohm
  • resistor 100 ohm
  • 74HC4066N (I used the NXP brand).

    if you use pcb, then you'll need few extras:

  • dual header 2.54mm 2x40 male pins to plug the pcb to BBB(G). 1 piece of 40 pin dual header should be fine.
  • optionally a 2x5 pin male shrouded header for connection to the SCART connector via ribbon cable
  • optionally standard 14 pin IC socket for 74HC4066N. It prevents accidental overheating of the IC during soldering.

    You can get most of the resistors in one bundled pack on eBay (look for '300PCS 30 Values 1/4W 1% Metal Film Resistors' for couple of dollars). The 1k05 resistors will have to be ordered separately though. Or alternatively you can connect 1k + 47 ohm resistors in series to get the desired value (the 47 ohm resistors should be in the bundle pack).

    The 4066 quad bilateral switch IC doesn't do anything related to video signal generation, but it fixes Beaglebone start-up issue by disconnecting pins 41,43 and 44 from the ground. It's a shame this Beaglebone quirk has not been fixed yet (it exists even on BBG) otherwise the circuit could be made just out of resistors. The pins are connected when the sync signal is on. If you plan to build the circuit on a breadboard use a chip in DIP package (DIP-14) such as 74HC4066N (the cost is about $1 on eBay)

    The Tate and Coin switches are optional, they make sense only if you plan to build-in Arvid into a cab or game console. Emulators and emulator frontends can use the TATE switch to set initial rotation of graphics on the screen. The coin button can be used (suprisingly) as a coin button to supplement missing 'Select' button on some older joysticks (like Sega Genesis Arcade joystick).

    Before you connect the circuit to BBB(G) doublecheck every wire and its connections. Also before you first connect the SCART to your TV set doublecheck the output voltage (using multimeter) while Arvide service screen is on. The voltage on the output lines should never be bigger than 1.5 volts on the RGB wires and the sync line. The RGB switch signal however should measure 3.3V on circuit that is not plugged to the TV set.

    If you've never build things like this before, just don't rush it. Take your time and tripple check every connection. The construction time is roughly around 4 hours (beginners), BBB setup can take another hour or two (again depending on experience).

  • How to set-up Beaglebone (BBB or BBG)

    The set-up is one time operation only. At first make sure you can login to BBB(G) via usb cable or serial cable. I use BBB revision C that I bought in q1 2015 and BBG first revision I bought in q3 2015. Both boards came with Debian linux preinstalled which is fine for the job.

    BBB specific:
    Runnig the steps from the terminal in X windows session will make the same job, but you will have to disable hdmi output (to allow Arvid to use GPIO pins the hdmi steals) later on so it's really better not to rely on hdmi and window-y environment in the first place.

    Steps are as follows:

    Download the code
    a) make sure BBB(G) is turned off and Arvid circuit is DISconnected
    b) power on BBB(G) and login
    c) ensure the board is connected to Internet and download arvid software to your home directory (username 'debian' )
    tar xvzf libarvid_bin.tgz

    Alternatively if your Beaglebone doesn't have Internet connection you can download the package on your PC, copy it to the usb stick and mount the usb stick on BBB(G) like this:
    mkdir -p usb
    sudo mount /dev/sda1 usb
    tar xvzf usb/libarvid_bin.tgz

    You should end up with a new directory called 'libarvid' in your home directory (/home/debian).

    Setting up booting and device tree
    d) copy arvid dtbo file to /lib/firmware like that:
    sudo cp ~/libarvid/extras/pru_arvid-00A0.dtbo /lib/firmware

    The next steps e) and f) are required only for BBB. If you use BBG please skip them to step g)
    e) backup your boot file before you disble hdmi in it:
    sudo cp /boot/uboot/uEnv.txt /boot/uboot/uEnv.txt.orig

    f) copy the boot file with disabled hdmi:
    sudo cp -f ~/libarvid/extras/uEnv.txt /boot/uboot/uEnv.txt

    Network config for cross-over ethernet cable
    g) backup network configuration
    sudo cp /etc/network/interfaces /etc/network/interfaces.orig

    h) set static ip-address to ethernet network card in the text editor
    sudo nano /etc/network/interfaces

    - find line with:
    iface eth0 inet dhcp

    - and change it to:
    iface eth0 inet static

    - make sure there is no hash ('#') at the beginnigng of the line

    - then add the following lines just bellow it:

    - find line with:
    #auto eth0

    - and remove the initial hash ('#') character. If you can not find the line then type it above the line containing 'iface eth0 inet static'.

    To save your modifications in nano editor press F2 and then confirm the save. From now on, you will lose internet connction on your BBB(G). To get back internet just rename the original file 'interfaces.orig' to 'interfaces' and reboot BBB.

    Modify linux startup sequence on BBB(G)
    i) this will ensure arvid-server is started during every reboot so the video card is ready for operation. Modify startup script:
    sudo nano /etc/rc.local

    - find line with:
    exit 0

    - put the following line BEFORE it (on a separate line, note the ampersand presence):

    To save your modifications press F2 and then confirm the save.

    Finish and restart BBB(G)
    j) synchronize filesystem

    k) plugin the cross-over ethernet cable to BBB(G) and your PC

    l) configure your ethernet network card on your PC to a static IP address. For example like this:

    m) press power button on BBB(G) to power down, wait till the LEDs go dark

    n) connect the Arvid circuit (keep the SCART cable DISconnected yet) and then press the power button on BBB(G) again to reboot.

    o) aprox. 25 seconds after the boot the Arvid service screen should appear showing the RGB color bars, geometry grid and the IP address of the ethernet network interface.

    p) ping to BBB(G) from your PC to make sure the connection is alive:

    q) if ping fails, restart the BBB(G) and try again. If ping still doesn't work double check steps h) and l).

    r) This step is very important! Don't skip it otherwise you might damage your TV set!
    Doublecheck the voltage on the scart wires is sane. Using multimeter the values, while Arvid is on the service screen, should be:

    Red : 0.49 V
    Green : 0.49 V
    Blue : 0.49 V
    Sync line : 0.95 V
    RGB switch signal : 3.36 V

    s) finally connect the SCART cable between Arvid and your TV

    Te service screen should look like this on your TV:

    t) now fire up arvidmame and enjoy jour new homebrew video card! :-)


    I've tested Arvid on various CRT TVs (6 different makers) and few LCD TVs. All CRT TV worked flawlessly - no tearing, progressive scan lines on.

    The results on LCD TVs however vary from not working at all (Panasonic, probably because of the non standard timing Arvid produces) to working but stuttering (the same way as on regular laptop screen) to working nicely (one old 13" UMC brand) which even displayed non standard refresh rates completely smoothly. None of the LCDs produced scan lines, they filled-in the space with duplicated pixels.

    I don't recommend to use Arvid on LCD TVs as the result will be disappointing. But if you still have a CRT TV around, or you are happy to get one, give it a go.


    Arvid software and hardware is licensed under MIT license.