| Main > Main Forum |
| real virtual mouse or mame joystick absolute mode? |
| (1/3) > >> |
| ulao:
Does anyone know of a real virtual mouse driver that is reads joystick moment , not a tool that just moves the mouse. Moving the mouse wont help in mame, I need an actual mouse driver that use a joystick to control it. or does anyone know how to make mame use a joy stick in absolute mode. FYI: if needed.. absolute mode: The cursor will appear in relation to the device. ( i.e like a mouse ). There are lots of tool out there that do this but they only move the mouse cursor and mame is looking at a mouse not the cursor Hope that made sense.... |
| u_rebelscum:
Do you mean a joystick in relative analog? Analog joysticks usually are absolute, and mice usually relative, and so mame treats them as such, respectively. Absolute joystick moving cursor: centered joystick = cursor in center of screen, move stick all left = cursor moves all to the left, return stick to center = mouse returns to center. Relative joystick moving cursor: center joystick means cursor doesn't move, the farther left the stick moved left makes the cursor move left faster (until it hits the edge of screen, but it's still receiving go left info), re-centered stick stops cursor wherever it got to. edit: Also, what do you want this for? There might be different ways around the issue. |
| ulao:
--- Quote ---Do you mean a joystick in relative analog? Analog joysticks usually are absolute, and mice usually relative, and so mame treats them as such, respectively. --- End quote --- Well so far all of my source said the opposite. Either way I need to do the reverse from the norm.. --- Quote ---Absolute joystick moving cursor: centered joystick = cursor in center of screen, move stick all left = cursor moves all to the left, return stick to center = mouse returns to center. Relative joystick moving cursor: center joystick means cursor doesn't move, the farther left the stick moved left makes the cursor move left faster (until it hits the edge of screen, but it's still receiving go left info), re-centered stick stops cursor wherever it got to. --- End quote --- Ok, we are on the same level... but if you in a game and your "marrio" lets say pushing right goes right, he never returns to the center. Now in the case of arkanoid I would want the paddle back to the center but it acts like mario. Pushing left just makes it go left, I want it to appear in relational to the stick. I found an app that did this for the mouse cursor and had to set it to absolute to get it right, but MAME reads the mouse, not the cursor so it didnt work. --- Quote ---edit: Also, what do you want this for? There might be different ways around the issue. --- End quote --- So there you have it, how do I get absolute mode to work..? Again for clarification as this is complicated to explain it seems: In the game arkonoid if you play with the mouse its 100% perfect. But IMO the mouse is not for gaming. So playing with a joystick its wrong in the sense that I move the joystick right the paddle starts to move WRONG!!! that is not how you play arkonoid LOL.. The paddle on the screen needs to match the position of the joystick location. In my case my joystsick is a dial so it make more sense to me that way.. Just like the NES version of the game that came with a dial.. I can not get mame to see the joystick as a dial to save my life. it only looks at the mouse. --- Code: ---joystick mouse left left right right center center 25% left 25% left etc... --- End code --- u_rebelscum , you the first person to understand my problem do you think it can be resolved, thx for you help.. |
| ulao:
OK here is the best I can do to explain. http://spawnlinux.dyndns.org/tmp/joystick.swf Can any one do that in mame with a joystick? |
| u_rebelscum:
Alright, that makes total sense, and I know how you're feeling. This is a mame/ROM issue, on how mame translates an (joystick's) absolute analog data to a game's relative analog data. Just for background (even though it sounds like you know already, but just in case), the original ROM is programmed to use relative analog input (spinner), and the joystick is absolute analog. Besides reprogramming the original game (not something approved by mameDev), here are three ways to translate absolute to relative: translate absolute analog to digital left/right and use mame's digitalspeed setting to simulate (fixed speed) relative analog, treat the absolute data as relative (probably scaled down by 10 to 16), or take current absolute value and subtract the prior absolute value to get the true relative change (plus maybe some scaling). Mame used to only the the first way, but has been able to the second on and off, depending on version number and input mapping. The third is what you want, and has some big reasons why official mame doesn't do it. *The original game isn't coded to use absolute inputs, so there is no way to "center" or "index" the game's location with the joystick's location. For example, a paddle might not start in the center at the start of the game, or might always start in the middle no matter how the joystick is possitioned. *The original game isn't coded to use absolute inputs, so scaling probably will be needed so joystick all left = game all left and same with right. *The original game isn't coded to use absolute inputs, so there's no way to keep the joystick and game calibrated to each other. This can be effected (both hidder and help) if mouse or left/right key are pressed in the middle of use. *Some games originally controlled with relative inputs don't work with this method. For example, Super Sprint or Super Offroad have tracks that turn more left than right and vice versa, so you couldn't complete these tracks with an analog stick translated this way. *Some people aren't like us and live in a relative world, and don't like this method for any games. For other not as fixed in relative, either way works okay for them. I'm not saying it can't be done. But it will take one of two methods. Hack mame to translate as you want, or find a deviant of mame that does this; just know that I don't think this will ever make it into official mame. The other way isn't easier: get a driver so the joystick absolute analog outputs can be seen as relative mouse movements, translated as you described. For example, the stick moves from center (call it 128,128 assuming 0 to 256 range) to 10% left (call it 115,128), mame sees mouse -13,0 movement, through RawInput API. The "easiest" way AFAIK is have the joystick treated as a lightgun mouse, which still works in absolute movements, but windows automatically translates to also relative mouse info since 99% of apps assume mouse data is always relative. Either way, I don't know of any deviant or driver that does either, and you'd need to set mame's sensitivity value for each game you want to play to the correct value, and do any calibration and (ongoing) recalibration as needed. FWIW, I tried to hack mame with above years ago, but never finished nor got it working even close to my satisfaction, and mame's inputs have changed so much since then that my edits don't fit anymore. |
| Navigation |
| Message Index |
| Next page |