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: Soft switchable 4/8 way?  (Read 4079 times)

0 Members and 1 Guest are viewing this topic.

EightBySix

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 523
  • Last login:April 25, 2021, 01:50:16 pm
Soft switchable 4/8 way?
« on: November 04, 2011, 07:44:52 am »
I've touched on this a few times in related posts, but I'm not sure I explained myself well enough to get an answer. I'm wondering if there is a possibility of making a device that allows 4 way games to be played better on an 8 way stick.

I realise that it won't feel the same as a dedicated 4 way, but I want to leave that issue aside for the purposes of this thread.

What is the issue with MAME and 8 ways on a 4 way game? Is it that the game gets upset when it sees two direction switches being activated at once?

Surely that can be 'fixed' with some sort of logic gate arrangement on the direction switches.

For the sake of discussion, let's say we are about to climb the 1st ladder in Donkey Kong, so we are rolling the joystick around from right, to up, and both right and up are selected on the way.

Would one of the following work?

a) Intercept the diagonal signal and send nothing

b) Intercept the diagonal and send only UP

c) Intercept the diagonal and send only LEFT

If one of these scenareos would make 4 way games more playable? It could be implemented as a switch, and make a dedicated 4 way stick less of a must have.

I've seen some references to joystick settings in MAME. Does my suggestion just duplicate what MAME is doing in software?

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7922
  • Last login:September 13, 2025, 11:24:38 am
Re: Soft switchable 4/8 way?
« Reply #1 on: November 04, 2011, 08:36:16 am »
The problem really comes into play when you want to play multiple 4 way games, since they react differently to diagonals. Some games ignore them, some force the character to alternate between the 2 directions, some stop the character till the joystick is re-centered. If you wanted to just play Ms. Pacman, I'm guessing you might be able to get something to work, but I don't you'll find a satisfactory solution for a variety of different 4 way games. You're probably just better off dealing with the crappy 8 way.

EightBySix

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 523
  • Last login:April 25, 2021, 01:50:16 pm
Re: Soft switchable 4/8 way?
« Reply #2 on: November 04, 2011, 10:21:24 am »
But this way, the game in question would never 'see' a diagonal...  So it shouldnt matter how a particular game would react to it....

Nephasth

  • Guest
  • Trade Count: (0)
Re: Soft switchable 4/8 way?
« Reply #3 on: November 04, 2011, 10:32:01 am »
This might help you out. Don't know if you've seen it yet or not.

EightBySix

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 523
  • Last login:April 25, 2021, 01:50:16 pm
Re: Soft switchable 4/8 way?
« Reply #4 on: November 04, 2011, 11:11:29 am »
Thanks - I hadnt seen that. It kind of goes halfway to what I was thinking of.
If you shut off all other signals whenever a new (extra) one was received though, then you could get up the 1st DK ladder in the example above by rolling from right to up, even if you hit the diagonal.

BobA

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5943
  • Last login:July 11, 2018, 09:52:14 pm
  • What Me Worry?
Re: Soft switchable 4/8 way?
« Reply #5 on: November 04, 2011, 11:32:32 am »
Switchable 4way/8way circuits.

Link

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7922
  • Last login:September 13, 2025, 11:24:38 am
Re: Soft switchable 4/8 way?
« Reply #6 on: November 04, 2011, 12:09:33 pm »
But this way, the game in question would never 'see' a diagonal...  So it shouldnt matter how a particular game would react to it....


So, you're wanting to create a dead zone?  Wouldn't that equate to no direction being pressed and the character on screen would stop once you hit a diagonal? 

I built a cabinet with a 4 way joystick to solve this problem. I can confirm it did fix my problem of using a 8 way for 4 way games. 

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Soft switchable 4/8 way?
« Reply #7 on: November 04, 2011, 12:18:14 pm »
Maybe I'm missing something, but if you want the diagonals to be ignored completely, you can use a map file (as linked above).  I use one for QBert games and it works ok.  The feeling is all wrong, but it does work.  All the switch does is turn the code into a circuit as far as I can see.  Seems like software would be a simple/more elegant solution.

bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: Soft switchable 4/8 way?
« Reply #8 on: November 04, 2011, 12:22:58 pm »
As far as what a map file would do, here's an example that's probably formatted wrong.

0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
1 0 0 0 1 0 0 0 1
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0

There's a simpler form as well, but basically it turns a 49-way joystick into a 4 way with only the full throw counting.  This can also be used for an 8-way stick, though.  With an 8-way stick, there are only 9 positions that count (cardinals, diagonals, center).  If you only want cardinals and center, the diagonals become '0' in the file.  Anything else in the grid can be 1 or 0 and it won't matter since the joystick can't send those positions anyway.  Check out Headkaze's MAME Joystick Map application.

http://headsoft.com.au/index.php?category=mame&page=joymap

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7024
  • Last login:Yesterday at 10:24:11 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Soft switchable 4/8 way?
« Reply #9 on: November 04, 2011, 02:54:01 pm »

