Quote:
|
Originally Posted by ozrien
Dr. Joe,
The joystick interface does consist of 4 analog and 4 digital channels. We had intended to have 4 possible modes for gamepads with two analog sticks,
mode 0 - axis 1 XY, axis 2 XY - 4 channels used
mode 1 - axis 1 XY only - 2 channels used
mode 2 - axis 2 XY only - 2 channels used
mode 3 - axis 1 Y, axis 2 Y - 2 channels used
And you are correct in saying we can use the unused channels for digital values! In fact we intended to use the upper nibble of unused analog channels precisly to send digital button info. We're only using the upper nibble (MSb 4 bits) due to possible jitter in the analog transmission, 4 bits is overkill we know and we may change that to support more digital support.
So lets say a,b,x,y (XBOX controller) are decoded in one of the analog channels. And lets say a and x are pressed and b and y are not.
The data transmitted would be binary : 1010 1000 or 168(decimal).
the 1010 would be a-press,b-not,x-press,y-not.
the lower 1000 is ignored by the application. Since we can't ensure that a value of n won't be read as n-1 or n+1 on the OI side the lower nibble is set to the middle of the value range. This uncertainty is do to the jitter in the OI side.
The POV will be decoded as 4 buttons. I grew up on SEGA, there's no way we're not supporting this. The only trick would to implement application code to recognize up and left pressed together as up/left, which shouldn't be hard for most teams.
So the intended use we designed for was so that through a simple calibration mode you can set the number of analog channels and which axises to use (mode 0-3). This selection would determine the number of digital slots available, in which case the next step of calibration would be to pick which buttons you want to be included in the digital transmission, we were thinking of having an led blink the number of digital slots available(4 or 12). And to select a POV button you can simply press one of the POV buttons.
So somehow the user would enable calibration mode, i.e. jumper and power recycle perhaps
1) Choose which axis profile, either using lcd outputs from controller (which is a FANTASTIC idea) or maybe number of button presses.
2) Observe led blinks to see how many digital buttons you can have.
3) press the buttons you want decoded (max 4 or 12 depending on axis selection).
4) leave calibration mode and PLAY.
Settings are saved in EEPROM so you never have to do this again.
Now this IS NOT SET IN STONE. We could use the lcd outputs to select axis mode during runtime or better yet allow us to transmit 4 times the data through indexing. My only concern is that we don't make this so complicated that only veteran teams use this.
Omar Zrien
Cross The Road Electronics
|
I know it would be more work for you guys, but you may want to consider the option of hooking the thing up to a PC to set up the parameters. I suppose you have a serial port that you could use (though perhaps not RS-232 voltage levels?). If so, it would be pretty easy to make a set of menus folks could navigate using hyperterminal (or whatever your favorite terminal program is). Just a thought.
As to keeping the thing easy so rookies can use it, almost every team modifies the default code somewhat. I think you could pretty easily have them cut and paste code snippets without loosing too many of them.
Just one man's opinion.
Joe J.