Controllers and Keyboards
#1
A few questions on controllers & keyboards; I'm not sure if my questions are ahead or behind the current state of the coding; perhaps both. I've searched for hours trying to figure these out on my own.
  1. Is keyboard input supported yet for gameplay on MAME 2010 (or even using other emulators) within RC5.2?
  2. Can multiple controllers be used at the same time during gameplay? Kodi accepts input from all three of my controllers while not in gameplay (i.e. regular Kodi GUI), but once I start a game, only 1 controller is recognized and can provide input.
  3. One problem I have is with X-Arcade buttons mapped to the Left & Right "Triggers" (but no problem w/ Triggers on Gamesir controller). Pressing one of these buttons causes Kodi to continuously scroll through whatever list it is showing at the moment. I am wondering if there is some sort of 'dead zone' setting that can be applied to these mapped buttons for the +/- Z triggers? Or another solution?
  4. If a joystick is recognized as an X-Input device, will it only ever be recognized as a "Xbox 360-compatible controller"? In other words, if I want to distinguish my X-arcade button mapping & controls from my Gamesir button mapping & controls, I cannot do that as long as they are both seen as X-Input "Xbox 360-compatible controllers"? To make them different, would I have to put the X-arcade into DirectInput mode (which is seen as "X-Arcade 2") to be different from the Gamesir controller?
  5. If needed, while I have minimal knowledge on the subject, is there something I can help with to further 'map' or set up a controller addon for my X-Arcade device?
  6. Lastly, not really a controller question, but any games' ZIP files that contain *.bin or *.rom files won't play. Instead, the GUI opens up the zip file and lists the file contents rather than play the game. What am I doing wrong? 
My setup:
  1. Win 10 with Kodi 18 RC5.2.
  2. I can run most MAME 2010 games without problems.
  3. I have mapped my controller buttons without problems. Kodi and Windows recognize their input without problems.
  4. I have an X-Arcade Dual Joystick (no trackball). It is set up to be 'seen' as two separate joysticks. I just installed X-Arcade's "Tri-Mode USB" upgrade kit. In short this allows the joystick to be recognized as either of these choices below depending on mode selected:
    1. Keyboard
      1. Windows sees it as an "X-Arcade 2" Keyboard device
      2. Kodi sees it as a regular keyboard
    2. DirectInput Joystick
      1. Windows "Game Controllers" dialog shows "X-Arcade 2"
      2. Kodi's "Kodi.log" registers it as a joystick device named "X-Arcade 2"
    3. X-Input Joystick
      1. Windows "Game Controllers" dialog shows "Controller (X-Arcade 2)"
      2. Kodi's "Kodi.log" show it as a joystick device named "Xbox 360-compatible controller"
  5. I also have a Gamesir G4 wireless controller
    1. Windows "Game Controllers" dialog shows as "Controller"
    2. Kodi's "Kodi.log" show it as a X-Input device named "Xbox 360-compatible controller"
  6. Kodi log shows these 3 joysticks (2 for the Dual X-arcade and 1 for the Gamesir) in DirectInput mode
    1. new joystick device registered on addon->peripheral.joystick/0: X-Arcade 2
      new joystick device registered on addon->peripheral.joystick/1: X-Arcade 2
      new joystick device registered on addon->peripheral.joystick/2: Xbox 360-compatible controller
  7. Kodi log shows these 3 joysticks (2 for the Dual X-arcade and 1 for the Gamesir) in X-Input mode
    1. new joystick device registered on addon->peripheral.joystick/0: Xbox 360-compatible controller
      new joystick device registered on addon->peripheral.joystick/1: Xbox 360-compatible controller
      new joystick device registered on addon->peripheral.joystick/2: Xbox 360-compatible controller
Reply
#2
I will try to answer to the best of my abilities.

(2019-01-18, 09:53)Buzzsaw Wrote: [*]Is keyboard input supported yet for gameplay on MAME 2010 (or even using other emulators) within RC5.2?

No idea.

(2019-01-18, 09:53)Buzzsaw Wrote: [*]Can multiple controllers be used at the same time during gameplay? Kodi accepts input from all three of my controllers while not in gameplay (i.e. regular Kodi GUI), but once I start a game, only 1 controller is recognized and can provide input.

