Main > Main Forum

Fixing MAME's handling of 12-position rotary controls

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

rdagger:


--- Quote from: Teknique on January 31, 2006, 06:56:12 am ---Can you post your sensitivity settings and anything else you did in the tab menu to make it work as flawlessly as you have so the rest of us can test her out?
Thx.

--- End quote ---

Here's a screen shot of my settings.  For some reason I could not use ESC to asssign None to the controls I did not want, so I just set everything unnecessary to NumPad numbers.  The game seems to work perfectly now using the keyboard presses to fire a single rotation.

PetitMorte:

Something that I'd like to point out about Ikari, is that even though it has a 12-way joystick that creates "raw" output, the game itself doesn't care which way the joystick is rotated at the start.

If you draw an arrow on the joystick to correspond to the way your guy is facing, then rotate it so he is pointing left and then die, when you start a new game, the guy doesn't start out pointing left.  They always get off the plane facing up, no matter how you started the joystick.

Since it doesn't remember the state of the joystick from play to play, then it's not actually dealing in "raw" input.  It's just turning it into ROTATE-LEFT and ROTATE-RIGHT and using that to play.

RobotronNut:


--- Quote from: PetitMorte on January 31, 2006, 02:09:10 pm ---Since it doesn't remember the state of the joystick from play to play, then it's not actually dealing in "raw" input.  It's just turning it into ROTATE-LEFT and ROTATE-RIGHT and using that to play.

--- End quote ---

the ROM definitely sees raw input. the ROM itself must be turning it into rotate-left and rotate-right internally.


u_rebelscum:

FWIW, different roms "read" the raw input differently. :)

A. Some had  the switches connected to a hardware counter, and the counter sends the rotation number of the direction faced.  Mame emulates the counter "in software" by letting the mouse counter do the counting.

B. Some have each direction mapped to memory, with the one bit of the closed switch one the rest off (or visa verse).  Mame emulates the switches "in software" by taking the mouse counter number and looking up the binary number in a table.

Examples:
Pretend the switches are numbered like a 12 hour clock.
If the closed switch is pointing to 3 o'clock, the memory could be seeing one of the following:
03 (if numbered from 1 to 12)
02 (if numbered from 0 to 11)
001000000000 (if bits started from left side, aka "msb", or 200 in hex)
110111111111 (if bits started from left side, aka "msb", or DFF in hex)
000000000100 (if bits started from right side, aka "lsb", or 4 in hex)
111111111011 (if bits started from right side, aka "lsb", or FFB in hex)

OTTOMH, I've seen mame map to memory in four of the six ways in the example in the dozen or so games that are emulated in mame.  :o

If all 12 switches were connected, the later (the last four in the example) could have mame passing the data "raw".  The former (the first two examples) means mame would emulate the counter in software.


Also, I think the difference between PetitMorte & RobotronNut is just semantics.  The thing to note is that the ROM does interally change to rotate left/right x times (up to 5 positions in the games I tested), but expects the "raw" inputs (see above for what that means).  If the the interface the rotary is connected to translates to "rotate left/right", mame would need to translate it back* to the format the game expects.  And then the game translate back to rotate left/right. :)

*Actually the former means very little translation, and the later is just as easy as currently done.  It's just that you could skip that translation if you did send it raw, but only for those games that expect the raw data.


The games (cal .50) that used the loop 24 optical turned the player 12 positions.  These games could work okay with the 12way rotaries raw data, but would need special hacks.  Either translate to rotate left/right (mame, driver, or hardware), or make the 12way a mouse (through driver).  These games are emulated very well as a dial; they just have 24 detentes.


The 8way rotaries could also have rotate left/right hacked in to let the 12 way rotatries work.


AFA mame's inputs, they know it's not consistant.  However, a lot of it is the control of the original driver writer for that game, and his view on inputs.  And his access to different inputs.  (And the number of annoying "why doesn't this work?" (cough720cough) questions.:()  Note that most mame users only have a keyboard, moouse, & gamepad, and mame is limited to the PC's inputs and how the OS handles them.  And the drivers were written over years of changes.  Asking for input consistency is like game begging; it don't work. :-\ [shurg]

Mame's current loose policy is for inputs is:
No multiple input hacks, unless can't get anything else to work (then leave in the original commented out, and put in the hack)
No cheat input hacks
The input method works in mame, and fits in the mame/PC frame/limit of inputs.
The person in charge of the driver okay with the method

The biggest thing is "can't get anything else to work", "mame frame/limit", and "PC frame/limit" are open to interpretation.   :-\


My biggest peeve ATM with inputs is that mame doesn't handle multiple input types for the same input.  There's only a few games that have it, but those few have dip switch or F2 option set which type of input comes through the same port.  Great 1000 Miles Rally and Gauntlet Legends are two examples of games that could have one of two (or three in MM:GTMR2) totally different inputs plugged into the same port.  Mame doesn't have any way of picking one or the other (besides hacking): the type is set at compile time.  If mame was set up to handle these changes, switching between 12-way rotary "raw", rotary left/right, & mouse should be also doable.

Did I miss anything? ;)

XtraSmiley:

I'm just a little confused as to why the MAME guys don't want to fix this.  Has anyone tried to just email Aaron or post on his website?  I realize he hates when people contact them and beg for games, but this is a totaly different issue.  I don't mind doing it, but I just don't understand all the ins and outs yet.

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

Go to full version