MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


can mame emulate 4 ways joystick ?
#370137 - 10/06/17 12:46 AM


Hi,

Sorry if the topic has already been discussed but all I can find are old forums and nothing recent.

I was wondering if today mame could emulate a 4 ways joystick, using a 8 ways joystick (for, of course, games like donkey kong, pacman, and so on)

Thanks

jpettit



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370140 - 10/06/17 03:16 AM


It can emulate a 4-way joystick when using an 8-way joystick (or even an analog joystick), but it's never going to feel quite as tight as the real thing. 8-way joysticks with a restrictor plate to select 4-way mode don't feel as tight as real 4-way sticks either.



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: Vas Crabb]
#370145 - 10/06/17 09:18 AM


Thanks for the reply.
I agree nothing replaces a real 4 ways stick, but still, emulation would be a starter

I can't find the option in mame, where would that be ?

Thanks



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9711
Loc: ECV-197 The Orville
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370146 - 10/06/17 01:59 PM


> Thanks for the reply.
> I agree nothing replaces a real 4 ways stick, but still, emulation would be a starter
>
>
> I can't find the option in mame, where would that be ?

MAME knows what games had 4-way joysticks and automatically selects the emulation. You don't have to do anything.



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: R. Belmont]
#370148 - 10/06/17 02:05 PM


OK, so I guess that when pac man or donkey kong "freezes", it's a 8 ways joystick consequence I can't bypass by emulation :-(



anikom15
Instigator/Local CRT Guru
Reged: 04/11/16
Posts: 287
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370150 - 10/06/17 04:39 PM


A restrictor plate might alleviate the pain a bit.



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: anikom15]
#370156 - 10/06/17 06:39 PM


Yeah I thought of that but my sticks are exclusif 8 ways :-(

Anyway, I just played with mame options and in the options, the controler was set to "default".

I changed that to "slikstik_quad", not because I have a slikstik (don't even know what that is lol), but because it was "quad"

And after doing so, the 4 ways games worked much better, pacman or pang were playable

But my guess would be that I'm stuck with a 4 ways, even for 8 ways games, so I need to set this 4 ways controller on each game individually.

Is there a way to quickly configure one specific type of controler for a selected game list, and leave the default for all the other games ?
Is there is 4 ways filter list available for mame ?

Thanks !



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370160 - 10/06/17 08:10 PM


ok now after I've played with the controler settings, configuring individual games and default options, I can't get working the 4 way emulation anymore.

I really don't get it, even if I put slipstick_quad on global and individual settings, it just won't work anymore.

I'm going mad there...



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370163 - 10/07/17 12:09 AM


I finally understood my mistake.

When I switched controller to slipstick_quad, for some reasons UP and DOWN directions weren't configured anymore. So when I tested pang, it was working well because only LEFT and RIGHT were working.

So I'm back to square one, wondering how to emulate 4 ways in mame :-/



Rygar9
MAME Fan
Reged: 12/08/08
Posts: 52
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370165 - 10/07/17 12:36 AM


You really can't, not in a very satisfying way.

The problem is this: Your 8-way has Left, Left and Up, & Up. The game doesn't recognize Left and Up. So what do you do?

1. You can ignore Left and Up. This is ineffective because you stop dead as you transition between joystick positions which will frequently be fatal.

2. You can assume that Left and Up should be the last single cardinality direction input until you see the next single cardinality direction. So if you were going Left and you transition to Left and Up, the emulator treats it as Left until it sees Up by itself. I believe this is what Mame does (Someone correct me if I'm wrong?). The problem here is, if you're a sloppy player or have a fairly crappy joystick you may have a lot of problems hitting a true Up without the other directions since there's no physical restriction.

3. You can assume that Left and Up is the single cardinality direction not last seen. So if you were going Left, assume you're now going Up because the Player must be transitioning directions. But with sloppy play or crappy joysticks, you'll just seem to jump directions randomly and get really frustrated.

It's possible to try and minimize the problem, but without a true 4-way restriction there's always going to be some compromise made and people are going to lose games because of it.



evh347
Lurker
Reged: 01/05/04
Posts: 110
Loc: United States
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370173 - 10/07/17 05:29 AM


> ok now after I've played with the controler settings, configuring individual games
> and default options, I can't get working the 4 way emulation anymore.
>
> I really don't get it, even if I put slipstick_quad on global and individual
> settings, it just won't work anymore.
>
> I'm going mad there...

Create an ini file named as the rom/game you want to digitally restrict. The ini files go in Mame>ini>presets

I used an app called 'MameJoyMap' to make these...

2-way horizontal:
joystick_map 444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.

2-way vertical:
joystick_map 444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.

4-way:
joystick_map s8.4s8.44s8.4445

Tron:
joystick_map 788888889.4s88888s6.44s888s66.444555666.444555666.444555666.44s222s66.4s22222s6.122222223.

Q-bert diagonal 4-way:
joystick_map 4444s8888.4444s8888.444458888.444555888.ss55555ss.222555666.222256666.2222s6666.2222s6666.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: anikom15]
#370174 - 10/07/17 05:30 AM


> A restrictor plate might alleviate the pain a bit.

Doesn't really help. A restrictor plate changes the shape of the gate so you get substantial dead areas between the directions where you can no longer reach into diagonals. You don't get that snappy transition between directions.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: Rygar9]
#370175 - 10/07/17 05:33 AM


MAME actually does 3 from your list - it assumes going from a cardinal direction into a diagonal is a change in direction.



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: Vas Crabb]
#370179 - 10/07/17 09:54 AM