I believe currently Kodi only accepts input from the first controller when playing games. Plans to implement a "controller manager" are under way, but it is not coded yet. When controlling Kodi itself you can use any controller. Note that the first controller is chosen by your operating system, not by Kodi itself. If you have several controllers attached the order chosen by the OS may change between reboots (at least in Linux).

(2019-01-18, 09:53)Buzzsaw Wrote: [*]One problem I have is with X-Arcade buttons mapped to the Left & Right "Triggers" (but no problem w/ Triggers on Gamesir controller). Pressing one of these buttons causes Kodi to continuously scroll through whatever list it is showing at the moment. I am wondering if there is some sort of 'dead zone' setting that can be applied to these mapped buttons for the +/- Z triggers? Or another solution?

That looks like a bug in Kodi, which is treating a button like an axis.

(2019-01-18, 09:53)Buzzsaw Wrote: [*]If a joystick is recognized as an X-Input device, will it only ever be recognized as a "Xbox 360-compatible controller"? In other words, if I want to distinguish my X-arcade button mapping & controls from my Gamesir button mapping & controls, I cannot do that as long as they are both seen as X-Input "Xbox 360-compatible controllers"? To make them different, would I have to put the X-arcade into DirectInput mode (which is seen as "X-Arcade 2") to be different from the Gamesir controller?

No idea about this one.

(2019-01-18, 09:53)Buzzsaw Wrote: [*]If needed, while I have minimal knowledge on the subject, is there something I can help with to further 'map' or set up a controller addon for my X-Arcade device?

No idea about this one.

(2019-01-18, 09:53)Buzzsaw Wrote: [*]Lastly, not really a controller question, but any games' ZIP files that contain *.bin or *.rom files won't play. Instead, the GUI opens up the zip file and lists the file contents rather than play the game. What am I doing wrong? 

In the Retroplayer cores I have tried (consoles) when you click on a ZIP file Kodi opens it. Then, if you click on the ROM Retroplayer starts the emulation. ZIP files for console only have one ROM each and it is easy to know the cores required to play the ROM inspecting the ROM extension or contents. For MAME, however, each ZIP files has several ROMs with totally arbitrary filenames and file contents. MAME requires the ZIP file itself as an argument.

Differentiating between console ZIP files and arcade (MAME) ZIP files is a very complicated problem and at the moment I'm not sure how Kodi deals (will deal) with it.
Reply
#3
(2019-01-19, 14:57)Wintermute0110 Wrote: In the Retroplayer cores I have tried (consoles) when you click on a ZIP file Kodi opens it. Then, if you click on the ROM Retroplayer starts the emulation.
 Sadly, not every emulator behaves that way. Lynx, MSX or Sega emulators, among others, require the unpacked ROM. That's why it would be nice if AEL supported automatic unzipping (like IAGL does).
Reply
#4
(2019-01-20, 14:32)ghizzu Wrote:
(2019-01-19, 14:57)Wintermute0110 Wrote: In the Retroplayer cores I have tried (consoles) when you click on a ZIP file Kodi opens it. Then, if you click on the ROM Retroplayer starts the emulation.
 Sadly, not every emulator behaves that way. Lynx, MSX or Sega emulators, among others, require the unpacked ROM. That's why it would be nice if AEL supported automatic unzipping (like IAGL does).

Yes, running ROMs inside ZIP files is supported by some cores but not all of them.

I will include it in the TODO list (decompress ROMs for console platforms). I have to investigate further about how to run MAME ROMs with RP.
Reply
#5
I use the Yatse app on on my phone as a remote. If I press enter on the zip it opens it and shows the contents. If I press the options button it has the option "play game". If I choose the play game option it launches the game. I can then use my controller for game play. Hth
Raspberry Pi 3 B > Libreelec 9.2.1 > Amber Skin
RPI > Bravia KDL46WE5 > Optical > AMP
Synology DS411J NAS > 100mb Ethernet > RPI
Reply
#6
Hi everyone, 1st of all thanks for your contributions to Kodi and its community/userbase.

I recentrly bought a cheap blutooth LED lightstrip controller like this for few bucks:
Image
Its (own ?) Android app it is called "duoCol Strip" and it's very basic but can't - of course - mimic Philips' Ambilight functionality (to be honest the seller don't exactly claims this, but it's often selled as a part of "DIY TV backlight LED Kit").

