@substring Would that also work for mk_arcade_joystick_rpi? I have opened another thread about that.
Posts made by Flavor
GPIO Controller Input (as keyboard or joystick)
I have a system that uses GPIO for input. I would like to map them to a joystick or keyboard.
To map the GPIOs as a joystick, I have used mk_arcade_joystick_rpi, but my GPIO aren't set up the same as what is shown in https://github.com/recalbox/recalbox-os/wiki/GPIO-controllers-(EN)
The 0.1.5 version of mk_arcade_joystick_rpi should allow a custom map, but that doesn't seem to be included in Recalbox. In fact, I would prefer to use the version at https://github.com/TheFlav/mk_arcade_joystick_rpi, but I would really prefer to not mess with adding a driver unless it's quite easy for others to add. Is there an easy way for a user to add a newer version of mk_arcade_joystick_rpi to their Recalbox?
If not, the alternate plan could be to use GPIO as a keyboard. While some may think that this causes the same problem, it's actually not widely known that all you really need is a .dtbo and some config.txt entries like
#a = a = OK
After that, you can easily navigate the menu system, but the mappings do not seem to work inside of any emulator or Kodi. I wonder if it is because each GPIO button is acting as a separate keyboard. If I run evtest, it looks like this.
No device specified, trying to scan all of /dev/input/event*
I guess I'm looking for ideas here. Is there an easy way for me to build a version of https://github.com/TheFlav/mk_arcade_joystick_rpi and add it to a Recalbox install? Is there a pre-built version of mk_arcade_joystick_rpi v0.1.5 available somewhere? Is there a way to get the keyboard input working?
RE: Kodi + fbcp
@substring Oh, yeah, nice! :) It's good to get him (popcornmix) involved, then.
The big thing for me would be to publish the info so that other people could easily get Recalbox (and Kodi inside of it) running on their hardware. It kinda blows the idea out of the water if people would need to recompile Kodi. Setting some configs would be acceptable.
RE: Kodi + fbcp
New data ( @substring ):
If fbcp is running while Kodi starts, it will choke and put the LCD in an unusable state. If you kill fbcp and start it a second time, it will still be unusable.
If you know that starting Kodi will fubar the LCD/fbcp, then you can gracefully exit fbcp, start Kodi, and then restart fbcp. This works.
Now, how do I tell Kodi to start fbcp after Kodi is done with it's HDMI SetNativeResolution changes? To the user, it probably wouldn't even be noticeable.
BTW, I have also posted at https://forum.kodi.tv/showthread.php?tid=329080&pid=2709135#pid2709135 which sparked this idea. I figured I'd also ask the same question here, since maybe it's something you would know how to implement (kill fbcp, start Kodi, restart fbcp).
RE: Kodi + fbcp
@substring I get that. Thanks! I was actually thinking that it was something to do with Recalbox and how it starts Kodi, but the further we discuss and the more I search, I think I may need to ask the Kodi experts.
If I can find anything more about Kodi, I will try to remember to report back here.
I will look at the built-in kernel fbcp, too. I actually usually use a modified fbcp that does some other functions (something like overscan and status icons), but I really liked how Recalbox had the ability to just turn on fbcp in the config. There's also another guy that I'm in contact with that is making a fbcp that's specific to the LCD's chipset. That one is expected to be faster, and I hope that it can overcome this resolution issue.
RE: Kodi + fbcp
@flavor I was searching for some more info, and I found that I could put tvservice in monitor mode.
# tvservice -M
Starting to monitor for HDMI events
If I run any emulators, I won't get any output. I think this is because I have set global.videomode=default
When I run Kodi, I see this output.
[I] HDMI in DVI mode
That's when the LCD (fb1) stops responding.
RE: Kodi + fbcp
@substring Okay. I think I built the support archive. I just SSH'd in and ran /recalbox/scripts/recalbox-support.sh
It does use an SPI screen, but it's only 320x240 so updates are not that intensive. I think you would be surprised with the speed. This machine runs fine with RetroPie, but I am not as familiar with Recalbox.
I will say that someone else has tried running Kodi on RetroPie and may have the same issue. This issue is common to fbcp. fbcp is copying from fb0 to fb1, and it does not like parameters of fb0 to be changed at all. Once that happens, the LCD (fb1) will just freeze. That will happen if you select a custom resolution for an emulator.
It appears that the same thing is happening with Kodi, but the resolution (as reported by 'tvservice -s') doesn't seem to change. That's why I think Kodi (or the scripts that call Kodi) must be resetting the HDMI (even if the same resolution is being used).
I do not think this has anything to do with the LCD's FPS or the SPI clock. The emulators will act the same way if they are allowed to set the resolution. This is a known issue with using fbcp, as far as I know.
Is there a way to tell if Kodi is trying to configure the fb0 resolution? Is there a way to block it?
I'm not opposed to trying a bunch of stuff, but I just don't know where to look. I'm not really much of a Kodi user, so I am not used to it at all.
Thanks for the help!
Kodi + fbcp
I'm using fbcp to run a small TFT LCD. It works pretty well, but fbcp will choke if anything tries to mess with the HDMI setting. I think that it will even choke if the process tries to set the HDMI to the same setting it previously was.
When I launch Kodi, fbcp will choke, and the LCD will freeze. If I kill fbcp and restart it, it doesn't help. I think it won't re-init the LCD.
If I don't start fbcp at bootup, run Kodi (using the HDMI), and then run fbcp (via SSH session), the LCD will be fine.
How can we stop Kodi from messing with the HDMI.
By the way, all emulators had the same problem before I set
It seems that Kodi doesn't conform to these settings?
If I do 'tvservice -s' before and after running Kodi, I don't see a difference, but I'm sure it's doing something fbcp doesn't like.