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: Anyone made a auto 4way/8way switching joystick?  (Read 35593 times)

0 Members and 2 Guests are viewing this topic.

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Anyone made a auto 4way/8way switching joystick?
« on: August 08, 2010, 05:43:05 pm »
I thought about this today, to implement on my new cab. I figured it couldn't be too hard to do. From the software side, it's easy to execute a script before entering the game to check what should be the correct setting. From the hardware side I think it should be simple too, but would like to see what others think.

I didn't investigate much and I've been away from building anything hardware related for some time. Thoughts:

1. I was thinking a  standard servo should do OK to turn the 4way/8way plate 90°. And on the other hand, I see that using the joystick hardly produces any force upon the plate, even if it's loose (not locked by screws) it won't turn when used. So it shouldn't be a problem for any servo to keep the plate in place.

2. I need to find the way to use the servo with the computer easily. Maybe an IPAC with the led outputs and some electronics should do. I still have to investigate.


What do you think?, I'd like to hear ideas.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #1 on: August 08, 2010, 06:15:28 pm »
For the cost of doing what you're thinking, why not just go with a U360?

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #2 on: August 08, 2010, 06:35:23 pm »
For the cost of doing what you're thinking, why not just go with a U360?

Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them.  But a servo is mucho bucks, and there are easier (and cheaper) ways to flip restrictor plates into one of two positions.
 
I've thought about it, but not prototyped the idea yet, well at least not the "auto" part ;).

RandyT


ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #3 on: August 08, 2010, 06:42:34 pm »
hmm, I don't know exactly how that stick works. I see from the description that it has 2way, 4way, 8way, etc modes, but I don't get if this restricts the movements or just the input detection, as it also says it comes with restriction plates to physically restrict movements.

What I'm looking for is the true feeling of a 4way joystick on games that require it or where it's convenient (like Tetris The grand master 2). Can the U360 provide that? (without the physical restriction plates)

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #4 on: August 08, 2010, 06:49:58 pm »
For the cost of doing what you're thinking, why not just go with a U360?

Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them.  But a servo is mucho bucks, and there are easier (and cheaper) ways to flip restrictor plates into one of two positions.
 
I've thought about it, but not prototyped the idea yet, well at least not the "auto" part ;).

RandyT



Our messages crossed. That's what I though...

So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"?  ;)

As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #5 on: August 08, 2010, 06:54:53 pm »
So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"?  ;)

As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.

Well, some hardware is going to be a necessity regardless, but think about geared motors / solenoids and limit switches.  The LED-Wiz will likely be able to drive just about any reasonable hardware approach that can twist the restrictor...a relay might be necessary though.  Existing software might even handle it as well.

RandyT
« Last Edit: August 08, 2010, 07:00:20 pm by RandyT »

Epyx

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1961
  • Last login:December 25, 2023, 07:56:36 pm
  • "You're an oddity"
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #6 on: August 08, 2010, 06:58:04 pm »
Auto would be great. If the Mag stick were  a better 8-way, it's solution would be fine but for now I don't mind my Sanwa JLW and bottom rotating restrictor...it does a great 8 way and a great 4 way. All I do is open the coin door and reach up and rotate.  Really only for Robotron or Crazy Climber type games the rest of the time the left stick is perma 8 way and right is set to 4 way. 
Last Project



Epyx Tutorials:
Tutorials

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #7 on: August 08, 2010, 07:28:25 pm »
I think it would be an awesome project.  For proof of concept if nothing else.

On the software end, the issue might be keeping track of which position it's already in and communicating that to the LEDwiz.

If you're using a motor to spin the plate one way or the other and it has stops in each direction, it probably wouldn't hurt anything for the motor to just pulse toward the direction that it's already in.  Kinda sloppy, but you really wouldn't have to do anything on the software side except for setting up the LEDwiz.
I wouldn't sell it to someone else, but I'd use it.

A small throw actuator would probably be the most reliable.   Mounted between the joysticks, it could rotate both restrictor plates.

 :angry: I have too many things started already.  I have more than one machinist friend and wouldn't mind getting in on this.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #8 on: August 08, 2010, 07:36:35 pm »
Hmmm.....wonder what the stroke is on this thing?
http://cgi.ebay.com/Lego-Technic-Mindstorm-Electric-Linear-Actuator-9-VOLT-/400142027450?pt=LH_DefaultDomain_0

There are always door locks actuators, but those things draw a lot of current.
« Last Edit: August 08, 2010, 07:39:01 pm by BadMouth »

Xiaou2

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4134
  • Last login:June 11, 2025, 11:55:17 pm
  • NOM NOM NOM
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #9 on: August 08, 2010, 07:52:21 pm »
Quote
Robotron

 Robotron is Not a 4 way joystick game.   

 It uses two  8-way  Wico Balltop leaf-switch Joysticks.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #10 on: August 08, 2010, 09:29:46 pm »
For the cost of doing what you're thinking, why not just go with a U360?

Because a U360 is not a true "physical restriction switching joystick" and that's why some folks are still plopping down restricted 4-ways next to them.

Yeah, though highly playable with the U360, I still want 4-way physical restriction, which is why I ordered one of your snazzy new 4-way sticks. ;D