I don't know if it's possible to use/create a Kodi-addon to control it, anyway here are some interesting Web resources that may help/inspire you (sorry if you already know):
Reply
#7
(2019-07-05, 12:33)forart.it Wrote: Hi everyone...
 
Sorry, I've posted in the wrong place. Please delete.
Reply
#8
Can multiple controllers be used at the same time during gameplay? Kodi accepts input from all three of my controllers while not in gameplay (i.e. regular Kodi GUI), but once I start a game, only 1 controller is recognized and can provide input.

-> This is dependent on the core being used (yes, this is strange). For instance, it does not work on Genesis core but works on the SNES one.

On pure Retroarch (not retroplay), all works well.
Reply
#9
(2020-11-30, 12:52)elvanor Wrote: Can multiple controllers be used at the same time during gameplay?

TTBOMK no.

(2020-11-30, 12:52)elvanor Wrote: On pure Retroarch (not retroplay), all works well.

Retroarch and Kodi are totally different frontends of the libretro API and currently Retroarch has many features that Kodi still lacks.
Reply
#10
(2020-11-30, 13:43)Wintermute0110 Wrote:
(2020-11-30, 12:52)elvanor Wrote: Can multiple controllers be used at the same time during gameplay?

TTBOMK no.
As I wrote, this works on certain cores and does not work on others.
Reply
#11
This is kind of new subject, but entirely in the scope of the Post Subject. Please, let me know if I should open a new thread.

I am trying to use Stella Atari 2600 emulator add-on. Its button map has a great amount of keys:
Code:
<buttonmap version="2">
  <controller subclass="0" type="RETRO_DEVICE_JOYPAD" id="game.controller.atari.2600">
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_B" name="fire"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_UP" name="up"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_RIGHT" name="right"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_DOWN" name="down"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_LEFT" name="left"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_START" name="reset"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_SELECT" name="select"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_L3" name="color"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_R3" name="bw"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_L" name="leftdifficultya"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_L2" name="leftdifficultyb"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_R" name="rightdifficultya"/>
    <feature mapto="RETRO_DEVICE_ID_JOYPAD_R2" name="rightdifficultyb"/>
  </controller>
</buttonmap>
(addons\game.libretro.stella\resources\buttomap.xml)

My similar Atari 2600 controller (joystick), though, has only five:
Code:
<buttonmap>
  <device axiscount="2" buttoncount="3" pid="E501" vid="0810" provider="directinput" name="Atari C64 Amiga Joystick v3.1">
    <configuration/>
    <controller id="game.controller.atari.2600">
      <feature name="down" axis="+1"/>
      <feature name="fire" button="0"/>
      <feature name="left" axis="-0"/>
      <feature name="right" axis="+0"/>
      <feature name="up" axis="-1"/>
    </controller>
  </device>
</buttonmap>
(userdata\addon_data\peripheral.joystick\resources\buttonmaps\xml\directinput\Atari_C64_Amiga_Joystick_v3.1_v0810_pE501_3b_2a.xml)

The problem: it is needed at least more two keys so the emulator can work ("Select" and "Reset") and my controller does not have any more buttons... Isn't there a way to map keyboard keys for the additional features, but still use the controller? Those keys, on the original game console are on the console, not on the controller, thus they are missing on the controllers. On actual Stella emulator, we can configure two controllers (two players) and also keyboard and/or mouse working in parallel. Maybe there is a limitation on the libretro version of the emulator, on libretro API or on Kodi implementation.
Reply
#12
(2022-12-19, 23:15)helviojr Wrote: The problem: it is needed at least more two keys so the emulator can work ("Select" and "Reset") and my controller does not have any more buttons... Isn't there a way to map keyboard keys for the additional features, but still use the controller? Those keys, on the original game console are on the console, not on the controller, thus they are missing on the controllers. On actual Stella emulator, we can configure two controllers (two players) and also keyboard and/or mouse working in parallel. Maybe there is a limitation on the libretro version of the emulator, on libretro API or on Kodi implementation.

Unfortunately now there's no good option for this. My next feature is the Player Manager, which is basically an unlimited mapper. You can have multiple controllers or keyboard keys mapped to all the Atari buttons you need.

The bad part is I have no ETA on the player Manager. I did manage to get a lot of the framework into v20 though with the addition of the new Port Setup dialog.
Reply

Logout Mark Read Team Forum Stats Members Help
Controllers and Keyboards0