This is simply not possible to do well. I've seen devices claim to be able to do it, but the math just doesn't work.  In order to intelligently discern the intention of the player, you need a lot of information from the joystick position to base some decision making upon.  With a  8-way stick, you have 4 switches.  When moving from any of those four switches to one adjacent to it (4-way simulation), your initial dataset has now dwindled to only 2 pcs of information.  In the real world, that's known as a "coin flip".  In the end, you have a 50/50 chance of discerning the intent of the player, so there is no improvement in performance....maybe even a degradation in the end. 

You can use an algorithm or two to "track" the situation, such as: "if the last good direction is UP and the next output from the joystick is UP/RIGHT, then make direction RIGHT", but even this has major problems.  What if the player didn't intend to drift from UP, and hit the diagonal by mistake? What if the last "good" direction was guessed incorrectly?  Again, back to the "coin flip", where one side or the other is more heavily weighted through speculation, but accuracy is not truly improved.

49-ways and analogs have much more info to work with, and are therefore suited to such endeavors.  Regular switch joysticks are, unfortunately, not.

RandyT


dgame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 620
  • Last login:June 01, 2025, 11:09:55 pm
  • I am no Jedi
Re: Soft switchable 4/8 way?
« Reply #10 on: November 04, 2011, 08:02:50 pm »
"if the last good direction is UP and the next output from the joystick is UP/RIGHT, then make direction RIGHT",

I would want if the last good direction is UP and the next output from the joystick is UP/RIGHT, then DO NOTHING until there is only RIGHT.

Meaning just ignore the diagonals and only register the cardinals.


Can someone post an example of  MAME config file with the NOT function being used?

Something like Up = Up NOT Up/Left NOT Up/Right?

Is this possible?

Thanks

Nephasth

  • Guest
  • Trade Count: (0)
Re: Soft switchable 4/8 way?
« Reply #11 on: November 04, 2011, 08:09:20 pm »
"if the last good direction is UP and the next output from the joystick is UP/RIGHT, then make direction RIGHT",

I would want if the last good direction is UP and the next output from the joystick is UP/RIGHT, then DO NOTHING until there is only RIGHT.

Meaning just ignore the diagonals and only register the cardinals.

For that you could just set UP = UP, UP/RIGHT, UP/LEFT; DOWN = DOWN, DOWN/RIGHT, DOWN/LEFT; RIGHT = RIGHT; LEFT = LEFT.

equlizer

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 363
  • Last login:November 17, 2019, 02:56:48 am
  • All your base are belong to us
Re: Soft switchable 4/8 way?
« Reply #12 on: November 04, 2011, 08:28:15 pm »
I just set mine to UP, UP, DOWN, DOWN, LEFT RIGHT, LEFT RIGHT, B, A, SELECT START >:D

Nephasth

  • Guest
  • Trade Count: (0)
Re: Soft switchable 4/8 way?
« Reply #13 on: November 04, 2011, 08:52:54 pm »
For that you could just set UP = UP, UP/RIGHT, UP/LEFT; DOWN = DOWN, DOWN/RIGHT, DOWN/LEFT; RIGHT = RIGHT; LEFT = LEFT.

Nope, doesn't work.

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7024
  • Last login:Yesterday at 10:24:11 pm
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com
Re: Soft switchable 4/8 way?
« Reply #14 on: November 04, 2011, 10:11:44 pm »

I would want if the last good direction is UP and the next output from the joystick is UP/RIGHT, then DO NOTHING until there is only RIGHT.

Meaning just ignore the diagonals and only register the cardinals.

I believe that is MAME's "sticky" mode.  Some like it, some don't.  Supposedly it used to be that way by default, and was removed because too many folks were needing to re-compile to get rid of it.  There may be a way to activate it in current builds.

BTW, here are a few 8-year old threads on the topic of this thread (The effort put into this topic has been pretty exhaustive. ;));

http://forum.arcadecontrols.com/index.php?topic=7520.msg54062#msg54062
http://forum.arcadecontrols.com/index.php?topic=7288.msg52066#msg52066
http://forum.arcadecontrols.com/index.php?topic=5854.msg39913#msg39913

RandyT

leapinlew

  • Some questionable things going on in this room with cheetos
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7922
  • Last login:September 13, 2025, 11:24:38 am
Re: Soft switchable 4/8 way?
« Reply #15 on: November 04, 2011, 10:16:06 pm »
"if the last good direction is UP and the next output from the joystick is UP/RIGHT, then make direction RIGHT",

I would want if the last good direction is UP and the next output from the joystick is UP/RIGHT, then DO NOTHING until there is only RIGHT.

Meaning just ignore the diagonals and only register the cardinals.


Can someone post an example of  MAME config file with the NOT function being used?

Something like Up = Up NOT Up/Left NOT Up/Right?

Is this possible?

Thanks

If you do this, and you roll the joystick, the game will register a return to center as the deadzone is hit right? It won't keep pressing in the last direction that was pressed. Works decent for Qbert, but nearly every other game has a problem with it.

I know some of you guys really want to avoid having another joystick on your cab, or another cab in the game room but lets think about this. You are building an entire cabinet to simulate the realism of an arcade cabinet. One of the last places you want to skimp is on the controls.