The NEW Build Your Own Arcade Controls

Main => Main Forum => Topic started by: wrybread on May 09, 2002, 01:03:48 pm

Title: Useful way to hook up more buttons...
Post by: wrybread on May 09, 2002, 01:03:48 pm
I found a really great little program that'll let you easily hook up more buttons to your serial port, and have the buttons do interesting things like launch a program or turn Windows volume down or whatever.  They can also trigger ASCII strokes, even compound ASCII strokes like control-A.  It's really powerful and easy to make.

It's actually a winamp plugin, but has some features that go way beyond winamp.  Link:

http://diba.by.ru/comctrl/index.html

The idea is you can build a bunch of buttons that interface thru your serial port and interact with this plugin, which control Winamp really really well and thoroughly, but it can also do things like execute a program.  So that program could be a batch file that does things like launch your mame front-end or launch a specific game or whatever.  

Note that there's two versions of the button box: a 4-button one and one with up to 15 buttons.  The reason is interesting: as I understand it, the 9-pin serial port has 4 wires plus a common that handle input, and shorting that common to any of the 4 wires triggers that switch.  Hence 4 buttons are really easy to make.  If you want to make more than 4 buttons you need to use diodes (the plans are on the site and are very clear).  I made the 15-button version, actually I made 9 buttons of the 15 button version.

The program works flawlessly for me, but note that in Windows 2000 and probably XP, you need to shutdown the program before you can shutdown Windows.  It's a known bug, I've been emailing the programmer about it.

Note also that an old Atari joystick is 5 buttons (joystick 4 way plus a fire button) and would make a really great external button box to do extra things to Mame....

Anyway, hope someone finds this useful.

Title: Re: Useful way to hook up more buttons...
Post by: Mike on May 09, 2002, 01:34:11 pm
Problem you may have, Is it will only work depending on how the application you are trying to use it with handles keystrokes. For example mame doesn't like spoofed keystrokes ran from macros. I know this because i had originally built my mame box to be more of an entertainment box and hooked up a remote control that ran through the serial port. And no matter what software I used to control the remote with certain applications I always had problems. Mame was one of the major one's i had problems with. Winamp worked fine so did my PVR software. But alot of emulators had the problems. I think it has something to do with emulators actually scanning the keyboard at a more direct level than most applications.
Title: Re: Useful way to hook up more buttons...
Post by: wrybread on May 10, 2002, 01:32:25 am
Interesting.  Yeah I should say I havn't used Mame with the button box yet, since I don't have it attached to either of my Mame cabs.  And yeah I tried to get an IR bridge/remote control working with Mame and had the same problems you describe.  

Would still be nice on a Mame cab though, even if only to launch mame.  And you could have a few extra buttons specifically for Winamp... I wonder if there'd be some way to toggle a set of buttons between your Ipac or whatever and your serial port setup, so when you're playing Mame the buttons trigger the Ipac, but when you're out of Mame you flick some switch and now they control Winamp....







Title: Re: Useful way to hook up more buttons...
Post by: ErikRuud on May 10, 2002, 07:16:12 am
Check out MAMEGTX's cab, he has a relay setup to switch his player 2 controls over to the player 1 inputs on his IPac.  He did this for games like PacMan that do not have seperate controls for two players.

A similar thing could work for your button box idea.

Special Features of the MAMEGTX cabinet (http://mamegtx.fateback.com/features.htm)
Title: Re: Useful way to hook up more buttons...
Post by: RandyT on May 13, 2002, 07:04:46 am
I've been looking for something like this one for a while, but this seems a little more limiting than would be useful for full-fledged control panel control.

Happ used to sell, and maybe they still do, a serial interface for arcade controls.  The have a driver for it that will allow the interface to work with joysticks, buttons, spinners, trackballs, etc.

Tha biggest drawback is that it is expensive.

If some bright programmer could develop a freeware tool that could place keystrokes into the keyboard buffer based on what it saw coming through the serial port, it'd be a rather simple matter to build a control board with a microcontroller to talk to it.  Much simpler than trying to emulate a PS/2 keyboard, and the speed should still be sufficient to monitor a lot of controls.

Maybe the MAME team should put in a serial option :)

RandyT

Title: Re: Useful way to hook up more buttons...
Post by: planetjay on May 13, 2002, 04:47:01 pm
Parallel would be MUCH easier than serial.
Title: Re: Useful way to hook up more buttons...
Post by: RandyT on May 14, 2002, 07:24:02 am
Quote
Parallel would be MUCH easier than serial.


But not as practical.  With a serial connection, you only need to use 1 I/O pin on the microcontroller if you aren't concerned with handshaking or 2-way communication, but a maximum of 4 if you are.

I/O pins on a microcontroller are limited in number, and unless you want to go the matrix or multiplexed route, the more you have available to hook to your controls the better.

RandyT