Maybe it would be best if mame assumed going from a diagonal to a cardinal would be a change of direction ?
Because 4 ways are only cardinals

I suppose it's complicated to change this kind of settings in mame

But bottom line : 4 ways restrictor would be the best alternative



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: evh347]
#370180 - 10/07/17 10:47 AM


Sorry I missed your post.

This MameJoyMap seems promising, I'm going to test it

How does it work exactly ?



evh347
Lurker
Reged: 01/05/04
Posts: 110
Loc: United States
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370183 - 10/07/17 03:25 PM


> Sorry I missed your post.
>
> This MameJoyMap seems promising, I'm going to test it
>
> How does it work exactly ?

You don’t really need the app because I already gave you the settings, but if you want the app it’s here:
http://www.headsoft.com.au/index.php?category=mame&page=joymap

I didn’t make the app.

You just need to create an ini file (a text file), put the text I posted in it, save it to the location I told you, and name it the name of the rom you want to digitally restrict.

I have ini files for all the games I want to digitally restrict. It makes Tron very playable with an analog flight stick, the 4-way games are tight, and q-Bert is very playable. I pair this with my Ultimarc U360 joystick. Unto this, I attached an Ultimarc Servostick. I use the Hyperspin front end with LEDBlinky.

Whenever I launch a game, it is detected as to whether it’s a 4-way or whatever, the restrictive plate automatically rotates to mechanically restrict the joysticks movement and with the help of the ini files I generated with the MameJoyMap app, it’s also digitally restricted. That makes the controls very tight.

Anyone who says q-Bert controls can’t be emulated isn’t using this method.



DiodeDude
Semi-Lurker
Reged: 09/28/03
Posts: 754
Send PM


Does MAME ignore diagonal input or treat them as strict U,D,L,R? new [Re: Vas Crabb]
#370184 - 10/07/17 04:06 PM


Seems the latter would yield better results.





> It can emulate a 4-way joystick when using an 8-way joystick (or even an analog
> joystick), but it's never going to feel quite as tight as the real thing. 8-way
> joysticks with a restrictor plate to select 4-way mode don't feel as tight as real
> 4-way sticks either.



jpettit
MAME Fan
Reged: 07/26/16
Posts: 27
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: evh347]
#370194 - 10/07/17 11:34 PM


It's working !!

Putting the .ini file in the preset folder did not work, but maybe it's because my front end is mameui.

What I did was modify the game.ini file in the ini directory, where the default joystick_map was set to "auto"

I changed "auto" to the "s8.4s8.44s8.4445" for instance for the 4 ways sticky.

Thanks a lot for your help



evh347
Lurker
Reged: 01/05/04
Posts: 110
Loc: United States
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: jpettit]
#370195 - 10/08/17 12:24 AM


> It's working !!
>
> Putting the .ini file in the preset folder did not work, but maybe it's because my
> front end is mameui.
>
> What I did was modify the game.ini file in the ini directory, where the default
> joystick_map was set to "auto"
>
> I changed "auto" to the "s8.4s8.44s8.4445" for instance for the 4 ways sticky.
>
> Thanks a lot for your help

Yeah, I always update to the latest version of Mame, so the path to your ini file might be different. Either way, you can see that it works. Have fun.



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


Don't drink and post new [Re: DiodeDude]
#370242 - 10/10/17 04:05 PM


> Seems the latter would yield better results.

There's no way to predict which direction the player wants to go when he hits a diagonal.

EDIT actually it would be hilarious if MAME just took a guess

S



Master O
Yes, Even Parodius Music
Reged: 11/20/06
Posts: 1332
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: evh347]
#370250 - 10/11/17 01:58 AM


