MAMEWorld >> MAME Artwork: Official
View all threads Index   Threaded Mode Threaded  

Pages: 1

Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 880
Loc: The Room Next To You
Send PM


Stuck new
#388776 - 11/24/20 06:40 PM


Anybody know what input tag/mask I use for the Donkey Kong (dkong) joystick? I've tried P1, P2, IN0, IN1, IN2, DSW0, DSW2 and everything else referenced in the driver with no luck. The method used in the new ddragon file worked great for Pac Man and all of its variants, but here it doesn't work. It'd be great to know where I can look for this info for other games.



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4860
Loc: California
Send PM


Re: Stuck new [Re: Nightvoice]
#388777 - 11/24/20 08:09 PM


> Anybody know what input tag/mask I use for the Donkey Kong (dkong) joystick? I've
> tried P1, P2, IN0, IN1, IN2, DSW0, DSW2 and everything else referenced in the driver
> with no luck. The method used in the new ddragon file worked great for Pac Man and
> all of its variants, but here it doesn't work. It'd be great to know where I can look
> for this info for other games.


https://github.com/mamedev/mame/blob/563...dkong.cpp#L1051

So we have to reference dkong_in0_4 for the joystick and the one button, so the inputport should be IN0

https://github.com/mamedev/mame/blob/563.../dkong.cpp#L948

And we have to reference dkong_in2 for the start buttons and coin, so the inputport should be IN2

https://github.com/mamedev/mame/blob/563.../dkong.cpp#L996

Unable to test at the moment, but those should be correct for dkong.




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




Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 880
Loc: The Room Next To You
Send PM


Re: Stuck new [Re: Mr. Do]
#388778 - 11/24/20 10:29 PM


I tried IN0 and it's not working. I was thinking maybe it was some different kind of param... seems I've seen that in a couple of games. I guess I'll try out some other games and see if it works.



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 880
Loc: The Room Next To You
Send PM


Re: Stuck new [Re: Nightvoice]
#388822 - 11/29/20 01:23 AM


Ok, so I got dkong and its variants working. Turns out I had to change the mask addresses for a 4-way stick. Now the problem is games like 19xx and 1941, where both joysticks are assigned to the same port (IN0). What's the trick in that instance?



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn



Mr. DoAdministrator
MAME Art Editor
Reged: 09/21/03
Posts: 4860
Loc: California
Send PM


Re: Stuck [Re: Nightvoice]
#388824 - 11/29/20 01:42 AM


> Ok, so I got dkong and its variants working. Turns out I had to change the mask
> addresses for a 4-way stick. Now the problem is games like 19xx and 1941, where both
> joysticks are assigned to the same port (IN0). What's the trick in that instance?

I had problems with that, too, then Vas banged me in the head a couple times until it triggered me.

See update to nbajamte as an example. One element for both joysticks; mask for one is 0xf, while the other is 0xf00.

Looks like 19xx and 1941 will be similar to that.




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




7n004
MAME Fan
Reged: 01/11/19
Posts: 30
Send PM


Re: Stuck new [Re: Nightvoice]
#388828 - 11/29/20 02:51 AM


Inputraw method, really hard stuff to deal with!
You can go baldy with that. It should be a lua script or something to make mame echo the raw values while you press them in the terminal or screen, it would help A LOT!!

To find your default "defstat" or "inputmask" you take a look at the CPS2 driver for instance starting at L992

Look at "IPT_JOYSTICK_RIGHT" for player 1, you have '0x0001' for right, '0x0002' for left, etc. Add all those 4 values for right, left, down, up or 1 + 2 + 4 + 8 = 15, 15 hexadecimal is f or 0xf.

Do the same for player 2, 100 + 200 + 400 + 800 = f00

There you have it.

Sorry, the forum it's not helping today.



Nightvoice
MAME Fan
Reged: 03/19/10
Posts: 880
Loc: The Room Next To You
Send PM


Re: Stuck new [Re: 7n004]
#388829 - 11/29/20 03:13 AM


> You can go baldy with that. It should be a lua script or something to make mame echo
> the raw values while you press them in the terminal or screen, it would help A LOT!!
>

I concur. It would vastly aid this process more than any hook utility would. But I don't know enough about coding to know how involved it would be to add such a function. In the meantime, yours and Mr. Do's suggestions have enabled me to figure it out so far. It's making the control panel views far more useful than before. I'm REALLY glad I kept my source cpo files now.



----------------------
I have officially retired from sucking at everything I do. Life is much easier now.

My MAME/MESS artwork files: https://drive.google.com/open?id=1ABxeKgNIrKlIsyck7dx4V241NFQDWAF4
Related screen shots: https://drive.google.com/open?id=1U5IbvbVzYW97PuOOQuocvZFE_YJz7WIn


Pages: 1

MAMEWorld >> MAME Artwork: Official
View all threads Index   Threaded Mode Threaded  

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