(Though it's mostly just to test out for a future 4-way vertical cab...)

Turnarcades

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1973
  • Last login:May 13, 2017, 08:14:29 am
  • Craig @ Turnarcades
    • Turnarcades
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #11 on: August 08, 2010, 09:33:26 pm »
The mag-stick plus is switchable from above the panel using a fairly simple mech so maybe you can borrow from it's design to modify another stick?

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #12 on: August 08, 2010, 09:46:03 pm »
So, anything specific on the "easier (and cheaper) ways to flip restrictor plates into one of two positions"?  ;)

As I said, although I'm an electronic engineer, I'm not very close to the hardware side of things any more.

Well, some hardware is going to be a necessity regardless, but think about geared motors / solenoids and limit switches.  The LED-Wiz will likely be able to drive just about any reasonable hardware approach that can twist the restrictor...a relay might be necessary though.  Existing software might even handle it as well.

RandyT

Looking around and I found this (Linux) software I'd like to try http://sampo.kapsi.fi/ledcontrol/, it doesn't seem to have enough resolution to directly use to control a servo, but maybe it could do. If that's not the case, I guess you could control a 555 circuit to output two different signals for each of the required servo positions with a keyboard led, could use Scroll lock led on the on and off position for example.

As for the servo, I found some cheap ones for around 5USD, and since this doesn't require any high torque or anything, I think it might be worth the try.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #13 on: August 09, 2010, 01:43:31 pm »
On the software end, the issue might be keeping track of which position it's already in and communicating that to the LEDwiz.

Actually, if it's wired right, with limit switches, you don't care what position it's in.  You just tell it to move to the desired position and it either needs to go there or it doesn't.

RandyT

Epyx

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1961
  • Last login:December 25, 2023, 07:56:36 pm
  • "You're an oddity"
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #14 on: August 09, 2010, 07:21:13 pm »
Quote
Robotron is Not a 4 way joystick game. 

@Xiaou2

Read my post before you slam on the reply button ;)

If you read it again...you will note that I said I only ever have my right Sanwa JLW in 8 way mode for games LIKE Robotron or Crazy Climber...meaning when I WANT it in 8 way ;)

The rest of the time as per my text...I leave it in 4 way...
Last Project



Epyx Tutorials:
Tutorials

mgb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3500
  • Last login:January 06, 2025, 09:39:00 pm
  • North East, US
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #15 on: August 10, 2010, 05:20:53 pm »
Auto would be great. If the Mag stick were  a better 8-way, it's solution would be fine but for now I don't mind my Sanwa JLW and bottom rotating restrictor...it does a great 8 way and a great 4 way. All I do is open the coin door and reach up and rotate.  Really only for Robotron or Crazy Climber type games the rest of the time the left stick is perma 8 way and right is set to 4 way.  

Hey Epyx,
 Thats the same thing I'm doing with my new control panel. I don't want 3 joysticks so instead I'm using 2 JLW (Great sticks) and just keeping the player 2 one set for 4-way.
I'm pretty much the only one using the game anyway so it works

Epyx

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1961
  • Last login:December 25, 2023, 07:56:36 pm
  • "You're an oddity"
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #16 on: August 10, 2010, 07:01:38 pm »
Quote
Hey Epyx,
 Thats the same thing I'm doing with my new control panel. I don't want 3 joysticks so instead I'm using 2 JLW (Great sticks) and just keeping the player 2 one set for 4-way.
I'm pretty much the only one using the game anyway so it works

Agreed, they are great sticks...my favourite, and I have tried a lot. I also like the configuration (player 2 in 4 way)...easy enough to change it for the odd game that requires 2 8 ways (fighters which I don't play a lot anyways or of course the ones I  mentioned already!).
Last Project



Epyx Tutorials:
Tutorials

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #17 on: August 16, 2010, 06:04:20 pm »
For anyone interested I just finished a prototype for my idea with servos and works very well, I'm very happy with the result.

From the software side I used either xset command or ledcontrol on Linux, both work good to turn on and off the scroll lock key. That I use it to drive a relay via a transistor, so that it consumes 5mA. The relay switches between two different resistance paths for the 555 circuit to send the different pulse sizes, which correspond to two different servo positions and thus, the 4/8way positions on the joystick.

It really works very well, and I like the servo corrects the position if it moves for any reason. I'll have to test it further and put it into stress now.

Bender

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1919
  • Last login:November 28, 2016, 08:12:21 pm
    • Happ to Tron Conversion tutorial
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #18 on: August 16, 2010, 06:48:18 pm »
^^  show us, show us!!!

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #19 on: August 16, 2010, 09:49:38 pm »
^^  show us, show us!!!

Ok, just remember it's a quick prototype...  ;)


jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1215
  • Last login:December 19, 2018, 01:29:48 am
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #20 on: August 16, 2010, 09:55:19 pm »
Very nice!

opt2not

  • Trade Count: (+15)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 6173
  • Last login:April 02, 2024, 07:42:30 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #21 on: August 16, 2010, 10:40:10 pm »
 :o  That looks promising!
I hope it passes the stress-test.   :applaud:

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #22 on: August 17, 2010, 12:09:52 am »
That's much simpler than I thought you were going to build.  Simplicity is good!

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #23 on: August 17, 2010, 12:21:10 am »
Ok, just remember it's a quick prototype...  ;)

Very nice!  When you wrote servo, all I could envision was those big servo motors on one of my vinyl cutters :)

I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with.  I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it.  I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are)  There's also the "what if" scenario of something getting stuck.  They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time.  Maybe that's what the gear rebuild kits are for :).
« Last Edit: August 17, 2010, 01:47:45 am by RandyT »

