Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Rotary Button (Forgotten Worlds)  (Read 5643 times)

0 Members and 1 Guest are viewing this topic.

MameJunkie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 427
  • Last login:March 19, 2009, 08:23:45 pm
  • Eeeeeeeevil
Rotary Button (Forgotten Worlds)
« 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?

Teamwork - A group of people running around doing what I say.

armax

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 451
  • Last login:July 12, 2017, 07:20:15 pm
  • Game Not Over
Re: Rotary Button (Forgotten Worlds)
« Reply #1 on: September 08, 2005, 06:33:43 pm »
do you have pics?  I don't think I've ever seen one.

MameJunkie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 427
  • Last login:March 19, 2009, 08:23:45 pm
  • Eeeeeeeevil
Re: Rotary Button (Forgotten Worlds)
« Reply #2 on: September 08, 2005, 06:45:15 pm »
I'll post some pics when I get home tonight.
Teamwork - A group of people running around doing what I say.

MameJunkie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 427
  • Last login:March 19, 2009, 08:23:45 pm
  • Eeeeeeeevil
Re: Rotary Button (Forgotten Worlds)
« Reply #3 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). 
Teamwork - A group of people running around doing what I say.

NoOne=NBA=

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2718
  • Last login:July 23, 2011, 08:59:16 am
  • Just Say No To Taito! -Nichibutsu
Re: Rotary Button (Forgotten Worlds)
« Reply #4 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.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Rotary Button (Forgotten Worlds)
« Reply #5 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:
  • A software solution is possible too.  Just hook the rotary's two outputs to two buttons, and have the software compare the current state with the last state, and translate as you said.  This could be done in a driver, in a wrapper, or inside mame.
  • There has to be IC chips that are designed to do what you want, I just don't know of any.  If they exist, you could connect that output to any two button/key inputs (Ipac, keywiz, gwiz, hack gamepad, etc)

Anyway, I'd do the easy way, unless I just HAD to play front line.  Then I'd look into the hardware fix.
Robin
Knowledge is Power

MameJunkie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 427
  • Last login:March 19, 2009, 08:23:45 pm
  • Eeeeeeeevil
Re: Rotary Button (Forgotten Worlds)
« Reply #6 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?
Teamwork - A group of people running around doing what I say.

RayB

  • I'm not wearing pants! HA!
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11279
  • Last login:July 10, 2025, 01:33:58 am
  • There's my post
    • RayB.com
Re: Rotary Button (Forgotten Worlds)
« Reply #7 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.
NO MORE!!

Kremmit

  • - AHOTW -
  • Wiki Contributor
  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3165
  • Last login:June 17, 2025, 04:07:55 pm
  • Who the heck is that?
Re: Rotary Button (Forgotten Worlds)
« Reply #8 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?   ;) 

Silver

  • Wiki Contributor
  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:April 16, 2025, 04:09:53 pm
  • Cunning like the Fox.
    • Mods'n'Mods
Re: Rotary Button (Forgotten Worlds)
« Reply #9 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.

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Rotary Button (Forgotten Worlds)
« Reply #10 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).   
Robin
Knowledge is Power

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Rotary Button (Forgotten Worlds)
« Reply #11 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:
  • This is fine for Forgotten Worlds, Ikari or Heavy Barrel in mame, or any other game that mame simulates the game's rotary with mame's "dial" type input.

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.
Robin
Knowledge is Power