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: SNK Rotary joystick controller project  (Read 3332 times)

0 Members and 1 Guest are viewing this topic.

brooksware2000

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:April 20, 2004, 12:38:50 am
    • Hobbybotics.com
SNK Rotary joystick controller project
« on: March 19, 2004, 10:55:59 pm »
I am working on a rotary joystick encoder project that I will release to the boards for the Ikari warriors style rotary joystick. Functionality will be similar in function to the druins controller currently selling for $45. I am not expecting to make money off this project, just want to present it to the board if anyone is interested in helping out with the project. I will be using Microchip 16F628 chips because that is what I have lying around.

Hit me up if anyone is interested in working with me on this project. I am really close to a working prototype on paper, just need to start coding and tesing.

geekbrain

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:September 08, 2006, 11:02:20 pm
  • Electrical Engineers are Geeks!
Re:SNK Rotary joystick controller project
« Reply #1 on: March 20, 2004, 05:05:29 pm »
Brooksware2000

This was debated around Christmas.  A little bit of a pissing contest ensued.  I have written code for a PIC16F84 (because that's what I had laying around) for a friend.  Works with an IPAC and seems to catch all the keystrokes in something like Wordpad but jumpy in MAME32.  I can email if your interested.  I was going to share on the board as well but haven't done so until I figure jumpy problem out.

Geekbrain

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:SNK Rotary joystick controller project
« Reply #2 on: March 20, 2004, 05:21:01 pm »
Brooksware2000

This was debated around Christmas.  A little bit of a pissing contest ensued.  I have written code for a PIC16F84 (because that's what I had laying around) for a friend.  Works with an IPAC and seems to catch all the keystrokes in something like Wordpad but jumpy in MAME32.  I can email if your interested.  I was going to share on the board as well but haven't done so until I figure jumpy problem out.

Geekbrain
Jumpy Problem (My Guess) - The true SNK rotaries are set up so each click was one turn of the character (not sure if it was 30 or 45 degrees).  This is a pain to work with a keyboard or mouse, so MAME is set-up so that the character rotates from when the key is initially pressed until the key is released.

What this means is that rotating the stick slowly causes the switch to be closed too long, and the character over-rotates, and rotating the switch too quickly causes the character to under-rotate.

Mc-Escher and JerryJanis added code to make the rotary games a true one-increment per button press option.  Urebelscum added this into MAME Analog Plus.

Try your interface with MAME analog plus, and map the outputs from your interface to Button 4 and Button 5 in MAME analog plus instead of the DIAL inputs.

For example, MAME currently has DIAL set to something like Z and X on the default codeset.  Assuming you have you I-PAC and interface set so rotation is Z and X, go into the TAB menu in MAME analog Plus and set Dial to "NONE" (or some unused key) and set P1B4 to Z and P1B5 to X (P1B4 and P1B5 inputs will not be available in the official MAME version).
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

brooksware2000

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:April 20, 2004, 12:38:50 am
    • Hobbybotics.com
Re:SNK Rotary joystick controller project
« Reply #3 on: March 20, 2004, 09:36:55 pm »
Brooksware2000

This was debated around Christmas.  A little bit of a pissing contest ensued.  I have written code for a PIC16F84 (because that's what I had laying around) for a friend.  Works with an IPAC and seems to catch all the keystrokes in something like Wordpad but jumpy in MAME32.  I can email if your interested.  I was going to share on the board as well but haven't done so until I figure jumpy problem out.

Geekbrain
Jumpy Problem (My Guess) - The true SNK rotaries are set up so each click was one turn of the character (not sure if it was 30 or 45 degrees).  This is a pain to work with a keyboard or mouse, so MAME is set-up so that the character rotates from when the key is initially pressed until the key is released.

What this means is that rotating the stick slowly causes the switch to be closed too long, and the character over-rotates, and rotating the switch too quickly causes the character to under-rotate.

Mc-Escher and JerryJanis added code to make the rotary games a true one-increment per button press option.  Urebelscum added this into MAME Analog Plus.

Try your interface with MAME analog plus, and map the outputs from your interface to Button 4 and Button 5 in MAME analog plus instead of the DIAL inputs.

For example, MAME currently has DIAL set to something like Z and X on the default codeset.  Assuming you have you I-PAC and interface set so rotation is Z and X, go into the TAB menu in MAME analog Plus and set Dial to "NONE" (or some unused key) and set P1B4 to Z and P1B5 to X (P1B4 and P1B5 inputs will not be available in the official MAME version).

Yeah, send me what ya got and I'll take a look at it. I've gotten it to work pretty well using LED's to test the output but I am still refining things a bit. I'd love to take a look at what you have as well. email me at chbrooks@srt.com

brooksware2000

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:April 20, 2004, 12:38:50 am
    • Hobbybotics.com
Re:SNK Rotary joystick controller project
« Reply #4 on: March 20, 2004, 09:39:59 pm »
Brooksware2000

This was debated around Christmas.  A little bit of a pissing contest ensued.  I have written code for a PIC16F84 (because that's what I had laying around) for a friend.  Works with an IPAC and seems to catch all the keystrokes in something like Wordpad but jumpy in MAME32.  I can email if your interested.  I was going to share on the board as well but haven't done so until I figure jumpy problem out.

Geekbrain

That's great information, I have not tried analog mame yet so I will be testing with that as well. I figure that we can work on something that all can benefit from without it costing to much. Heck, I think I paid about $1.00 a piece for the pic chips.
Jumpy Problem (My Guess) - The true SNK rotaries are set up so each click was one turn of the character (not sure if it was 30 or 45 degrees).  This is a pain to work with a keyboard or mouse, so MAME is set-up so that the character rotates from when the key is initially pressed until the key is released.

What this means is that rotating the stick slowly causes the switch to be closed too long, and the character over-rotates, and rotating the switch too quickly causes the character to under-rotate.

Mc-Escher and JerryJanis added code to make the rotary games a true one-increment per button press option.  Urebelscum added this into MAME Analog Plus.

Try your interface with MAME analog plus, and map the outputs from your interface to Button 4 and Button 5 in MAME analog plus instead of the DIAL inputs.

For example, MAME currently has DIAL set to something like Z and X on the default codeset.  Assuming you have you I-PAC and interface set so rotation is Z and X, go into the TAB menu in MAME analog Plus and set Dial to "NONE" (or some unused key) and set P1B4 to Z and P1B5 to X (P1B4 and P1B5 inputs will not be available in the official MAME version).

Yeah, send me what ya got and I'll take a look at it. I've gotten it to work pretty well using LED's to test the output but I am still refining things a bit. I'd love to take a look at what you have as well. email me at chbrooks@srt.com


spidermonkey

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 850
  • Last login:October 01, 2023, 04:15:59 am
  • Bombjack junkie
Re:SNK Rotary joystick controller project
« Reply #5 on: March 21, 2004, 02:04:05 am »
Uh oh, does this over/under rotate problem occur with Druins interface as well ? I'm using MAME 32 and I picked up one of Druins interfaces a couple months ago but I haven't hooked it up yet. Am I going to have to use MAME Analog plus with Druins interface or will it work ok with MAME 32 ? The reason I ask is because I haven't figured out how to use regular MAME yet.  ::)
"Sinistar has bad breath"

knuttz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 136
  • Last login:February 14, 2017, 01:46:08 pm
  • ..................................................
Re:SNK Rotary joystick controller project
« Reply #6 on: March 21, 2004, 03:02:45 am »
Hey geekbrain would you mind sending your code my way also.  I have some friends that can help me program PICs at my school.  My email is matthewknotts@hotmail.com
"Look at all those hamburgers. You can't eat all those hamburgers you stupid fella, OH GEEZ!" "OH he's gonna do it! He's so rediculous."

menace

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2564
  • Last login:September 18, 2023, 10:57:06 am
Re:SNK Rotary joystick controller project
« Reply #7 on: March 21, 2004, 07:57:55 am »
its better to not post and be thought a fool, then to whip out your keyboard and remove all doubt...

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4946
  • Last login:July 31, 2022, 10:26:34 pm
Re:SNK Rotary joystick controller project
« Reply #8 on: March 21, 2004, 12:04:10 pm »
If you are going to do it... at least try to make it configurable to work with analog mame

it works SO MUCH better its amazing!  Time solders is fun with direct connects... and left-rights... but it sucks with trying to sime out how long each click should be....  Really sucks!

Anyway..  if Analog+ Mame worked with ikari warriors and a few others with direct connect.  I would recommend just making a special 24 key encoder of some nature and using that.  I only have one connected this way... and it was SO much nicer... that I gave up on using the regular way to do it..  Just waiting...


geekbrain

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:September 08, 2006, 11:02:20 pm
  • Electrical Engineers are Geeks!
Re:SNK Rotary joystick controller project
« Reply #9 on: March 21, 2004, 12:11:43 pm »
I'm glad to see someone read the old post rather than having to rehash anything.  Brooksware2000 and knuttz - I will email tomorrow - I have the code at work at the moment.  I have absolutely no problem sharing the hex file freely in the spirit of MAME.  I will share the assembly source as well with the provision that if you use it you give credit where credit is due - don't plagarize and say you created it.

And most importantly - DO NOT ask me to burn chips - there are all sorts of resources on the net for doing this.  I'm an electrical engineer and have learned several useful things from the MAME experience that I have been able to apply at work.  Use the opportunity to learn something!

Like I said in my first post of this thread - the PIC code I have works well with the IPAC using Wordpad - it catches every detent (360 dgrees/12 = 30 degrees BTW).  The problem appears to be with the MAME setup.  It also might have to do with IPAC connection or motherboard BIOS (keyboard frequency) - it's presently been used with keyboard interface instead of the USB.  Don't know if that matters.  Again I will openly share based on my above comments!

brooksware2000

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:April 20, 2004, 12:38:50 am
    • Hobbybotics.com
Re:SNK Rotary joystick controller project
« Reply #10 on: March 21, 2004, 12:19:17 pm »
I'm glad to see someone read the old post rather than having to rehash anything.  Brooksware2000 and knuttz - I will email tomorrow - I have the code at work at the moment.  I have absolutely no problem sharing the hex file freely in the spirit of MAME.  I will share the assembly source as well with the provision that if you use it you give credit where credit is due - don't plagarize and say you created it.

And most importantly - DO NOT ask me to burn chips - there are all sorts of resources on the net for doing this.  I'm an electrical engineer and have learned several useful things from the MAME experience that I have been able to apply at work.  Use the opportunity to learn something!

Like I said in my first post of this thread - the PIC code I have works well with the IPAC using Wordpad - it catches every detent (360 dgrees/12 = 30 degrees BTW).  The problem appears to be with the MAME setup.  It also might have to do with IPAC connection or motherboard BIOS (keyboard frequency) - it's presently been used with keyboard interface instead of the USB.  Don't know if that matters.  Again I will openly share based on my above comments!

No problem with that. I am a computer programmer myself and I spend so much time writing code for someone else I don't get enough time to do it for myself. I want this to be a free-for-all project. I think that we can all benefit if we work together on this. It sucks for someone to borrow from someone else without giving credit were credit is due. All the code that comes from this will be posted here for others to use/modify (with the consent of those whose portions of code may be included). If not for anything else but as a learning experience for others.

The Mame project itself is free so we can work to expand it even further with such projects as this.

Thanks to all ahead of time that are interested in this and want to help out.

knuttz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 136
  • Last login:February 14, 2017, 01:46:08 pm
  • ..................................................
Re:SNK Rotary joystick controller project
« Reply #11 on: March 22, 2004, 01:47:03 am »
I'm glad to see someone read the old post rather than having to rehash anything.  Brooksware2000 and knuttz - I will email tomorrow - I have the code at work at the moment.  I have absolutely no problem sharing the hex file freely in the spirit of MAME.  I will share the assembly source as well with the provision that if you use it you give credit where credit is due - don't plagarize and say you created it.

And most importantly - DO NOT ask me to burn chips - there are all sorts of resources on the net for doing this.  I'm an electrical engineer and have learned several useful things from the MAME experience that I have been able to apply at work.  Use the opportunity to learn something!

Like I said in my first post of this thread - the PIC code I have works well with the IPAC using Wordpad - it catches every detent (360 dgrees/12 = 30 degrees BTW).  The problem appears to be with the MAME setup.  It also might have to do with IPAC connection or motherboard BIOS (keyboard frequency) - it's presently been used with keyboard interface instead of the USB.  Don't know if that matters.  Again I will openly share based on my above comments!

Thank you so much.  I am very excited with this project and learning how to burn/possibly program PICs.  Also don't worry, I would never try to take credit for your work or anyone else's.  Thanks again.

Matthew
"Look at all those hamburgers. You can't eat all those hamburgers you stupid fella, OH GEEZ!" "OH he's gonna do it! He's so rediculous."

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:SNK Rotary joystick controller project
« Reply #12 on: March 22, 2004, 08:04:06 am »
Uh oh, does this over/under rotate problem occur with Druins interface as well ? I'm using MAME 32 and I picked up one of Druins interfaces a couple months ago but I haven't hooked it up yet. Am I going to have to use MAME Analog plus with Druins interface or will it work ok with MAME 32 ? The reason I ask is because I haven't figured out how to use regular MAME yet.  ::)
It occurs with Druin's interface.  Specifically, I only KNOW of it occuring with Druin's interface and a custom non-interfaced rotary I was working on (with help) a long time ago.  I assume it would be a problem with these other interfaces as well.

You don't HAVE to use MAME Analog Plus with it, but otherwise you'll have to tweak the analog settings for each game, and while you can get pretty good results, it won't be perfect.

If you want to stay with MAME32, the analog plus changes have been added to NoNAMEMAME and NNM has a mame32 build - https://sourceforge.net/project/showfiles.php?group_id=91067&package_id=95932

And you can contact me if you want to migrate to command line MAME.
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

rdagger

Re:SNK Rotary joystick controller project
« Reply #13 on: March 22, 2004, 08:56:19 pm »
Here's that other thread in case anyone was interested
http://www.arcadecontrols.org/yabbse/index.php?board=1;action=display;threadid=14166

I had very good luck building my own rotary interface.
Here are the schematics and pics:

Rotary Interface
« Last Edit: September 02, 2006, 01:22:11 pm by rdagger »

brooksware2000

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 21
  • Last login:April 20, 2004, 12:38:50 am
    • Hobbybotics.com
Re:SNK Rotary joystick controller project
« Reply #14 on: March 23, 2004, 12:03:04 am »
Here's that other thread in case anyone was interested
http://www.arcadecontrols.org/yabbse/index.php?board=1;action=display;threadid=14166

I had very good luck building my own rotary interface.
Here are the schematics and pics:

http://69.33.42.246/Arcade/ri.aspx

How did you overcome the debounce problem with the contacts on the joystick sending false signals as they slid across the terminals. I have yet to come across a solid way of dealing with this issue

b3atmania

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 209
  • Last login:November 25, 2005, 09:48:57 am
Re:SNK Rotary joystick controller project
« Reply #15 on: March 23, 2004, 07:44:08 am »
I would like to gauge interest in bulk buying LS-30 rotary joysticks and saving us all some cash. I reckon most people want at least two. I am probably not the best person to arrange this, as I am located in Europe where supplies of this particular item are non-existant. Better would be someone in the US or Asia to source a good deal (with VideoConnect perhaps?) .

Any interest in this? Anyone willing to pick up on this?

jcoleman

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 373
  • Last login:April 23, 2024, 09:05:19 pm
  • RTFM
Re:SNK Rotary joystick controller project
« Reply #16 on: March 23, 2004, 09:44:53 am »
When I bought my two LS-30s from Video Connection (about a year ago), the operator told me that they had just one case left.  They could very well have been lying, or just making an excuse for why the sticks were $30 each, but think about it...there is ONE place that we know of online to buy them.  Supposedly they are out of production, which doesn't surprise me.  I think you'll be hard pressed to find these at a discount, or in any large quantities at all, for that matter.  Sorry to burst your bubble.  :)

Coleman

WonderMellon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:February 10, 2019, 12:41:23 am
  • I want my own arcade controls!
Re:SNK Rotary joystick controller project
« Reply #17 on: March 23, 2004, 12:36:01 pm »
When I bought my two LS-30s from Video Connection (about a year ago), the operator told me that they had just one case left.  They could very well have been lying, or just making an excuse for why the sticks were $30 each, but think about it...there is ONE place that we know of online to buy them.  Supposedly they are out of production, which doesn't surprise me.  I think you'll be hard pressed to find these at a discount, or in any large quantities at all, for that matter.  Sorry to burst your bubble.  :)

Coleman

Coleman,
  I think you are correct about this.  I can't believe I didn't pick these up when they were $30.  The first time I ran across them they were still $15.  The cost of being a procrastinator I suppose.  

There are several people putting effort into creating an interface for these.  Is there any possibility for taking a standard 8 way and making it a rotary?  It sounds like there may be some interest for it if it can be done.

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:SNK Rotary joystick controller project
« Reply #18 on: March 23, 2004, 12:57:26 pm »
When I bought my two LS-30s from Video Connection (about a year ago), the operator told me that they had just one case left.  They could very well have been lying, or just making an excuse for why the sticks were $30 each, but think about it...there is ONE place that we know of online to buy them.  Supposedly they are out of production, which doesn't surprise me.  I think you'll be hard pressed to find these at a discount, or in any large quantities at all, for that matter.  Sorry to burst your bubble.  :)

Coleman

Coleman,
  I think you are correct about this.  I can't believe I didn't pick these up when they were $30.  The first time I ran across them they were still $15.  The cost of being a procrastinator I suppose.  

There are several people putting effort into creating an interface for these.  Is there any possibility for taking a standard 8 way and making it a rotary?  It sounds like there may be some interest for it if it can be done.

I have an on-again/off-again project to add a couple of switches and an actuator to a standard joystick and have a mechanical rotary that doesn't need an interface.

It's more off-again now though . . .
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

mp2526

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:August 11, 2023, 02:30:47 pm
    • Miavio
Re:SNK Rotary joystick controller project
« Reply #19 on: March 23, 2004, 02:16:37 pm »
Is there any possibility for taking a standard 8 way and making it a rotary?  It sounds like there may be some interest for it if it can be done.


You mean like this?

http://www.happcontrols.com/joysticks/rotary_optical_joy_e.htm


WonderMellon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 65
  • Last login:February 10, 2019, 12:41:23 am
  • I want my own arcade controls!
Re:SNK Rotary joystick controller project
« Reply #20 on: March 24, 2004, 02:24:17 pm »
Is there any possibility for taking a standard 8 way and making it a rotary?  It sounds like there may be some interest for it if it can be done.


You mean like this?

http://www.happcontrols.com/joysticks/rotary_optical_joy_e.htm


I don't think so.  I believe that one is optical and not mechanical.  So it operates more like a mouse than a switch.  It also looks like it has a stop on it to prevent it from 360 degree rotation.  


« Last Edit: March 24, 2004, 02:25:10 pm by WonderMellon »

mp2526

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:August 11, 2023, 02:30:47 pm
    • Miavio
Re:SNK Rotary joystick controller project
« Reply #21 on: March 24, 2004, 02:27:22 pm »


I don't think so.  I believe that one is optical and not mechanical.  So it operates more like a mouse than a switch.  It also looks like it has a stop on it to prevent it from 360 degree rotation.  




Take a look again.  It comes in two flavors.  One is optical and one is mechanical.  It may be easier to tell that on the main page here:

http://www.happcontrols.com/joysticks/rotary&optical_joy.htm

Edit:  Oh, and that stop you see is not for stopping the switch from turning 360, but rather to keep the switch body from rotating when you rotate the joy shaft which is attached to the switch shaft.
« Last Edit: March 24, 2004, 02:29:41 pm by mp2526 »