severdhed

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2975
  • Last login:December 14, 2024, 05:01:52 pm
  • RIP Dinosaur Hippo
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #24 on: August 17, 2010, 09:40:42 am »
wow, that's awesome
Current Projects:      Zak-Man | TMNT Pedestal | SNES Pi | N64 Odroid
Former Projects:     4 Player Showcase | Donkey Kong | iCade

jimmy2x2x

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1215
  • Last login:December 19, 2018, 01:29:48 am
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #25 on: August 17, 2010, 10:00:07 am »
Ok, just remember it's a quick prototype...  ;)

Very nice!  When you wrote servo, all I could envision was those big servo motors on one of my vinyl cutters :)

I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with.  I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it.  I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are)  There's also the "what if" scenario of something getting stuck.  They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time.  Maybe that's what the gear rebuild kits are for :).

Couldn't it be made into an enclosed unit, with some kind of cap - maybe with screw terminals on the outside for the microswitch connectors?

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #26 on: August 17, 2010, 11:21:23 am »

I see that these gizmos are pretty common out there for RC / robotics apps and even come with a handful of actuators to play with.  I have a nice switchable stick build that might get one of these bolted on to see how well it can handle it.  I'm a little concerned about the torque and longevity, but it's definitely worth a try (now that I understand what these are)  There's also the "what if" scenario of something getting stuck.  They don't give up until they are in position, and I'm not sure what happens if they are physically prevented from getting there for a length of time.  Maybe that's what the gear rebuild kits are for :).

That's actually the same concern I have, and I'm not sure what's the response. The good thing is that you really cannot force the plate to turn (and thus, do any force to the servo) using the joystick, the only way to block it is to keep it with force into a corner of the plate while the servo tries to turn the plate. In any case, this kind of servo costs 7USD on my country, and I think the price is half that or so in the US, not much to worry about.

If you work something similar, please let us know your experience.

An upgrade I made to the circuit is I took the relay out and used the transistor "switch" to enable directly the second resistance path for the alternate position.

Now I have to check if ledcontrol can have the resolution needed to drive the servo (signal) in itself with no electronics involved in the middle, that would be great, but I would need microseconds resolution and I'm not sure if that's possible, even changing the code.

Thanks all for the feedback.  :)

mmb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:November 24, 2024, 12:24:24 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #27 on: August 17, 2010, 11:34:02 am »
Other than using metal gear RC servos to prevent the gears from stripping out under too much load or use, that looks like a great idea.


bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #28 on: August 17, 2010, 11:38:45 am »
I guess I'm a little confused why you need complicated software to control this.  Seems like you could just set the position to 4- or 8- way and leave the signal on.  I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.


Bender

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1919
  • Last login:November 28, 2016, 08:12:21 pm
    • Happ to Tron Conversion tutorial
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #29 on: August 17, 2010, 12:16:58 pm »
That's awesome!

I bet you could do 4way diagonal (Q*bert) too?

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #30 on: August 17, 2010, 12:41:51 pm »
That's awesome!

I bet you could do 4way diagonal (Q*bert) too?

A squarish restrictor in 8-way pretty much already is ;)

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #31 on: August 17, 2010, 01:07:41 pm »
I guess I'm a little confused why you need complicated software to control this.  Seems like you could just set the position to 4- or 8- way and leave the signal on.  I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.


A servo doesn't rotate continuously when you apply a signal (although they could be modified to do so), they go to a predetermined position according to the input signal. The good thing about a servo is that it's very precise, even with cheap ones, and on the other hand, it will correct it's position as long as you apply an input signal. This means that if any external force makes them move, they will go back to the same predetermined position.

As for the software, it's not complicated at all, I use the scroll lock connector of the keyboard encoder to send a signal to my circuit, led off is 8way position for the servo and led on is 4way position. And some additional scripting to check what the game needs before launching the game.

Epyx

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1961
  • Last login:December 25, 2023, 07:56:36 pm
  • "You're an oddity"
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #32 on: August 17, 2010, 01:22:10 pm »
What about a 2-way system via a pull?  That way you could use a loose restrictor and 4 way and 8 way both pull as opposed to any push action. You could then spring load them so that if the restrictor were to get stuck the spring would activate and prevent any damage.
Last Project



Epyx Tutorials:
Tutorials

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #33 on: August 17, 2010, 02:00:25 pm »
You could then spring load them so that if the restrictor were to get stuck the spring would activate and prevent any damage.

If you look up something called a "servo saver" you'll see that they already make something like that for servos.  A spring loaded switching system with solenoid would be ok too, but also be a little  complicated.  The best approach would be something along the lines of the way a pinball flipper works.  Full power at first activation, and then half power to hold it in place, so it doesn't cook the solenoid coil.  Probably need a dedicated power supply as well.  You can get more torque out of a geared motor with lower power requirements.

If you mean a pull attached to a servo, it would make more sense to just use the servo to move the restrictor to both positions.

RandyT
« Last Edit: August 17, 2010, 02:02:19 pm by RandyT »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #34 on: August 17, 2010, 03:17:09 pm »
Pretty cool!

That's it, I'm ordering a cheap door lock actuator so I can tinker too  :laugh:

mgb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3500
  • Last login:January 06, 2025, 09:39:00 pm
  • North East, US
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #35 on: August 17, 2010, 05:08:12 pm »
I guess I'm a little confused why you need complicated software to control this.  Seems like you could just set the position to 4- or 8- way and leave the signal on.  I'm thinking the limit switch would then turn off the servo for you, kinda like those "useless toys" that are on youtube.



