Main > Main Forum
4-way stick in software?
seaner:
They should consider ignoring the diagonals until the previous direction is released. This is what I did in firmware and it works great. Anyone who is registered on the mame board might want to suggest that.
RandyT:
--- Quote from: seaner on March 22, 2003, 05:06:12 pm ---They should consider ignoring the diagonals until the previous direction is released. This is what I did in firmware and it works great. Anyone who is registered on the mame board might want to suggest that.
--- End quote ---
Ignoring the diagonals is essentially what the "sticky" mode does.
If I remember correctly, if you are moving left and then go to a diagonal, it still reads that you are going left. When you break the diagonal and hit "up", it then changes to up until the next clean direction change.
In my opinion, just ignoring the diagonals would really be bad (maybe not bad, but definitely not better) in any game other than Pac-Man because all movement would cease until you hit clean directions. Basically, one evil traded for another.
The only way to do this right is through physical restriction.
RandyT
seaner:
--- Quote from: RandyT on March 22, 2003, 05:41:11 pm ---In my opinion, just ignoring the diagonals would really be bad (maybe not bad, but definitely not better) in any game other than Pac-Man because all movement would cease until you hit clean directions. Basically, one evil traded for another.
--- End quote ---
Perhaps I didn't phrase it well enough... see the following progression for what I did. (this may or may not be how mame does it in s/w)
stick reported
------ ------------
east east
northeast east
north north
northwest north
west west
....
it's just selective masking. while any direction is asserted, its adjacent diagonals are masked until the initial direction is released.
_Iz-:
From what I understand from reading the mame source code, mame does it exactly backwards to this. If you're going left and move into an upper left diagonal, mame drops the left and immediately gives you up instead. With an 8-way stick with huge diagonals this can be very annoying. (drives me crazy on mine).
RandyT:
--- Quote from: seaner on March 22, 2003, 08:35:32 pm ---[
Perhaps I didn't phrase it well enough... see the following progression for what I did. (this may or may not be how mame does it in s/w)
stick reported
------ ------------
east east
northeast east
north north
northwest north
west west
....
it's just selective masking. while any direction is asserted, its adjacent diagonals are masked until the initial direction is released.
--- End quote ---
You have just described the "old" sticky mode according to the latest source. It should probably be noted that this mode was removed because it was driving people to recompile to get rid of it :).
It appears that this has been replaced with code that does what Iz described.
The big problem here is that no hardware or software can read minds (yet :) ). No code is ever going to be able to know whether you meant to go up or just accidentally drifted off from left and made a diagonal.
Lots of folks have thought long and hard about how to do this in code (and even in hardware!), with little coming from the effort. This is why Oscar has physical restrictors for sale :).
That doesn't mean that you have no chance of coming up with a solution no-one else has thought of, just that it's probably not too likely at this stage of the game.
RandyT