12-Way Rotary Joystick Interface Program (for MAME etc)

The place for all discussion on gaming hardware
Post Reply
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

12-Way Rotary Joystick Interface Program. version 2.1

The aim of this encoder is to eliminate the need of a hardware encoder to translate the raw outputs of a mechanical rotary joystick into the clockwise and anti-clockwise turns as required by MAME.
The program sits in your taskbar and converts mechanical rotary joystick outputs to virtual joystick outputs using a virtual joystick (or, if you want, as keyboard presses but these won't be picked up by MAME).
Included also is a configuration tool that will hopefully make the process as easy as possible.

Image

Here's the program and documentation, zipped up.
Rotary Joystick Interface download link: https://drive.google.com/open?id=1cG9Lh ... gLxf7YtZt1

You will also need to install PPJoy. The installation and configuration of PPJoy is also covered in the guides.
PPJoy setup download link: https://drive.google.com/open?id=1sEcqm ... e9sewQkz2u

Image

I've added support for 2 rotary joysticks via a single virtual joystick device, but 1 will work fine too.
Wiring is the same as most (all?) hardware solutions, reducing 13 wires down to 4 (3 inputs and ground).
There is a wiring guide as well as a setup guide included in the documentation.


If you really like my program or it saves you from buying a hardware interface,
please right-click my program's icon in the system tray and hit "Donate" to bring you to my paypal page.
Buy me a virtual beer/pizza/whatever you think it's worth :)


This is largely to give me feedback and also some motivation to continue with bug fixes and updates.

Thanks to the author of PPJoy and someone called "Ninja Bob" whose DLL was used to help make this program.
Please report on your failures / successes / ideas and anything that may be useful for bug tracking or further development.

Plans for future versions:
- support VJoy as well as PPJoy (since PPJoy is unsigned and this can cause issues for Win7 users).
- allow low-level keyboard output so these too may be picked up by MAME (this seems to be very hard, so I'll probably never do it).
Last edited by DragonsTrap on Wed May 20, 2020 2:33 am, edited 7 times in total.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

I guess I jumped the gun of releasing before testing on MAME (actually, before my rotary joysticks arrived in the mail too ;)
It seems MAME uses RAW input, so the method I'm using isn't going to work.

It seems that this will likely only work if you compile your own MAME. You would need to use the DirectInput API by modifying a line in src\osd\windows\input.c to:
#define FORCE_DIRECTINPUT 1


damn.. if only things could be easier. Taking the download offline until I sort this out.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

After a long and painful play around, I just got joypad outputs working with MAME. And just had my first game of Midnight Resistance with a working rotary.
Setting everything up is a pain but I will fix this up before releasing. Sit tight, it won't be long.

In the mean time, check out my home-made USB rotary joystick ;)
Image
User avatar
undamned
Posts: 3273
Joined: Sat Jan 29, 2005 9:27 am
Location: Phoenix

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by undamned »

Excellent! :D
-ud
Righteous Super Hero / Righteous Love
User avatar
moh
Posts: 1619
Joined: Tue Oct 18, 2011 9:26 pm
Location: Canada

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by moh »

It's always great to see cool contributions to the gaming community like this :]
GaijinPunch wrote:Ketsui with suction cup.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

Release of version 2.1! - now working fine with MAME (via PPJoy) and 2 rotary joysticks supported.

First post has been updated. Please provide feedback / bug reports / suggestions. Thanks.
Last edited by DragonsTrap on Thu Dec 20, 2012 5:49 am, edited 2 times in total.
User avatar
Fudoh
Posts: 13044
Joined: Mon Mar 06, 2006 3:29 am
Location: Germany
Contact:

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by Fudoh »

That's pretty awesome! Thanks for the work!

Could you provide a parts list for that home-built USB rotary controller ? I definitely have to look into this. There are several games I wanted to play for ages.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

moh wrote:It's always great to see cool contributions to the gaming community like this :]
undamned wrote:Excellent! :D
Fudoh wrote:That's pretty awesome! Thanks for the work!
Thanks :)
Fudoh wrote:Could you provide a parts list for that home-built USB rotary controller ? I definitely have to look into this. There are several games I wanted to play for ages.
Thanks. When I get around to taking some photos I'll reply in this thread.
Parts for my joystick were:
- an old USB control pad PCB
- 2 microswitch arcade pushbuttons
- an SNK LS-30 joystick
- a hacked up Commodore 64 Keyboard connector cable to attach to the rotary inputs of the LS-30
- a plastic hobby box.
Last edited by DragonsTrap on Thu Dec 20, 2012 8:37 am, edited 1 time in total.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