I think the idea is to work out a way for it to be autoswitched depending on the game rather than hitting a switch or something

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #36 on: August 17, 2010, 08:38:03 pm »
Of course!  I just posted the video since it's a very simple example of a very similar task.  I didn't realize he had wired it up so that a single signal (led on/off) could change positions.  That's easier than two position "on" switches.

Looks great though!  Hopefully it will survive some testing so a similar concept can hit the market (AFFORDABLY) at some point!

highlander4

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 20, 2015, 09:31:34 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #37 on: August 28, 2010, 09:54:31 pm »
Will this work to controll those type of servos?

Electronic Toggle Switch
[E002] $6.00
 

Click to enlarge 
Electronic Toggle Switch kit can be used for switching On/Off application of home appliances like fan, light etc.


Supply input 12 VDC   
Onboard ON/OFF switch
Relay output SPDT relay
Relay specification 5 A @ 250 VAC
Relay state LED indicator
Power-On LED indicator
Screw terminal connector for easy relay output connection
Terminal pins for supply input connection
Four mounting holes of 3.2 mm each
PCB dimensions 46 mm x 58 mm
 

danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8522
  • Last login:Yesterday at 01:09:20 am
  • because the mail never stops
    • dans cocktail lounge
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #38 on: August 29, 2010, 05:12:56 am »
I thought about this today, to implement on my new cab. I figured it couldn't be too hard to do. From the software side, it's easy to execute a script before entering the game to check what should be the correct setting. From the hardware side I think it should be simple too, but would like to see what others think.

I didn't investigate much and I've been away from building anything hardware related for some time. Thoughts:

1. I was thinking a  standard servo should do OK to turn the 4way/8way plate 90°. And on the other hand, I see that using the joystick hardly produces any force upon the plate, even if it's loose (not locked by screws) it won't turn when used. So it shouldn't be a problem for any servo to keep the plate in place.



I had thought about this for my sanwas on my cocktail. Since the monitor rotates, I thought it would be awesome if the restricotr plate rotates too. Never did do it. If I did, it was just going to be a toggle since I'm a tard with the software side of things. Instead, if I ever feel strongly, i'll retrofit with those sticks that have the little toggle to move the restrictor. I can never remember the name of them...

Edit: Omnistick Prodigy. That's it! from Randy T  :)

Edit: A radio control type servo that can do this job wont draw very much current, or cost much. Should be able to get them for under ten bucks each nowadays...

Edit edit:

maybe I should read the whole thread next time  :D

^^  show us, show us!!!

Ok, just remember it's a quick prototype...  ;)


« Last Edit: August 29, 2010, 05:34:14 am by danny_galaga »


ROUGHING UP THE SUSPECT SINCE 1981

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Door Lock Actuator - FAIL
« Reply #39 on: August 29, 2010, 11:28:47 am »
Just tried this with a door lock actuator.  Travel was a bit short, but could have overcome by moving the pivot point closter to the center of the restrictor plate.
The big reason for the fail was that the actuator drifted back toward center after moving positions.  It would work if power was constantly applied, but that would burn the motor up in no time.  Cheap servos or expensive industrial actuators seem the way to go.

Keep this thread alive, I want to see this work!  :)

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Door Lock Actuator - FAIL
« Reply #40 on: August 29, 2010, 12:15:03 pm »
Keep this thread alive, I want to see this work!  :)

I had it working a week ago  ;D

Just beating the crap out of it now.

RandyT

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #41 on: August 30, 2010, 12:01:11 pm »
Will this work to controll those type of servos?

Electronic Toggle Switch
[E002] $6.00
 

Click to enlarge 
Electronic Toggle Switch kit can be used for switching On/Off application of home appliances like fan, light etc.


Supply input 12 VDC   
Onboard ON/OFF switch
Relay output SPDT relay
Relay specification 5 A @ 250 VAC
Relay state LED indicator
Power-On LED indicator
Screw terminal connector for easy relay output connection
Terminal pins for supply input connection
Four mounting holes of 3.2 mm each
PCB dimensions 46 mm x 58 mm
 


Where did you source this?  I'm thinking this could be a cheap way to turn on/off things from inside Windows with software (like a 15kHz monitor for instance).

highlander4

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 20, 2015, 09:31:34 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #42 on: August 30, 2010, 07:02:24 pm »
I have no idea where it is.  I lost the link to it.  I just know that it will not run a servo.

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #43 on: August 30, 2010, 08:43:24 pm »

highlander4

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 20
  • Last login:April 20, 2015, 09:31:34 pm

trevski

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 34
  • Last login:May 14, 2011, 03:27:44 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #45 on: August 31, 2010, 06:39:53 am »
Very interesting!

