USB2Vec User's Manual

The USB2Vec adaptor allows you to use many generic USB peripherals with a Vectrex console. It is primarily intended to allow Vectrex users to buy relatively cheap controllers as a substitute for the dwindling supply of original controllers as built in to the Vectrex, but it has other uses too, such as supporting track balls and computer mice – in fact, any USB input device that could be mapped to the Vectrex's four buttons and X,Y analog joystick.

The adaptor is a rather simple circuit board which is used in conjunction with a Raspberry Pi – a readily-available low cost single board computer. Most models of Raspberry Pi will be compatible. If you do not already own a Pi you will have to get one, but this project is really intended for the sort of hobbyist who already owns a Pi which they can repurpose for use with the Vectrex. Note that if you get a Pi Zero it must be the "Zero WH" version so that it comes with a header in place, otherwise you'll have a lot of work to add a header yourself. (You can find a pi by using https://rpilocator.com/ and sort by price. Shipping will be extra.) The adaptor was originally conceived as a 'DIY' board that you would build yourself using a breadboard, but if you are reading this page you have most likely built or bought a pre-made PCB version of the board, or maybe a packaged unit in an enclosure, or even a controller unit where this board is built-in internally. It's an open-source project and anyone is allowed to build, assemble, or even sell these adaptors.

Attach the hardware

It doesn't really matter whether you attach the USB2Vec board to your Pi now or after you have set up the software, as long as you do so with the Pi powered off. We might as well do so now:

The USB2Vec board attaches to the 40-pin header on your Pi in the obvious way. But please look closely so that you don't accidentally offset the socket to the pins in any direction - it's easy to be a row off when you connect them which could potentially damage either board.

There is a 9-pin "D-Sub" connector on the board which is how you attach it to the Vectrex – the cable to use is a "Sega Extender Cable" which will have a male 9-pin connector at one end and a female at the other. It is the female end which attaches to the Vectrex and the plug may have to be trimmed a little in order to fit - see this page and video for details of how to trim the plastic on one of these cables so that it fits better. It's really not difficult – lots of Vectrex users have made this modification over the years. The Sega cables cost between $6 and $10 in single unit quantities depending on how long you're willing to wait for shipping.

You can connect your USB joystick to the USB2Vec adaptor at any time – it does not have to be connected in advance - our 'plug & play' software will recognise it when it is attached. Note that the full-sized Raspberry Pi boards have standard full-sized USB-A sockets - but if you are using a Pi Zero with the adaptor, you'll also need a USB A to Micro-B cable for most devices (unless your device already uses the Micro-B standard.)

Set up the software

Now that your hardware is connected, you will need to install the default operating system on your Raspberry Pi. If you have a Windows computer, this is quite easy to do: go to the web page at https://www.raspberrypi.com/software/ and download and run the "Raspberry Pi Imager" utility. You will need an unused Micro SD card to install on to. Note that any previous data on the card will be lost.

Follow the instructions from the installer - you'll have to suggest a username and create a password. Once installed, log in to the Raspberryy Pi (Via the console, or over a WiFi SSH connection, or whichever way your hardware permits) and issue these commands at the Linux command-line:

        sudo apt install -y wget
        wget http://www.gtoal.com/src/joystick/setup.sh
        bash < setup.sh
      
This will install and start up the joystick software, and configure your Pi to start it automatically every time the Pi is powered up.

Adjusting the joystick position

A board supplied by someone else is likely to already be tuned and ready to use, but if you assembled the board yourself, you'll need to adjust the little blue variable resistors in order to center the joystick on 0,0 and to scale its response so that the full range of motion matches the coordinate system of the Vectrex. You can also increase sensitivity so that the full range of coordinates are available from smaller joystick movements. This procedure is best explained in an instructional video which we will supply soon.

Using the adaptor

Just plug in your USB controller and see what happens. If no joystick-like device is attached (or recognised), the controller will default to using any mouse that is attached. But as soon as a joystick is plugged in, the mouse will be disabled and the joystick used instead.

We have tested this adaptor with several joysticks and game controllers, both analogue and digital, as well as with touchpads and a USB track ball.

The default software simply makes the main X,Y input from any USB device look like a Vectrex analog joystick, and it will map up to four buttons on your device to the four Vectrex controller buttons.

If you have a loadable Vectrex cartridge, we can offer you a test program that will display the joystick position and button status: https://gtoal.com/vectrex/joystick/AnaJoyTest.bin.

Project roadmap

During the early testing phase of the USB2Vec adaptor, we will work with any user who has a non-standard peripheral to create a custom program for them to map their particular controller to the Vectrex. Currently our intention is to have specific programs for each type of device rather than having one all-encompassing program that works with multiple devices, because such programs require lots of options and selecting options from a game controller with no visual feedback is difficult – at any rate it would require that you consult a manual any time you wanted to use your Vectrex, which is far from ideal. We would rather the user did not need to make configuration changes; or if they did, would make them via the Linux command line. These intentions may change as we gain experience with the system. We do appreciate that some dynamic changes may be needed if a user wants different behaviour from their controller when playing different games. In those cases it may be necessary to enter commands to change mode from the controller itself - it will depend on whether users are willing to use the command line. Alternative strategies could include using a phone app to reconfigure the adaptor, or even having the Pi look for a Chromecast device to issue voice prompts!

Among the enhancements that we expect to come in light of feedback from users with more varied devices are features such as mapping a twist-grip to left and right 'rotate' buttons (I'm thinking of Asteroids here); or supporting auto-fire for shoot-em-up games, or using non-standard buttons or other input methods for specific games.

Also if your Raspberry Pi supports it (not all do, at least not without add-on hardware), the USB2Vec will also allow the use of Bluetooth wireless controllers, though if that is your primary interest I would recommend Brett Walach's "Vectorlink" adaptor instead which is specific for use with NES and SNES controllers, including the 8BitDo controllers with Bluetooth. We'll write more about our own Bluetooth and WiFi facility later.

Hardware Limitations

The Vectrex controller interface actually allows the buttons to be configured as outputs as well as the normal inputs. This hardware does not support that mode, which means that this device will not be able to emulate certain peripherals such as the VecLink cable that allows two Vectrexes to communicate with each other.

Credits and disclaimers

The USB2Vec circuit was designed by Graham Toal with input from members of the Vectrex Fans Unite! group on Facebook. The PCB was laid out by David Reid of Reid Circuits. Both the circuit and the associated software may be copied and used without restriction. The designers are not responsible for any damage to your board, your Vectrex, your Raspberry Pi or even your person that may occur in connection to using this device. It is entirely your responsibility to check the circuit and your construction of it for safety and for assembly errors. Don't expect anyone connected with this project to replace your Vectrex if you blow it up! Under no circumstances use this circuit in any medical context or where lives may be at risk or where failure could cause injury.

        Permission to use, copy, modify, and/or distribute this hardware and
        software for any purpose with or without fee is hereby granted.

        THE HARDWARE AND SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
        WARRANTIES WITH REGARD THERETO INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
        AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, DIRECT,
        INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
        LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
        OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
        PERFORMANCE OF THIS HARDWARE AND/OR SOFTWARE.
      

Contact the project leader by email at gtoal@gtoal.com