Mame .37 beta 4 has alot of changes...


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]

Posted by Tom61 on 18, 2000 at 6:49 PM:

In Reply to: MAME Source looks like it already filters diagonals in 4-way games with nothing special required. Please read and comment... posted by jeoff krontz on 18, 2000 at 2:29 PM:

: I was looking at the MAME source today.

: In INPTPORT.C, it looks like for ALL joystick types the program filters out opposite directions being pressed at the same time.

opposite directions? that probably means you can't press left and right at the same time, probably for keyboard users...

: For 4-WAY joystick games, it filters out diagonals. It looks like as long as you've got the joystick going one direction, it will not let any other direction occur. So, if you are pressing up and start moving to the up-right diagonal, it will still register up. Once you've gone completely to right, that will kick in.

In beta 3, if you're going up in Pac-man, and press right, you start going right, meaning if you're using an 8-way and slip from up, to up-right you'll go right. Beta 4 handles this in the same way by default...

: If this is the case, why does an 8-way joystick cause problems (control issues) in 4-way games? Can someone take a look and let me know if my analysis is incorrect?

: This would also seem to indicate that the previously mentioned control configuration of using NOTs is not necessary. For instance, configuring UP as (UP AND NOT LEFT AND NOT RIGHT) wouldn't really make a difference.

: What does a real 4-way joystick do when in a diagonal? Does it register NO direction at all just like if it was in the center position?

You physically can't go diagonal on a 4-way stick.


hmm... I see what you meantioned... the peice of source for those that are interested:

/* avoid movement in two opposite directions */
if (joyserial[joynum][joydir ^ 1] != 0)
mask = 0;
else if (in->type & IPF_4WAY)
{
int mru_dir = joydir;
int mru_serial = 0;
int dir;


/* avoid diagonal movements, use mru button */
for (dir = 0;dir < 4;dir++)
{
if (joyserial[joynum][dir] > mru_serial)
{
mru_serial = joyserial[joynum][dir];
mru_dir = dir;
}
}

if (mru_dir != joydir)
mask = 0;
}
#endif



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]