Main > Main Forum

The whole 8 way as a 4way joystick issue

Pages: << < (5/9) > >>

Druin:


--- Quote from: jerryjanis on May 07, 2003, 12:17:13 am ---I'm thinking that it would be a worthwhile software addition to Mame to set up the 4way joystick processing to work like that.

I realize that it wouldn't work quite as well as your circuit:  Do I have this right?  Windows is doesn't process keyboard key presses quickly enough to detect minute changes (like whether left or up was pressed first when hitting a diagonal).

--- End quote ---

That's right, it would just show up as 2 simultaneous keystrokes on a keyboard, can't differentiate the timing like that...it must be hardware to sense something like that

Druin:


--- Quote from: caykroyd on May 07, 2003, 01:31:59 pm ---Well, Druin, looks like I may be the only one on your side.  I actually built a digital logic solution and simulated it.  Just waiting for my parts to come in to implememnt it.  The way mine works is:

The output stays on the last single direction selected.  For example, if you are left, then go left/up, the output stays left until left is released.

I can understand this concept of "feel" and the 8ways not having a 4way feel, but like Druin, I want to see for myself.

I'm not sure of your electrical background, Druin, but the schematics are pretty simple.  A few NORs, inverters, and Latches, and you have the solution.  PM me if you need some help.

--- End quote ---

That's an approach I haven't thought of yet, latching just the 4way directions when they are hit....yeah that's simple enough to implement...

For tryout, rather than discreet logic I'd probably pull out my FPGA/CPLD development board, write some VHDL code to describe the logic, dump it in the chip and run it....I find that faster than breadboarding.

BUT one thing I can foresee with that going wrong....(though maybe a combination of your latching and some other concepts)....when I was just trying out the joystick last night physically moving and observing the actuator hitting the microswitches....when going from straight up, and attempting to go Left, I would end up going from straight up, to up-left-diagonal, without having released UP at all, even though I'm trying to go solid Left....

So your latches may not release Up in that case, and we're trying to go left....

So I'm trying to think of some fuzzy logic where we can try to intelligently look at where we're leaving, and what we're now registering on the joystick, and see what makes the most sense in what we would be trying to do in a  4 way frame of mind...

One problem is as someone said, if you're trying to aim Up, but are slightly left, thus hitting diagonal....then as was my case, I want to go left, I still stay diagonal and nothing is really registered as a change on the stick...

This is the part I have to observe on some LEDs or a scope and just try moving the 8way around and see what appears to happen.  Maybe there is no way out...

caykroyd:

A gate array would be good, but my implementation will just be (1) hex inverter, (2) Dual 3-input NOR, and (1) quad SR latch.  I ran a transient SPICE simulation with different directional pulses and it seems to work fine.

As far a some fuzzy logic I don't know that it is necessary.  If you are going from up to left, it usually isn't a slight movement.  You will most likely release up then actuate left.  once on left, you may actuate up again involuntarily, but the logic will stay left.  

But like I said, there are many skeptics so, until I implement it and play with it, I won't know for sure how well it works.

The next question is what type of switch to put on the CP?  I'd like a regular pushbutton that isn't momentary contact, but may have to use something not as good looking.  Any ideas for presentable switches for the CP?

Cue-Ball:

caykroyd,

It sounds like you're trying to use a hardware solution to do the same thing that Mame used to do in software (not register a change in direction until the "original" direction is released).  I think you're going to find this quite unsatisfactory.  While it might work decent enough on some games where your movement is restricted (Pac-Man, for example) it's probably going to feel slow and unresponsive for most 4-way games.  Kudos on your ambition and ingenuity, but in the end i don't think you'll be happy with the results you could have had by simply purchasing an E-stick.

Druin:


--- Quote from: caykroyd on May 07, 2003, 06:06:51 pm ---A gate array would be good, but my implementation will just be (1) hex inverter, (2) Dual 3-input NOR, and (1) quad SR latch.

--- End quote ---

When too many chips get involved I start to look at the cost and then I do the pros and cons of just springing for the $5 44 pin xilinx CPLD chip that Ican reconfigure...


--- Quote from: caykroyd on May 07, 2003, 06:06:51 pm ---The next question is what type of switch to put on the CP?  I'd like a regular pushbutton that isn't momentary contact, but may have to use something not as good looking.  Any ideas for presentable switches for the CP?

--- End quote ---

NO idea yet...but of course if you want to do a toggle on/off with a momentary, you can latch it





Pages: << < (5/9) > >>

Go to full version