Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: MameJunkie on September 08, 2005, 04:28:31 pm

Title: Rotary Button (Forgotten Worlds)
Post by: MameJunkie on September 08, 2005, 04:28:31 pm
I came across some rotary buttons that I was thinking of making a CP for games like Forgotten Worlds, Front Line...

Two part question with this post.

1 - What other games can you think of that uses a rotary push button?

2 - Harder...It has 5 pins.  2 are for the push button (easy, done)
But the other 3 are 1 gnd and 2 signal.  If you look at both signals at anytime, it can be in one of the 4 states in order...

[0,0] [0,1] [1,1] [1,0] back to [0,0]

Rotating one direction changes the signal one way and reversing changes the other way.
So if you are at [1,1]...right = [1,0] and left = [0,1]

How do I wire it up or make a circuit so that all I end up is one for going LEFT and one for going RIGHT?

Title: Re: Rotary Button (Forgotten Worlds)
Post by: armax on September 08, 2005, 06:33:43 pm
do you have pics?  I don't think I've ever seen one.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: MameJunkie on September 08, 2005, 06:45:15 pm
I'll post some pics when I get home tonight.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: MameJunkie on September 08, 2005, 09:32:27 pm
The left are the rotary buttons.
You can see 3 pins on one side (rotary) and 2 on the other side (button).

On the right, I also got a handful of small LED buttons that reminds me of the old Atari cone buttons (without the cones). 
Title: Re: Rotary Button (Forgotten Worlds)
Post by: NoOne=NBA= on September 08, 2005, 09:45:04 pm
Forgotten Worlds actually used a push-to-fire optical spinner, similar to the Oscar V2, IIRC.

Front Line used an 8-position rotary, similar in function to the Ikari sticks, that had push-to-fire.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: u_rebelscum on September 09, 2005, 02:21:30 pm
I came across some rotary buttons that I was thinking of making a CP for games like Forgotten Worlds, Front Line...

How do I wire it up or make a circuit so that all I end up is one for going LEFT and one for going RIGHT?

The easiest connection is with a mouse hack, or with any optipac-etc interface.  The quadrature output of your rotary is the same that the optical sensor + encoder wheel outputs.

This is fine for Forgotten Worlds, Ikari or Heavy Barrel in mame, or any other game that simulates the game's rotary with mame's "dial" type input.   :) 
Games like Front Line, where the original hardware had a 8-direction rotary, however, mame simulates that input with the 8-way joystick type; this means the above connection won't work with these games. :(

There are other ways to connect, but I don't know any enough to be sure that it would work like you asked. :-\  Here's a couple:

Anyway, I'd do the easy way, unless I just HAD to play front line.  Then I'd look into the hardware fix.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: MameJunkie on September 09, 2005, 03:53:22 pm
Thanks rebelscum...

Good info.  I didn't know they were the same.   I have a Mini I-Pac,  might try to hook it up to the trackball/spinner connectors.

The only thing is, the I-Pac diagram shows 4 pins (+5 volt, Gnd, X1, X2) but the buttons I have only have 3 pins (Gnd, P1, P2).  Any clue on how I should try hooking it up?
Title: Re: Rotary Button (Forgotten Worlds)
Post by: RayB on September 09, 2005, 05:50:25 pm
This is fine for Forgotten Worlds, Ikari or Heavy Barrel in mame, or any other game that simulates the game's rotary with mame's "dial" type input.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: Kremmit on September 10, 2005, 12:13:23 am
He's not saying Forgotten Worlds uses the same controller as Ikari- he's grouping them together because MAME uses the same input scheme for both.  Which is one of the things the MAMEdev's stubbornly don't fix, even though it's a total hack, and contrary to the stated spirit of the project.

Robin, are you ever going to have a look at fixing Ikari the same way you did for Time Soldiers?   ;) 
Title: Re: Rotary Button (Forgotten Worlds)
Post by: Silver on September 11, 2005, 08:04:38 pm
I used a  very simlilar looking rotary encoder (which is what I believe those items on the left are) to hack rotary ability onto a J-stick.

The output of the rotarys was described as "2-bit Gray encoded" - which is exactly what you describe (as confirmed by u_rebelscum).

They work perfectly with an optipac, which I'm pretty sure uses exactly the same electronics as a minipac, so they should work just fine.
Title: Re: Rotary Button (Forgotten Worlds)
Post by: u_rebelscum on September 12, 2005, 02:39:29 pm
The output of the rotarys was described as "2-bit Gray encoded" - which is exactly what you describe (as confirmed by u_rebelscum).

Can anyone in the know tell me the difference between "2-bit Gray encoded" and "quadrature" signals?  I thought they were the same, but some manufactures make a difference between the two.

AFAICT, they are the same except "2-bit Gray encoded" has steps ("detents", like the bumps in a scroll wheel) while "quadrature" doesn't have to be?  Which is sort of wierd since higher bit Gray code (example: 13-bit gray code) doesn't have detents?  It also looks like "quadrature" signals can be analog-ish, but usually they're square waves?  But square wave quadrature, at least, looks to fall in the "Gray Code" definition (but Gray code can be more than 2 bits).   
Title: Re: Rotary Button (Forgotten Worlds)
Post by: u_rebelscum on September 12, 2005, 02:51:31 pm
Good info.  I didn't know they were the same.   I have a Mini I-Pac,  might try to hook it up to the trackball/spinner connectors.

The only thing is, the I-Pac diagram shows 4 pins (+5 volt, Gnd, X1, X2) but the buttons I have only have 3 pins (Gnd, P1, P2).  Any clue on how I should try hooking it up?

Pretent the +5 volt is magically connected, and connect the others as usual.  The power is for the LED, and your mechanical rotary switch doesn't need the power.  It might act like an active low (or active high) input, though.  Try ipac's default, and if that doesn't work, try the other.


This is fine for Forgotten Worlds, Ikari or Heavy Barrel in mame, or any other game that simulates the game's rotary with mame's "dial" type input.   :) 

Stop including Forgotten Worlds with Ikari and those types. FW uses a spinner, not a rotary style device.

Like Kremmit said, but that's what happens when I skip a word.  :-[  Above sentence with missing word; notice the word "simulates" also, even before the missing word is added:

And Mame's "dial" input is a spinner, first and foremost, not a rotary device, so your correction should have been "Stop including Ikari & the like with FW; Ikari used a rotary device not a spinner" ;) 

Sorry for the mistyping.

FWIW, more details:
FW used a spinner button,
Ikari used a 12-direction rotary joystick
Caliber .50 used an optical rotary joystick (with 24 teeth/24 gaps)
-
Mame simulates all of these original hardware the same: as a "dial".  FW & Cal 50 physically detected rotation the same way as PC "dials" do.


Front Line used a 8 direction rotary switch
Mame simulates this original hardware as an 8-way joystick.

Xybots (or somename like that :) ) used a return-to-center left/right "rotary" switch.
Mame simulates this original hardware as two buttons.