Insert Coin on MAME KODI Android TV
#1
Hello, the IAGL extension is very good for playing online games on Android TV. I can run several emulators and play games with a standard controller but when I launch a game in MAME I cannot "insert coin".

How to "insert coin" into MAME emulated arcade games?

I see in a video that this press the select button on the remote. On a website I read that "insert coin" is by pressing "select+right".

There is no option in Kodi's controls to assign the "select" function to a controller key by default, and yet the select function appears in a lot of Kodi menus.

What is the Select key as a general rule on any Kodi?
How can I insert coins into Kodi Retroplayer games using the MAME emulator with the LibRETRO API?

How can the select key be assigned to a standard remote?

When I press the "Select" key on my controller what happens is that Kodi goes "back" to the Kodi main menu, which seems like a normal function of this "back" key.
Reply
#2
Last time I tried playing an arcade game with FBNeo, the button located where the "select" button is on a SNES controller inserted a coin. On an Xbox 360 controller this is the Back button. On an Xbox One controller it's the overlapping rectangles button. On a PS4 controller it's the Share button.

MAME may require the select + right button combo to insert a coin. In that case, because kodi uses the Select button as a hotkey, make sure that Kodi doesn't intercept the combo. Looking at the FullscreenGame section in joystick.xml, this doesn't seem to be the case. However, the internal controller logic of Kodi's handling of the select button may still be interfering with MAME.

The best thing you can do is upload a debug log. If you provide one then I'll look into this further.
Reply
#3
(2024-01-01, 11:10)garbear Wrote: Last time I tried playing an arcade game with FBNeo, the button located where the "select" button is on a SNES controller inserted a coin. On an Xbox 360 controller this is the Back button. On an Xbox One controller it's the overlapping rectangles button. On a PS4 controller it's the Share button.

MAME may require the select + right button combo to insert a coin. In that case, because kodi uses the Select button as a hotkey, make sure that Kodi doesn't intercept the combo. Looking at the FullscreenGame section in joystick.xml, this doesn't seem to be the case. However, the internal controller logic of Kodi's handling of the select button may still be interfering with MAME.

The best thing you can do is upload a debug log. If you provide one then I'll look into this further.
Thanks for the help, I have partially solved it.
I don't really understand how you put a different controller than the Xbox one in MAME. This just gives me the ability to emulate Xbox's buttons with my gamepad.

It seems that the insert coin button is the "select" button which also corresponds to "back".
I have a pack of two wireless gamepads that are connected by the same USB receiver, but until now I only had one connected.
Both gamepads have a switch to define whether these are gamepad 1 or gamepad 2.
With gamepad 1 connected, when I press the "select" button instead of inserting coin, what happens is equivalent to pressing the escape key. Kodi returns to the main menu.
I tried pressing the switch and setting it to gamepad 2, but the result was the same.
I tried connecting the second gamepad and the result was the same.

However, upon restarting the system with both gamepads connected, the "select" button on gamepad 2 began to function as "insert coin" in MAME. Continuing gamepad 1 with the same effect.
I was investigating this issue and it has finally turned around.
Now with gamepad 1 when you press "select" it does "insert coin" and with gamepad 2 it does "back".

At this moment I have to know how I can play MAME with two gamepads on Android. In the games only player one works and I don't see how to make it possible for player two to start.
Reply
#4
Under the hood we use the "libretro API". Instead of having multiple controller profiles like Kodi, it relies on an abstraction called the "retro pad" as the only available input method (this is where the "Select" name comes from).

In order for Kodi to translate the info, it needs some metadata about the MAME core. It looks like I haven't created this metadata for the MAME cores yet. Without the info, Kodi defaults to a single 360 controller that gets translated to the retropad.

Specifically, we need two files: buttonmap.xml and topology.xml. You can see that I created them for the FBNeo core: https://github.com/kodi-game/game.libretro.fbneo/pull/4 and https://github.com/kodi-game/game.libretro.fbneo/pull/3 . These two files will need to be created for the MAME cores in order for multiple controllers to work.
Reply
#5
(2024-01-06, 02:36)garbear Wrote: Under the hood we use the "libretro API". Instead of having multiple controller profiles like Kodi, it relies on an abstraction called the "retro pad" as the only available input method (this is where the "Select" name comes from).

In order for Kodi to translate the info, it needs some metadata about the MAME core. It looks like I haven't created this metadata for the MAME cores yet. Without the info, Kodi defaults to a single 360 controller that gets translated to the retropad.

Specifically, we need two files: buttonmap.xml and topology.xml. You can see that I created them for the FBNeo core: https://github.com/kodi-game/game.libretro.fbneo/pull/4my location now and https://github.com/kodi-game/game.libretro.fbneo/pull/3 . These two files will need to be created for the MAME cores in order for multiple controllers to work.
It seems that generating metadata for the MAME core is important to allow multiple controllers to work in Kodi.
Reply
#6
(2024-03-06, 11:17)EiraJeremie Wrote: It seems that generating metadata for the MAME core is important to allow multiple controllers to work in Kodi.

Yes, the metadata is needed. I don't currently have time to make it, but it's just a couple XML files and I can assist in making them if you'd like to give it a try.

Otherwise, I plan to return to RetroPlayer development later this year, and can take care of this then.
Reply

Logout Mark Read Team Forum Stats Members Help
Insert Coin on MAME KODI Android TV0