MAMEWorld >> MAME Artwork: Official
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4742
Loc: California
Send PM
Re: Vas Crabb or Mr. Do: Request for Input
12/03/20 02:51 PM Attachment: bosco.zip 4017 KB (2 downloads)


> I've run into the same problem with Champion Baseball as I did with Bosconian: it
> won't read the upper left/lower right joystick positions (or vice-versa as was the
> case with Bosconian). Is there a bit mask hitherto unexplored? I initially thought it
> may have been a driver bug, but I'm not sure now that I've run into it twice. See
> attached.

Fix attached... probably better if I explain how the whole inputraw thing works (well, for joysticks at least):

This is the Input_Port settings for Bosconian joystick:

PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY

The default state and inputmask is the sum of all the port_bits that you are grouping together; in this case, u/r/d/l... 1+2+4+8=15, which is f in hex (10=a, 11=b, etc.)

The state in the element for each position is the sum of all the inputs, minus the input you are defining... so RIGHT = 15-2 = 13 = d... UP+LEFT = 15-1-8 = 6

On average, a 4/8-way joystick for many games will have an inputmask of 0xf, but U/D/L/R aren't always in the same order, so you can't always copy/paste from one game to another; only if the inputs are in the same order, with the same port_bits.



RELAX and just have fun. Remember, it's all about the games.








Entire thread
Subject Posted by Posted on
* Vas Crabb or Mr. Do: Request for Input Nightvoice 12/03/20 10:22 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Mr. DoAdministrator  12/03/20 02:51 PM
. * Re: Vas Crabb or Mr. Do: Request for Input MooglyGuy  12/03/20 10:06 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Mr. DoAdministrator  12/04/20 01:39 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Vas Crabb  12/05/20 07:46 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Vas Crabb  12/04/20 05:19 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Nightvoice  12/31/20 02:36 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Mr. DoAdministrator  12/31/20 06:25 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Vas Crabb  12/31/20 09:47 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Nightvoice  01/01/21 01:31 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Vas Crabb  01/01/21 09:02 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Nightvoice  12/04/20 09:34 AM
. * Re: Vas Crabb or Mr. Do: Request for Input Vas Crabb  12/04/20 10:36 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Nightvoice  12/03/20 04:04 PM
. * Re: Vas Crabb or Mr. Do: Request for Input Nightvoice  12/03/20 10:23 AM

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