One question that might be an obvious one (I've never used a switchable stick)..

What would happen if someone (kid or drunken adult) was hanging off the stick when
the servo attempted to rotate the restrictor plate?


mgb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3500
  • Last login:January 06, 2025, 09:39:00 pm
  • North East, US
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #46 on: August 31, 2010, 08:34:16 am »
The stick and restrictor plate are two different parts so there shouldn't be any issue there.

Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.

danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8522
  • Last login:Yesterday at 01:09:20 am
  • because the mail never stops
    • dans cocktail lounge
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #47 on: September 02, 2010, 08:19:59 am »
The stick and restrictor plate are two different parts so there shouldn't be any issue there.

Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.

Would it be cheaper than a 5 buck servo?


ROUGHING UP THE SUSPECT SINCE 1981

rbarr110

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 298
  • Last login:September 25, 2023, 04:02:41 pm
  • I already built my own arcade controls!
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #48 on: September 08, 2010, 12:14:01 pm »
Speaking of cheap 5 buck servo.... any info on the servo used on the joystick in this particular thread.  I am looking for a servo just like that for a homebrewing related project, but alot of what I find are well over 5 bucks.

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #49 on: September 08, 2010, 12:20:13 pm »
Speaking of cheap 5 buck servo.... any info on the servo used on the joystick in this particular thread.  I am looking for a servo just like that for a homebrewing related project, but alot of what I find are well over 5 bucks.

One of these:

http://www.dealextreme.com/details.dx/sku.12859

You should be able to get one of those in any RC hobby shop I guess.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #50 on: September 08, 2010, 03:34:11 pm »
This might be a good application for the nutchip,
http://www.nutchip.com/progetti/stepper_en.htm
 however you would also need a driver for the stepper. A ULN22823A Chip might work, if the stepper is a unipolar.
Or a L297 driver chip.
Very interesting project.

Edit: what kind of driver does this use? It looks like it only has 3 wires. Most have 4 or 6 and a few have 8.

Edit again. The one on deal extreme is a servo not a stepper.

Looks to me like the best thing would be limit switches to tell the driver that the motor is at one end of it's run. Unless there is a some type of feedback position encoder then it could easily get lost. (power failure while moving).
Position feedback encoder could be complicated and expensive. My advice would be cheap micro switches.
« Last Edit: September 08, 2010, 03:49:24 pm by DaOld Man »

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #51 on: September 08, 2010, 11:44:59 pm »

Edit again. The one on deal extreme is a servo not a stepper.


yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.

mgb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3500
  • Last login:January 06, 2025, 09:39:00 pm
  • North East, US
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #52 on: September 08, 2010, 11:46:32 pm »
The stick and restrictor plate are two different parts so there shouldn't be any issue there.

Just a thought but I wonder if muscle wire would work (though a little more pricey). Muscle wire is used in robotics, its a length of wire that retracts (like a muscle) when a voltage is applied to it.
I've never used it and I don't know how far the travel is but I wonder if it would work.

Would it be cheaper than a 5 buck servo?

No it wouldn't be that cheap, but most servos are more $5

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #53 on: September 09, 2010, 11:36:45 am »
yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.

Got a schematic or wiring diagram?

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Yesterday at 01:59:43 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #54 on: September 09, 2010, 12:55:49 pm »

After playing with servos for a bit, I can say that I wouldn't be comfortable with the cheapest servo in the world when used in this application.  Contrary to what has been stated here, the joystick can, and does, move a restrictor out of position without something beefy holding it in place.  And a servo connected to one is very adamant about putting it where it thinks it should be.  That means that there are always opposing forces at play when in use, and whatever servo one uses needs to be up to the job of keeping the restrictor in position, and not overheat, strip gears, etc... 

It also has to be strong enough to overcome any type of random resistance that might occur, and have a "fail-safe" of some nature to protect the motor.  Nothing kills a servo faster than it wanting to move someplace where it isn't allowed to go.  This type of situation will be similar to turning on a DC motor at full speed, but constantly putting more resistance on the shaft than the motor is designed to handle.  It doesn't take long for it to overheat and die.  I've also seen them get into an "oscillation" situation where they flutter between two adjacent positions.  As they are constantly drawing a decent amount of current when this happens, it eventually causes them to overheat.

So basically, what I have found is that it can be done fairly well, but the "cheapest and easiest" route probably will not be the best approach.  The cheapest servos won't last too long and the simplest circuits have no way to protect the motors.

RandyT

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #55 on: September 09, 2010, 11:27:48 pm »
yes, it's a servo, someone asked what was used on the example on this thread and that's what I've used. Driving a servo is very easy, using just a 555 and this allowed me to control both servo positions with a simple scroll lock on and off positions.

Got a schematic or wiring diagram?

I don't have the diagrams at hand or the page I used, but if you search, there are lots of places where you can find similar circuits using a 555 in astable configuration and a transistor on the output to invert the signal, it's the same astable circuit you find on the 555 Datasheet, just search "servo 555".

As for your comment Randy, I really think that these Sanwa joysticks I've got are really hard to turn from the joystick, there is almost no friction. I know that they turn slowly if you play a lot, but you have to play a long time. In any case, to solve the problem of the servo always trying to correct it's position and risking it to burn, I'm trying configurations where I send signals to the servo for 1 second every 5 seconds, or every 10 seconds or so... This way the servo can put the switch in the initial position and check every certain amount of time that the switch is in the correct position and correct if necessary. This assumes as I said before, that your joysticks keep their position and they are not turn easily from the joystick.

Sir Headless VII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 106
  • Last login:April 30, 2017, 02:04:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #56 on: September 10, 2010, 12:27:41 am »
How much rotational force does a player exeret vs a servo? could you hold the plate in the desired position with a magnet?

Sir Headless VII

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 106
  • Last login:April 30, 2017, 02:04:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #57 on: September 10, 2010, 01:19:03 am »
ok i thought of a much more complicated but more interesting way. The idea would be to have the servo arm follow a track that would deposit the plate in place then detach the arm (thereby eliminating the stress from a moving plate). The idea is roughly outlined below (only one side of the track is illustrated but it would obviously be mirrored on the other side).



The arm would rotate around the track with the plate attached via a magnet. When it reaches the area where the plate should be there is a stopper which detaches the plate from the arm. The plate falls onto a peg which fits into a hole on the plate and holds it in place. On the way back the arm would come over the plate and pick it back up with the magnet and travel to the other position where a similar thing would happen. It is fairly complicated and would be difficult for someone at home to build but it was what i thought about in the shower and that is what i came up with.

Derrick Renaud

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 299
  • Last login:December 06, 2024, 04:31:44 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #58 on: September 10, 2010, 01:16:40 pm »
Couple of ideas.

A small solenoid to lock the rotation of the restrictor.  Solenoid pin just goes in/out of a hole in the plate.

Maybe use a motor with a worm gear to rotate the restrictor.  Then use an optical sensor to know when it is done, which then tells the previously mentioned solenoid to lock the plate.  Obviously this means a custom made restrictor plate that matches the gear on the motor.

It would be cool if the 4-way could rotate to a Q-Bert setting.  You would still have to setup the MAME buttons as the diagonals (eg. Up + Right,) but at least you would have the restriction.

D.
« Last Edit: September 10, 2010, 01:28:32 pm by Derrick Renaud »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #59 on: September 10, 2010, 01:56:00 pm »
If anyone just wants to spend $$$ and get it over with:
http://store.firgelli.com/l12-s-linear-actuat12.html
(mini actuator, built in limit switches, $80 +S&H)
« Last Edit: September 10, 2010, 02:52:06 pm by BadMouth »

ranma

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 80
  • Last login:October 05, 2014, 08:44:01 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #60 on: September 10, 2010, 03:09:57 pm »
Couple of ideas.

A small solenoid to lock the rotation of the restrictor.  Solenoid pin just goes in/out of a hole in the plate.

Maybe use a motor with a worm gear to rotate the restrictor.  Then use an optical sensor to know when it is done, which then tells the previously mentioned solenoid to lock the plate.  Obviously this means a custom made restrictor plate that matches the gear on the motor.


Still think the servo thing is much cheaper and easier to do than this, but when I was considering things I thought about that. For this, instead of a custom plate I considered attaching a lego gear to the current plate and build everything from technic parts. (Acquiring individual technic parts is cheap and easy from bricklink)

terrahwk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:October 16, 2013, 05:47:23 am
  • mmm.. donuts
    • nucleardog.net
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #61 on: January 01, 2011, 06:47:30 pm »
Sorry to revive an old thread, but I just completed a new cabinet and was checking to see if anyone else had done the auto 4/8way joystick.
I'm using Ultimarc Mag-stick plus joysticks, and a Pololu 6-channel servo controller. When the game is selected in the FE, a small batch file runs that will automatically tell the servos to move to the 4 or 8-way position and then run mame. Works a treat- I'm really happy with the result


DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #62 on: January 01, 2011, 07:00:49 pm »
Looks good!
Does that stick restrict actual diagonal movement when in 4 way, or does it just disable diagonal switches?

terrahwk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:October 16, 2013, 05:47:23 am
  • mmm.. donuts
    • nucleardog.net
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #63 on: January 01, 2011, 07:08:45 pm »
Looks good!
Does that stick restrict actual diagonal movement when in 4 way, or does it just disable diagonal switches?

Yes, when in 4-way mode the stick is physically incapable of moving to the diagonals

keefyboy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 26
  • Last login:May 13, 2011, 03:08:56 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #64 on: January 02, 2011, 08:46:47 am »
Can you post video/build pics/parts list/batch file? (yeah, I asked for everything+kitchen sink...)

That looks really neat and might not need this servo that I looked up...

terrahwk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:October 16, 2013, 05:47:23 am
  • mmm.. donuts
    • nucleardog.net
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #65 on: January 02, 2011, 05:50:46 pm »
Well, I don't have a build video... but will see if I can describe it.

Servos and servo controller came from www.robotgear.com.au but any local hobby/robotics store should have this stuff.

I used these servos http://www.robotgear.com.au/Product.aspx/Details/421
And the Pololu 6-channel micro maestro servo controller http://www.robotgear.com.au/Product.aspx/Details/403

I fell in love with the servo controllers, they are very flexible and quite small.

This shot has the I-Pac keyboard encoder, one Pac-Drive LED controller and the servo controller. The servo controller is the really small board under the keyboard encoder.



The joysticks I used are Ultimarc Mag-Stick Plus 4/8-way switchable. The white lever on the site is part of the locking plate. There's a small lump on the joystick housing that helps keep the locking plate in the correct position - I removed it using a dremel so the servo has an easier time moving the locking plate. I could probably have left it there, the servo is surprisingly strong.

It's really just a matter of getting everything mounted and connected, and that will vary according to your control panel. Most of the stuff was just found about in the shed - the push-rods that connect the servo to the joystick for example are simply steel rod that has had a flat section ground into each end. They are connected to the joysticks with very small nuts and bolts that came off an old broken helicopter (model). The servo controller itself runs off USB power, but it needs an external 6V supply to power the servos. I'm running my servos off 5V, as that's what I had available.

The servo controller contains a small amount of flash RAM, and it comes with software and a simple programming language. With a servo, you simply tell it where you want it to "be" and it will rotate to that position and stay there. Any attempts to move it will be met with resistance, depending on how strong the servo is. The position will vary according to each build. You can use the software that comes with the servo controller to play with it until you find the right value.


You can use the software and move the slider, the servo will move in real time. Basically I wrote the following script in the above software and saved it to the servo controller. The script gets called whenever I want the servos to move.
Code: [Select]
8
sub start
8 equals if
  4105 frame
else
  7373 frame
endif
0 frame
quit

sub frame
  dup
  0 servo
  1 servo
  1000 delay
  return

I'm no coding guru, so all this does is set up some simple logic - If I call the script with the value "8" (or no value) then it will tell both servos to move to position 4105. If the script is called with any other value, the servos will move to position 7373. (The scripting language uses RPN-like notation, which is why it might look a little odd) These values were found by experimentation.

The batch file (I'm using Windows XP) looks like this and I call it "runmame.bat":
Code: [Select]
@echo off
d:
cd d:\mame

findstr /b /r "%1$" game-stick-mapping.txt > result.txt

for /f %%A in ("result.txt") do if %%~zA NEQ 0 goto four

echo 8-way
usccmd --sub 0,8
goto end

:four
echo 4-way
usccmd --sub 0,4
:end


mame "%1"

Again, I take the easy way out. I have made a hacked version of controls.xml and it simply contains the rom names of roms that are 2 or 4-way games. I did this as my XML parsing skills are non-existant, but I can write a simple batch file :)
Basically, the batch file searches for the ROM name in the file "game-stick-mapping.txt". The result is written to a temporary file. If the file size is 0 then obviously the ROM name wasn't found so the assumption is made that the game is 8-way. It then calls the servo controller and passes the parameter "8" (or "4", if the ROM was found) and then finally calls mame. The file I use is here (but all credit should go to the creators of controls.xml, any mistakes are likely to be from me) http://pastebin.com/download.php?i=twbzDgSf
The batch file is therefore called like you would mame:
runmame.bat 1942.zip

I use Hyperspin as the front-end. Hyperspin won't run batch files, so I came across a utility called "Bat-to-exe-converter" here http://www.f2ko.de/programs.php?lang=en&pid=b2e
You can feed it a batch file (like the one above) and it will "convert/compile" it into an exe. Hyperspin then accepts this exe instead of mame.exe. (although I don't pass any other parameters to mame.exe - I have it all set up in mame.ini. If you pass parameters through you might need to adjust the batch file)

I'm sure someone with a little coding knowledge could write up something that properly parses controls.xml and calls the servo controller directly. I thought about trying - I used to do a bit of C coding, but that was over 10 years ago... so it's a bit beyond me at the moment.
« Last Edit: January 02, 2011, 05:57:35 pm by terrahwk »

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #66 on: January 02, 2011, 09:46:44 pm »
Very cool!
I bet you could create a mala plugin to act as the bat file does.
Very interesting work.
I may try this on my next build.

danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8522
  • Last login:Yesterday at 01:09:20 am
  • because the mail never stops
    • dans cocktail lounge
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #67 on: January 03, 2011, 01:03:24 am »
Very cool!
I bet you could create a mala plugin to act as the bat file does.
Very interesting work.
I may try this on my next build.


Yeah, nice work (",)

I've only just discovered mala and the plug ins aspect of it looks very useful indeed...


ROUGHING UP THE SUSPECT SINCE 1981

jipp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 282
  • Last login:April 01, 2016, 07:29:49 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #68 on: January 03, 2011, 07:12:48 pm »
this is a pretty cool idea.  i just went with a dedicated 4 way stick on my cab..  but i could see this coming in handy if you do not have a lot of room.. like converting a cab to mame.. some of them cabs have small control panels..  also this would be nice in a bar top too.  will book mark this for when my skills reach the desire level needed for this. :)

rock on.
chris.

danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8522
  • Last login:Yesterday at 01:09:20 am
  • because the mail never stops
    • dans cocktail lounge
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #69 on: January 04, 2011, 01:24:36 am »
this is a pretty cool idea.  i just went with a dedicated 4 way stick on my cab..  but i could see this coming in handy if you do not have a lot of room.. like converting a cab to mame.. some of them cabs have small control panels..  also this would be nice in a bar top too.  will book mark this for when my skills reach the desire level needed for this. :)

rock on.
chris.

Not just that, but some CP's with a stack of joys on it look, to use an American euphemism, 'like ass'...


ROUGHING UP THE SUSPECT SINCE 1981

ntk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:June 06, 2011, 12:09:59 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #70 on: January 05, 2011, 02:33:27 am »
i found the controller 5$ cheaper + free worldwide shipping

http://cgi.ebay.com/MICRO-MAESTRO-6-CH-USB-SERVO-CONTROLLER-ASSEMBLED-/170544529885?pt=LH_DefaultDomain_0&hash=item27b53f01dd

i have 7" screen on my CP and i connected to it a servo so i can change the angle i will upload a video soon

ntk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 46
  • Last login:June 06, 2011, 12:09:59 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #71 on: January 06, 2011, 10:23:43 am »
this is what i did with the servo i bought it from ebay
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=320621254330&ssPageName=STRK:MEWNX:IT



in the video i control the servo with servo tester" but i will connect it to the pc and conrol it with some script

ErikRuud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1709
  • Last login:March 05, 2021, 10:20:27 am
  • I'll build a cab for only 99.99.99!!!
    • Erik's humble video game page
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #72 on: January 06, 2011, 11:35:28 am »
A couple of other choices for controlling servos from a PC.

Mini SSC II  I have not used this one, but it has been around a while and has a good reputation.

Phidgets Servo Controller  I do have two of the older version that I have played around with and they work very well.


I forgot to add that Phidgets also has Stepper controllers.
« Last Edit: January 06, 2011, 11:39:24 am by ErikRuud »
Real Life.  Still a poor substitute for video games!       
American Laser Games Wrapper
O2em Rom Utility

RetroBorg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:July 06, 2022, 09:22:13 am
  • Your arcade games will be assimilated!
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #73 on: January 14, 2011, 04:28:26 am »
I was inspired by terrahwk's effort, I really liked how he used two servos to make two Mag-Stick Plus joysticks switch automatically from 4-way to 8-way mode.

I currently have a mock control panel for seeing how everything fits together for when I build my arcade machine and I thought the way I had my Mag-Sticks mounted I could emulate what terrahwk has done but hopefully get away with using just one servo.

Anyway today I got the servo controller and servo working, I followed terrahwk's instructions with the software and got the servo moving as I ran different MAME games.

Next I installed the servo into my mock control panel and added a bar linking the two Mag-Stick to the servo.

I then hooked it up to the computer and ran the software and no probs the little servo switched both Mag-Sticks at the same time easily.

I will have to be more precise when I make up my real control panel as when the joysticks switch one of them is out by a millimetre or two from going all the way.

Also my mount for the servo is dodgy as, which probably doesn't help.

It doesn't really matter for the mock panel, this was just a check to see if the servo had the power to shift both at once.



Here's a video of it switching, I ran Juno First followed by Donkey Kong, just from the command line.



I haven't been able to get it working in HyperSpin as yet, I'll have to play around with it a bit more.
« Last Edit: January 14, 2011, 04:47:43 am by RetroBorg »

jipp

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 282
  • Last login:April 01, 2016, 07:29:49 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #74 on: January 14, 2011, 11:04:07 am »
very cool :)

