ALAN-1 Atari Star Wars Yoke Controller USB

Adapter Instructions

Document REV 0.1

© 2019 Wicker Corp.

https://docs.google.com/document/d/1UIoL44w1lk3sBH97sXTpayk0Q0N-oI4z7Wq0wFec_l0/edit?usp=sharing


Contents

Getting Started:        3

Plugging it in:        3

Installation:        3

Setting up MAME:        3

Getting Mame to recognise the controller        3

The Deadzone:        5

Joystick Saturation:        7

Debugging        8

Windows        8

Linux        9

OS-X        9

Firmware Updates:        9

Updating on Windows:        9

Updating on OS-X and Linux:        16

Installing dfu-util        16

Updating the firmware        16

Firmware Change Log        18

Hardware Change Log        18

Document Change Log        18


Getting Started:

Plugging it in:

The Alan-1 USB Yoke requires a micro USB adapter to connect to a computer. In addition to this it also requires a MLX cable extender to plug the Yoke in.

The Alan-1 USB Yoke doesn’t require any drivers to work and should work “out of the box” with just a few small adjustments required in MAME. On each power up, the Yoke Controller enters the calibration state, which typically results in the controller acting erratically, moving the yoke in all 4 maximum directions calibrates the controller.

Installation:

The Alan-1 USB Yoke controller has 4 mounting holes suitable for either M3 or #4 sized screws. If you are installing this on a metallic surface, please ensure that there is an adequate distance from the PCB to the mounting surface by using thick washers or spacers, failing to do this may short out the contacts on the back of the board and break the controller.

Setting up MAME:

http://mamedev.org/

Getting Mame to recognise the controller

First we need to make sure that MAME has joystick inputs enabled. This is on the same page as the deadzone which is shown below. Make sure that “Joystick” under “Input controls” is set to on.

Then we will need to map the joystick. Start the game you wish to use with the USB Controller. Once its up and running, press “Tab” on your keyboard. Which should bring up the menu below.

Click on “Input (this Machine)”.

The buttons we need to set up are;

  • P1 Button 1
  • P1 Button 2
  • P1 Button 3
  • P1 Button 4
  • AD Stick X Analog
  • AD Stick Y Analog

Double click on what you need to configure, then press the corresponding button on the Yoke. For the AD Stick Analog, move the Yoke.

The Deadzone:

The original MAME settings aren't ideal for the yoke. The "dead zone" (range of motion that doesn't register as movement) is way too high. I ended up setting mine to zero, but anything closer to zero will be much better than the original settings. In addition to the deadzone in MAME, Linux by default also adds in a deadzone, this is currently being looked into.

Joystick Saturation:

Just below the deadzone setting there is a setting called “Joystick saturation”. This setting limits the range of the joystick. Default this is at 0.85 meaning that 85% of the joysticks range is being recognised by Mame, I havn’t had a chance to play around with this value yet.

The Joystick should now be ready to go!


Debugging

Windows

Windows has a built in program which will allow you to view the button presses and raw values on the axis found in the control panel under “Setup game controllers”


Linux

Install Jstest-gtk which can be installed through your package manager

“Apt install jstest-gtk”

If the controller doesn’t show up, click “Refresh”.

Click on “Properties” to view the data.

 

OS-X

The only app I could find is this one here on CNET. I do apologize, please make sure you have ad-block enabled when viewing the site. I have personally tested it and it does the job.

https://download.cnet.com/Joystick-and-Gamepad-Tester/3000-18490_4-48273.html

Firmware Updates:

Updating on Windows:

First we will need install a package from STMicroelectronics (The manufacturer of the microcontroller) called dFuse. You could also use “dfu-util” and follow the same steps below in the OS-X and Linux section, but I have not tested this for Windows.

dFuse 

Enter in a name, last name and most importantly your email address as they will be emailing you a link. Accept their terms and conditions and make sure “I would like to stay up to date…” is unchecked unless you would like to stay up to date with them.

Click “yes”

We will now need to put the yoke controller into bootloader mode. Unplug the usb, hold down the “prog” button and plug back in the board. Keep holding the button for around a second after you have plugged it in. No leds should be illuminated on the board. If all has gone to plan Dfuse should have recognised the device.

In the “Actions” section select the “Internal Flash”.

Click “Choose” in the “Upgrade or Verify Action” section.

Tick the “Verify download” checkbox for good measures.

Select the firmware file for the Alan-1 USB Yoke controller and then click “Upgrade”.

Once it is all complete you can unplug the Yoke controller and plug it back in, and you should be back into joystick mode.


Updating on OS-X and Linux:

Installing dfu-util

Both OS-X and Linux will require a command line utility called “dfu-util”.

http://dfu-util.sourceforge.net/

For Debian distro’s this can be done through “apt” or “apt-get” package managers.

For example: “apt install dfu-util”.

Since OS-X doesn’t have a package manager the best way to install “dfu-util” is through “Homebrew”

https://brew.sh/

Once Homebrew is installed you can execute “brew install dfu-util” which will install the package.

Updating the firmware

Check to ensure that “dfu-util” was installed correctly by executing “dfu-util” in the terminal. You should get a similar output to what is below.

 We will now need to put the yoke controller into bootloader mode. Unplug the usb, hold down the “prog” button and plug back in the board. Keep holding the button for around a second after you have plugged it in. No leds should be illuminated on the board.

Execute

 “dfu-util -a 0 -D /path/to/dfuse-image.dfu”

Where “/path/to/dfuse-image.dfu” is the path to where the firmware file is located.                                  


Firmware Change Log

REV/Date

Changes

1.0  Feb 28, 2019

Removed filtering that caused issues in certain MAME builds.  Cleaned up code that was causing unnecessary noise.

0.3 - 4June2018

8-bit axis values changed to 16-bit

USB Descriptor update to accommodate 16-bit values
Adjusted auto calibration range
Changed ADC averaging

0.2

Fixed USB Descriptor to work on Windows

0.1

Initial Code

Hardware Change Log

REV/Date

Changes

REV C

Added firmware update capabilities

REV B

Initial Board

Document Change Log

REV/Date

Changes

0.1

Initial document