jamma device numbers change every reboot

Installing ARpiCADE for the first time? Having issues? Check here first for solutions and tips on installing.

Moderator: dee2eR

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

jamma device numbers change every reboot

Post by bash64 » Sun Aug 21, 2022 11:10 pm

My jamma joysticks change device numbers on every reboot.
For example: turbo pacman uses joy 3, on next reboot joy 3 changes to joy4 and i have to resetup the controls.
Since I stream and entertain this is beyond annoying and really hurts my ability to play games.
3 of my sticks are usb and i can use udev in linux to map them to the same joy number every boot.
but i cant control the jamma sticks the same way.
is there any way to do this?
thanks

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Mon Aug 22, 2022 12:27 am

i just finished some research on this.
i booted and my main joy came up as joy4 when selecting it using mame
i kept rebooting until it said it was joy2.
i tested js0 in linux and its the same joystick
its not a linux issue
its a mame issue

linux always sees that joy as js0

not sure what controls how mame numbers joysticks but i have to find it.
before i go nutz

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Mon Aug 22, 2022 12:30 am

i think this answers the issue:
https://docs.mamedev.org/advanced/devicemap.html

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: jamma device numbers change every reboot

Post by dee2eR » Mon Aug 22, 2022 3:55 am

Can you assign your USB controls to /dev/input/js3 (and above)? If you can't re-assign the JAMMA inputs that may be a way around them and the hotkeys using js0 (p1), js1 (p2) and js2 (part of the hotkey system).

EDIT: just saw your updates... weird that MAME is remapping if they appear right to the kernel... is that over all MAMEs or a particular version?

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Mon Aug 22, 2022 4:48 pm

i have my 3 usb sticks mapped to joy 4,5,6 using linux on boot
linux maps the jamma joys to js0 -> js3

according to the article i found mame is the goofball in the room.

I was able to use mame230 to get the device id's for my jamma sticks
mame172 doesnt output that info

to get the info change to the mame folder:
>cd /home/pi/mame230

then run the mame binary and use the verbose switch as such
>./mamearcade -v

to preserve a copy redirect the output to a text file as such
>./mamearcade -v >joy.txt

i am making a mapdevice xml file to permanently assign all jamma devices to specific names like joy1->joy3

i will share it when i get it tested

apparently i can do this also for the usb joysticks rather than having linux do it using udev rules.

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Mon Aug 22, 2022 5:42 pm

Using the mame230 verbose output which shows the device id's for my jamma joysticks I was able to make this file called jamma.cfg:

<mameconfig version="10">
<system name="default">

<!-- Jamma Version 1.0 input configuration file -->
<input>
<mapdevice device="0300000009d200001105000011010000" controller="JOYCODE_1" />
<mapdevice device="15000000010000000100000000010000" controller="JOYCODE_2" />
<mapdevice device="0000000058626f782047616d65706100" controller="JOYCODE_3" />
<mapdevice device="15000000010000000200000000010000" controller="JOYCODE_4" />
<mapdevice device="15000000010000000300000000010000" controller="JOYCODE_5" />
<mapdevice device="15000000010000000300000000010000" controller="JOYCODE_6" />
</input>
</system>

</mameconfig>



will it work, have no idea.
it seems only mame172 and higher support this and have a ctrlr folder for controller configs.

gonna give it a try

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: jamma device numbers change every reboot

Post by dee2eR » Sun Aug 28, 2022 4:46 am

Did you have any luck with it?

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Sat Sep 03, 2022 4:51 am

been in hospital many days.
will get to it.

dee2eR
Inventor
Inventor
Posts: 1860
Joined: Tue Aug 22, 2017 2:07 pm

Re: jamma device numbers change every reboot

Post by dee2eR » Sat Sep 03, 2022 6:49 am

I hope you are OK. Get well soon.

bash64
Contributing Member
Contributing Member
Posts: 38
Joined: Tue Mar 22, 2022 6:40 am

Re: jamma device numbers change every reboot

Post by bash64 » Sat Sep 03, 2022 3:44 pm

I got this last night. Its a blast.

New version of donkey kong. Self sontained with mame and everything you need.
Dedicated to our favorite Australian dk player Allen Staal and his outrageous antics.
run the allenkong.bat file


https://mega.nz/file/aUxRWTTS#c87bx0OEp ... OHuMt0NDCA

Post Reply