chris.

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #75 on: January 14, 2011, 11:21:02 am »
Is it just me, or does the servo flex the mounting bolts when it nears the end of motion?  If so, you will probably see a premature failure of this setup.  My guess would be the mounting holes on the servo will go, but something in there won't last IMO.

I like what you guys have come up with here!  Perhaps one of the vendors will see the value in this and create a ready-to-install solution.   :cheers:

RetroBorg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:July 06, 2022, 09:22:13 am
  • Your arcade games will be assimilated!
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #76 on: January 14, 2011, 02:12:46 pm »
Is it just me, or does the servo flex the mounting bolts when it nears the end of motion?  If so, you will probably see a premature failure of this setup.  My guess would be the mounting holes on the servo will go, but something in there won't last IMO.

Also my mount for the servo is dodgy as, which probably doesn't help.

Yeah it was just a quick put together, I wouldn't mount it like this if it was a real panel.

RetroBorg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:July 06, 2022, 09:22:13 am
  • Your arcade games will be assimilated!
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #77 on: January 16, 2011, 07:21:56 am »
I have it working automatically in HyperSpin now by using a batch file but I'd like to eventually write a script for HyperLaunch to do it all within HyperSpin.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #78 on: July 18, 2011, 09:00:51 am »
Sorry to revive this old thread, but I have an update that might interest someone who wants to automate the joystick.
I have just finished a Mala plugin that allows you to call bat files for the joystick position needed per game.

