MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Derrick Renaud
Discrete Coder
Reged: 10/18/03
Posts: 438
Loc: The Local Pub
Send PM
Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits?
04/27/12 04:34 PM


I have stated the reason it was done, but you are free to agree or disagree as you see fit.

Remember MAME has to convert from any possible OS input to any possible game input port. It has nothing to do with what Windows or any other OS uses.

One of the other reasons is to be able to convert part of a signed OS axis to an unsigned MAME driver input port.

eg: you may want to map 1/2 of your OS joystick axis to an unsigned 16 bit game driver port in MAME. so you need half of +/- 65535 on the OS part side to easily map to 0 to + 65535 for the MAME driver. To give an example, would be to use half an OS joystick axis as a gas pedal in the emulated game.

In case you don't know, you can select any of full axis, - axis, + axis of the OS analog input to be used for MAME input.

Personally I would have used 16bit +32767/-32768 because I do not know of any game with an analog port greater then that. Also 1 bit per relative (eg mouse) input. But the decission was made to be as universal as possible to cover any future unseen case.

Again it was not my decission, so do whatever you like. That is the joy of open source code.

FWIW, changing it to 16bit, will not change the driver speed or latency in any real sense.

As to my question of why you would want to modify all drivers, I say again why? That is a step backwards that would have to be maintained in 1000s of drivers. Currently everything is handled in the game drivers by simple PORT_ macros that link a port to properly sized OS data. Your not liking 17bit OS data should have no affect on the drivers.


Do not p-mail me for help compiling my updates, ask on the board.
Do not request sound for your favorite game. I work on whatever, when I get around to it.
If you have schematics for discrete sound games not easily found on the net, I would be interested.







Entire thread
Subject Posted by Posted on
* Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Bryan Ischo 03/23/12 12:08 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/26/12 01:41 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Derrick Renaud  04/26/12 04:06 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/26/12 07:13 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Derrick Renaud  04/26/12 11:55 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/27/12 06:02 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Derrick Renaud  04/27/12 04:34 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/29/12 12:51 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/28/12 06:18 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Bryan Ischo  05/08/12 06:24 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  05/08/12 03:34 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? B2K24  04/06/12 10:11 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? mogli  04/01/12 04:55 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? R. Belmont  04/06/12 04:29 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? LazyCat  04/26/12 03:21 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? krick  04/27/12 05:23 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Derrick Renaud  04/24/12 08:06 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Ramirez  04/24/12 11:22 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Sune  04/08/12 07:07 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? R. Belmont  04/09/12 04:38 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? Sune  05/08/12 11:11 PM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? R. Belmont  05/10/12 12:21 AM
. * Re: Why are MAME INPUT_ABSOLUTE_{MIN/MAX} 17 bits? mesk  04/06/12 09:58 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 6 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 4554