Fudoh wrote:Could you provide a parts list for that home-built USB rotary controller ? I definitely have to look into this.
I made a post detailing the USB controller.
http://shmups.system11.org/viewtopic.ph ... 02#p861702
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

I received a private message asking about the ABS plastic enclosure that I used. I got mine from an ebay seller in the UK - the dimensions are 178mm * 122mm * 74mm.

From memory, I think all that I did to the case was to drill some holes in it (4 holes in the underside to attach suction cups and one small hole at the front for the cable).

I won't provide a link because it will become stale in no time, so instead - just have a quick worldwide search on ebay for: 178 122 74 ABS
and I'm sure you'll find it.
Stealthlurker
Posts: 324
Joined: Sun Nov 05, 2006 10:05 pm
Location: San Diego, CA USA

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by Stealthlurker »

That's awesome! I've wanted something like this for MAME for a looong time. Have you tried it out with Ikari Warriors and Victory Road yet? Great work! :mrgreen:



.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

Stealthlurker wrote:That's awesome! I've wanted something like this for MAME for a looong time. Have you tried it out with Ikari Warriors and Victory Road yet? Great work! :mrgreen:
Thanks :) I haven't played Victory Road before, but I've tested it out with Midnight Resistance and Ikari Warriors and it was fine. There's a value in the config file (which my configuration tool will create for you) that has an output duration field which is set to 120 by default. This value worked well for me but if there are any problems, you can manually change it and see if it works better on your machine.

Eventually I want to improve the program but I don't have the time right now. Let me know how it works for you.
User avatar
emphatic
Posts: 8030
Joined: Mon Aug 18, 2008 3:47 pm
Location: Alingsås, Sweden
Contact:

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by emphatic »

DragonsTrap wrote:In the mean time, check out my home-made USB rotary joystick ;)
https://dl.dropbox.com/u/68787224/usbrotaryjoystick.jpg
Could you explain a bit further how you interfaced the rotary boards to your padhack, please? I can see from the post in your other thread that you've merged every three wires and hooked them up to buttons which I understand are then mapped to rotary functions in MAME?
Image | My games - http://www.emphatic.se
RegalSin wrote:Street Fighters. We need to aviod them when we activate time accellerator.
DragonsTrap
Posts: 10
Joined: Tue Dec 04, 2012 1:55 am

Re: 12-Way Rotary Joystick Interface Program (for MAME etc)

Post by DragonsTrap »

emphatic wrote:
DragonsTrap wrote:In the mean time, check out my home-made USB rotary joystick ;)
https://dl.dropbox.com/u/68787224/usbrotaryjoystick.jpg
Could you explain a bit further how you interfaced the rotary boards to your padhack, please? I can see from the post in your other thread that you've merged every three wires and hooked them up to buttons which I understand are then mapped to rotary functions in MAME?
Sorry about the late reply (I don't come here often). If you download the zip file, I made a decent effort of explaining everything in quite a lot of detail.
The pad hack was essentially the same as making a regular arcade joystick pad-hack, with the only difference being that.. instead of having 12 individual inputs for the rotary positions, I merged every third one together so there were only 3.

These 3 inputs are then wired up to as though each was a regular button. So - at any given time the rotary must be in one of these positions and so one of the 'buttons' will always be closed.
For example, rotating the joystick, you would expect to see a button sequence of 1,2,3,1,2,3, etc.

What my program does is take these inputs and map them to a virtual joystick device, so that instead of raw button presses the virtual joystick instead sends out one button press for "clockwise" turns, and another for "anti clockwise"
This is the type of input that is required for mechanical rotary games when emulated in MAME.
Post Reply