It is called JoyChoose.

JoyChoose can call just about any program that actually controls the servo motors.
It can be individual programs for each joystick position, or one program with arguments for each position.

JoyChoose can issue program requests for 8 way, 4 way, and 2 way.
Anyone thought about making a 2 way switch?

I havent uploaded it to the MalaFE website yet, just thought I would give you guys a sneak peek.
If you are interested in test driving JoyChoose, drop me a PM, I can email it to you.
Once it is available on the MalaFE site, I will announce it in the Mala Forum on here.

Anyway, here is a pic of the JoyChoose configure screen:


RetroBorg

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:July 06, 2022, 09:22:13 am
  • Your arcade games will be assimilated!
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #79 on: July 18, 2011, 10:37:07 pm »
Sound interesting DaOld Man, I use HyperSpin and one of the members of the forum over there wrote an AutoHotkey script to do the same thing.

Where does JoyChoose get it's information on the joystick directions for each rom?

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #80 on: July 19, 2011, 10:28:34 am »
Mame.xml I think.

DaOld Man

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5158
  • Last login:May 24, 2025, 09:57:44 pm
  • Wheres my coffee?
    • Skenny's Outpost
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #81 on: July 19, 2011, 10:44:48 am »
JoyChoose is now available for download on the malafe.net website, under "plugins".

danny_galaga

  • Grand high prophet of the holy noodle.
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 8522
  • Last login:Yesterday at 01:09:20 am
  • because the mail never stops
    • dans cocktail lounge
Re: Anyone made a auto 4way/8way switching joystick?
« Reply #82 on: December 05, 2014, 07:41:12 pm »
Just been searching around because I am ready for a new project and will be using servostiks. I am finding that links are rather circular. Go to malafe.net and it tells you to look here, from here you are sent to malafe.net! Just wondering if there could be a fresh clean thread started just on controlling servostiks (without all the R & D posts that preceded)? In particular using Mala (in the mala section) but probably to be fair the thread should cover all means of controlling servostiks.
« Last Edit: December 05, 2014, 07:42:52 pm by danny_galaga »


ROUGHING UP THE SUSPECT SINCE 1981