Tuesday, August 18, 2015

Retro Challenge 2015/7: Post-Mortem and project notes...

Current Project State

For this Summer's Retro Challenge (2015/7), I worked on a small widget that lets you use an Amiga mouse, Atari ST mouse or Atari-style Joystick.  I was successful in building it and having it be manually configurable.  There's a shell based interface that you can use to select which input device and output style is used.

All of the code for this project as well as further and future documentation is available at the project's github repository.

There are a bunch of things that I did complete during the "challenge"...

  • Arduino Leonardo based firmware with simple direct connection to a single D9 male connector
  • Two versions of the hardware, one quick and dirty, the other optimized for the parts I had.
  • Designed to use minimal external parts - just the Arduino board and a D9.
  • Serial interface shell to configure which device it is
    • Amiga Mouse (fully tested)
    • Atari ST Mouse (fully tested)
    • Atari Digital Joystick (fully tested)
  • Serial interface to select which output the joystick provides
    • Mouse movements
    • WASD keypress input
    • Arrow Key keypress input
    • HJKL keypress input
    • etc.  (support for MAME, Stella, Vice, etc)
  • "Explorer" to experiment with input device auto detection algorithm (which does work)
  • Amiga 500 keyboard input header (incomplete)
  • Amiga 500 to Amiga 1000 keyboard adapter (to RJ-22 4P4C telephone handset jack)
  • Documented Amiga keyboard adaption 
  • Documented Amiga - Atari ST mouse differences
  • Documented other D9 joystick pinouts (and how they relate, etc)

There are two features that I did not complete before the end of the month...

First of all, I was unable to get the keyboard support working before the end of the month. I was having a hard time with it only to realize it was a power issue.  The keyboard was consuming more power than my widget could provide.  It will require a secondary power supply to give enough oomph to get it working.  I also was unable to read from it once I hacked in some power.

Secondly, I had designed an algorithm to autodetect between the three different supported input devices, but I was not able to integrate the code in before the end of the month.  At some point I'll mix it in, and it will switch the kind of device it will be based on analysis of the signals (and signal pairs) of data coming in when it detects "motion".

Next Steps

At this point, I'd like to take the codebase as it exists now, and change the program flow to do the auto-detection of the device type, and then do the "appropriate" thing with it.  "out of the box" it will just "do the right thing" when devices are plugged in. Namely:

  • Amiga mouse becomes USB HID Mouse
  • Atari ST mouse becomes USB HID Mouse
  • Atari Digital Joystick gets configured to send STELLA keypresses (arrow keys, etc)
I will implement this at some point, perhaps during the next Retro Challenge.

No comments:

Post a Comment