> > ok now after I've played with the controler settings, configuring individual games
> > and default options, I can't get working the 4 way emulation anymore.
> >
> > I really don't get it, even if I put slipstick_quad on global and individual
> > settings, it just won't work anymore.
> >
> > I'm going mad there...
>
> Create an ini file named as the rom/game you want to digitally restrict. The ini
> files go in Mame>ini>presets
>
> I used an app called 'MameJoyMap' to make these...
>
> 2-way horizontal:
> joystick_map
> 444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.
>
> 2-way vertical:
> joystick_map
> 444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.444555666.
>
> 4-way:
> joystick_map s8.4s8.44s8.4445
>
> Tron:
> joystick_map
> 788888889.4s88888s6.44s888s66.444555666.444555666.444555666.44s222s66.4s22222s6.122222223.
>
> Q-bert diagonal 4-way:
> joystick_map
> 4444s8888.4444s8888.444458888.444555888.ss55555ss.222555666.222256666.2222s6666.2222s6666.

Out of curiosity, what do the various joystick_map numbers and letters correspond to? Do they represent the X any Y axes (axis-es)? [spelling]



"Note to Noobs:

We are glad to help you but simply posting that something does not work is not going to lead to you getting help. The more information you can supply defining your problem, the less likely it will be that you will get smart-alec replies.

C.D.~"



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: Don't drink and post new [Re: Sune]
#370251 - 10/11/17 02:07 AM


> > Seems the latter would yield better results.
>
> There's no way to predict which direction the player wants to go when he hits a
> diagonal.
>
> EDIT actually it would be hilarious if MAME just took a guess
>
> S

MAME _does_ "take a guess" as explained in the thread already - moving from a cardinal direction to a diagonal is interpreted as wanting to move to the next cardinal direction if you followed the circular path further.

If you move the stick from the neutral position straight into a diagonal, MAME previously chose horizontal or vertical randomly. It now chooses one deterministically, but I forgot which it was hap chose.



Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM


Drink and post new [Re: Vas Crabb]
#370252 - 10/11/17 04:36 AM


> > > Seems the latter would yield better results.
> >
> > There's no way to predict which direction the player wants to go when he hits a
> > diagonal.
> >
> > EDIT actually it would be hilarious if MAME just took a guess
> >
> > S
>
> MAME _does_ "take a guess" as explained in the thread already - moving from a
> cardinal direction to a diagonal is interpreted as wanting to move to the next
> cardinal direction if you followed the circular path further.
>
> If you move the stick from the neutral position straight into a diagonal, MAME
> previously chose horizontal or vertical randomly. It now chooses one
> deterministically, but I forgot which it was hap chose.

I guess I'll bust out my USB Competition Pro and find out.

S



MrBrow
MAME Fan
Reged: 11/27/19
Posts: 5
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: Master O]
#384430 - 11/28/19 08:11 AM



> Out of curiosity, what do the various joystick_map numbers and letters correspond to?
> Do they represent the X any Y axes (axis-es)? [spelling]

I ran across this thread on a web search and wondered the same thing. After cobbling together an explanation from various sources, I wrote up what I found here.



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4453
Loc: Melbourne, Australia
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: MrBrow]
#384433 - 11/28/19 10:12 AM


> > Out of curiosity, what do the various joystick_map numbers and letters correspond
> to?
> > Do they represent the X any Y axes (axis-es)? [spelling]
>
> I ran across this thread on a web search and wondered the same thing. After cobbling
> together an explanation from various sources, I wrote up what I found here.

That's a really good write-up. We might need to steal some of it for the MAME documentation.



MrBrow
MAME Fan
Reged: 11/27/19
Posts: 5
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: Vas Crabb]
#384438 - 11/28/19 02:16 PM


> > > Out of curiosity, what do the various joystick_map numbers and letters correspond
> > to?
> > > Do they represent the X any Y axes (axis-es)? [spelling]
> >
> > I ran across this thread on a web search and wondered the same thing. After
> cobbling
> > together an explanation from various sources, I wrote up what I found here.
>
> That's a really good write-up. We might need to steal some of it for the MAME
> documentation.

Thanks! Feel free to use it.



Envisaged0ne
MAME Fan
Reged: 08/29/06
Posts: 543
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: MrBrow]
#384473 - 11/29/19 09:51 PM


These are great! Thanks for posting them!!



Windows 11 64 bit OS
Intel Core i7-10700
Nvidia GeForce RTX 2060 6GB
32GB DDR4 RAM



Firehawke
Manual Meister
Reged: 08/12/06
Posts: 665
Send PM


Re: can mame emulate 4 ways joystick ? new [Re: MrBrow]
#384477 - 11/30/19 12:21 AM


While what we have on https://docs.mamedev.org isn't entirely the best description of how to set a joystick map up, it does pretty much cover the bases.

Nevertheless, our write-up absolutely could use some improvement and that's one of the projects I'm currently working on. I'm borrowing a few bits of your work to improve what we have, so I'd like to say thanks for the permission! I should hopefully have something suitable within a few days at most; the delay is going to be mostly hammering out phrasing a bit.



---
Try checking the MAME manual at http://docs.mamedev.org


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
1 registered and 24 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 7126