Kodi Community Forum
RetroPlayer Test Builds (updated for Nexus) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Game support (https://forum.kodi.tv/forumdisplay.php?fid=292)
+--- Thread: RetroPlayer Test Builds (updated for Nexus) (/showthread.php?tid=173361)



RE: RetroPlayer Test Builds (updated for Isengard) - fetzerch - 2016-01-04

(2016-01-04, 01:51)Steveb Wrote: The snes9x and snes9x-next cores seem to be missing the ../resources/buttonmap.xml.
I just copied the resources folder from the beetle-bsnes core to the snes9x and snes9x-next cores and they seem to working ok now.

Ups, I missed those files when making the two cores compatible again with recent RetroPlayer versions.
Created PRs for it so that it gets fixed with the next build: https://github.com/kodi-game/game.libretro.snes9x/pull/4 and https://github.com/kodi-game/game.libretro.snes9x-next/pull/3


RE: RetroPlayer Test Builds (updated for Isengard) - Heat - 2016-01-05

Tried the windows version, here's what I found:

-snes9x and snes9x next do not recognize input, default configuration is seen.

-Trying to start Super Mario World on a zip file with snes9x makes kodi crash. Trying some other zipped games didn't make kodi immediately crash, but if I stopped the game it crashes. Games that didn't even start were: Super Mario World (.smc), Donkey Kong Country (.sfc), Goof Troop (.sfc). Snes9x next didn't have this problem.


RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2016-01-05

(2016-01-04, 02:16)cfetzer Wrote: Ups, I missed those files when making the two cores compatible again with recent RetroPlayer versions.
Created PRs for it so that it gets fixed with the next build: https://github.com/kodi-game/game.libretro.snes9x/pull/4 and https://github.com/kodi-game/game.libretro.snes9x-next/pull/3

Thanks, merged.

(2016-01-05, 02:26)Heat Wrote: -snes9x and snes9x next do not recognize input, default configuration is seen.

Looks like this will be fixed in the next round of builds

(2016-01-05, 02:26)Heat Wrote: -Trying to start Super Mario World on a zip file with snes9x makes kodi crash. Trying some other zipped games didn't make kodi immediately crash, but if I stopped the game it crashes. Games that didn't even start were: Super Mario World (.smc), Donkey Kong Country (.sfc), Goof Troop (.sfc). Snes9x next didn't have this problem.

Can you open an issue at game.libretro.snes9x issues? Debug logs are helpful. This will give us a good place to consolidate per-core issues.


RE: RetroPlayer Test Builds (updated for Isengard) - Heat - 2016-01-05

(2016-01-05, 02:42)garbear Wrote: Can you open an issue at game.libretro.snes9x issues? Debug logs are helpful. This will give us a good place to consolidate per-core issues.

Opened an issue about it now.

https://github.com/kodi-game/game.libretro.snes9x/issues/5


RE: RetroPlayer Test Builds (updated for Isengard) - a1rwulf - 2016-01-06

(2016-01-02, 21:40)charlie0440 Wrote:
(2016-01-02, 18:56)a1rwulf Wrote: @charlie0440 I can reproduce the issue with the analog stick now.
Unfortunately I can't fix it easily and will have to start from scratch on my linux machine.

Glad you found the issue. Shame its not an easy fix. Will be greatly appreciated if you manage to fix it. n64 is my favourite platform for retroplayer

OK, I found the root cause - not sure where's the right place for the fix, have to talk to garbear.

Our buttonmaps for analog axis look like this: https://github.com/kodi-game/peripheral.joystick/blob/master/peripheral.joystick/resources/buttonmaps/xml/linux/Xbox_360_Wireless_Receiver_15b_8a.xml#L59

If you change the analogs to look like below, the analog stick will work in n64:
Code:
<feature name="analogstick">
                <up axis="-1" />
                <down axis="+1" />
                <right axis="+0" />
                <left axis="-0" />
            </feature>

Hope this helps for now.


RE: RetroPlayer Test Builds (updated for Isengard) - charlie0440 - 2016-01-06

Great. Will try tonight. Annoyingly I thought about trying that a while ago just never got around to it


RE: RetroPlayer Test Builds (updated for Isengard) - a1rwulf - 2016-01-06

I've been talking to garbear about this and I'm positive we have a proper way to handle it in the future.
For now, this will help.

Regarding your OE builds:
Be careful, the platform lib of kodi was renamed and I've been changing stuff in game.libretro and peripheral.joystick.
That means if you bump peripheral.joystick for example you'll also have to bump all other libs - just to save you some time.


RE: RetroPlayer Test Builds (updated for Isengard) - Shinoby92 - 2016-01-08

why isn't there any android build?


RE: RetroPlayer Test Builds (updated for Isengard) - zachmorris - 2016-01-08

A few bugs I believe I've ran across with the latest build as far as input goes:
1) PS Controllers dont map the L1/L2/R1/R2 buttons as expected. They're included in the configure input page, but when I launch a game and hit say the Cross button it registers. The log shows:
game.controller.ps feature [ cross ] released
but when I press L1/R1/L2/R2 they don't register and I get something like:
game.controller.default feature [ righttrigger ] released

2) I think SNES left and right bumper are swapped. I ran across a homebrew suite of roms for controller testing and what the 'game' is registering as left and right are opposite of what Kodi maps.
I hit the left bumper, Kodi registers:
game.controller.snes feature [ leftbumper ] released
but the right bumper shows toggled in game.

3) Not really sure if this is a bug or not. I'm using a PS3 controller and mapped the default/Kodi controller along with NES. I'm playing a mashing games type game for NES which only has two buttons and accidentally hit triangle (not mapped for the NES controller), the default controller mapping fires and my screen view mode is changed inadvertently. Is it possible to inhibit the other non-mapped buttons from triggering when its currently being used in a different core (except maybe the GUIDE button that brings you back to Kodi)


RE: RetroPlayer Test Builds (updated for Isengard) - a1rwulf - 2016-01-08

(2016-01-08, 03:13)Shinoby92 Wrote: why isn't there any android build?

because it's not ready for android yet


RE: RetroPlayer Test Builds (updated for Isengard) - a1rwulf - 2016-01-08

(2016-01-08, 07:55)zachmorris Wrote: A few bugs I believe I've ran across with the latest build as far as input goes:
1) PS Controllers dont map the L1/L2/R1/R2 buttons as expected. They're included in the configure input page, but when I launch a game and hit say the Cross button it registers. The log shows:
game.controller.ps feature [ cross ] released
but when I press L1/R1/L2/R2 they don't register and I get something like:
game.controller.default feature [ righttrigger ] released
Seems like a wrong buttonmap to me.
Can you post your buttonmap?

(2016-01-08, 07:55)zachmorris Wrote: 2) I think SNES left and right bumper are swapped. I ran across a homebrew suite of roms for controller testing and what the 'game' is registering as left and right are opposite of what Kodi maps.
I hit the left bumper, Kodi registers:
game.controller.snes feature [ leftbumper ] released
but the right bumper shows toggled in game.
I had this in n64 too (Z-Trigger etc.) - it may be related to the libretro gamepad mapping.
What SNES core did you use?

(2016-01-08, 07:55)zachmorris Wrote: 3) Not really sure if this is a bug or not. I'm using a PS3 controller and mapped the default/Kodi controller along with NES. I'm playing a mashing games type game for NES which only has two buttons and accidentally hit triangle (not mapped for the NES controller), the default controller mapping fires and my screen view mode is changed inadvertently. Is it possible to inhibit the other non-mapped buttons from triggering when its currently being used in a different core (except maybe the GUIDE button that brings you back to Kodi)
I think to some extend this is works-as-designed.
For example you can rewind/fast-forward NES and SNES games, with the triggers of a xbox controller, when you map the default controller accordingly.
However with the side-effect you did encounter.
@garbear: Is there anything planned already (maybe switching to a different default map, while playing a game)?


RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2016-01-08

(2016-01-06, 12:32)a1rwulf Wrote: OK, I found the root cause - not sure where's the right place for the fix, have to talk to garbear.

Our buttonmaps for analog axis look like this: https://github.com/kodi-game/peripheral.joystick/blob/master/peripheral.joystick/resources/buttonmaps/xml/linux/Xbox_360_Wireless_Receiver_15b_8a.xml#L59

If you change the analogs to look like below, the analog stick will work in n64:
Code:
<feature name="analogstick">
                <up axis="-1" />
                <down axis="+1" />
                <right axis="+0" />
                <left axis="-0" />
            </feature>

Hope this helps for now.

I have fixed this issue. The fix was to make each axis on the analog stick "two-dimensional", where each dimension was a button (0.0 or 1.0) or an analog axis (continuous in [0.0, 1.0]). Then simply subtract them. Here's what it looks like:

Code:
.
    /*      Positive axis:  1.0 (User presses right or analog stick moves right)
     *      Negative axis:  0.0
     *      -------------------
     *      Pos - Neg:      1.0 (Emulated analog stick moves right)
     *
     *
     *      Positive axis:  0.0
     *      Negative axis:  1.0 (User presses left or analog stick moves left)
     *      -------------------
     *      Pos - Neg:     -1.0 (Emulated analog stick moves left)
     *
     *
     *      Positive axis:  1.0 (User presses both buttons)
     *      Negative axis:  1.0
     *      -------------------
     *      Pos - Neg:      0.0 (Emulated analog stick is centered)
     *
     */

This should allow controlling N64 with the arrows on the keyboard (or even opposing triggers)

(2016-01-06, 20:27)a1rwulf Wrote: Regarding your OE builds:
Be careful, the platform lib of kodi was renamed and I've been changing stuff in game.libretro and peripheral.joystick.
That means if you bump peripheral.joystick for example you'll also have to bump all other libs - just to save you some time.

I've applied this patch onto my input work. I'll do the same for RetroPlayer 15.2 and game.libretro. That way, we just keep the p8-platform branch rebased on master, and things will work. Then we can revert that patch when we're ready.


RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2016-01-08

(2016-01-08, 07:55)zachmorris Wrote: A few bugs I believe I've ran across with the latest build as far as input goes:
1) PS Controllers dont map the L1/L2/R1/R2 buttons as expected. They're included in the configure input page, but when I launch a game and hit say the Cross button it registers. The log shows:
game.controller.ps feature [ cross ] released
but when I press L1/R1/L2/R2 they don't register and I get something like:
game.controller.default feature [ righttrigger ] released

The PS layout is defined by layout.xml

Code:
<layout name="PS" label="30000" image="layout.png">
    <face>
        <button name="cross" type="digital" label="30001"/>
        <button name="circle" type="digital" label="30002"/>
        <button name="square" type="digital" label="30003"/>
        <button name="triangle" type="digital" label="30004"/>
        <button name="start" type="digital" label="30005"/>
        <button name="select" type="digital" label="30006"/>
        <button name="up" type="digital" label="30007" direction="up"/>
        <button name="down" type="digital" label="30008" direction="down"/>
        <button name="right" type="digital" label="30009" direction="right"/>
        <button name="left" type="digital" label="30010" direction="left"/>
    </face>
    <shoulder>
        <button name="leftbumper" type="digital" label="30011"/>
        <button name="rightbumper" type="digital" label="30012"/>
    </shoulder>
    <triggers>
        <button name="lefttrigger" type="digital" label="30013"/>
        <button name="righttrigger" type="digital" label="30014"/>
    </triggers>
</layout>

Sometime the strings get mixed up (I did this all by hand) so we should check strings.po. The strings look good. Moving on to the game add-ons:

pcsx-rearmed imports the PS layout above in its addon.xml:

Code:
<requires>
    <import addon="game.libretro" version="1.0.0"/>
    <import addon="game.controller.ps" version="1.0.0"/>
</requires>

game.libretro looks in buttonmap.xml for how game.controller.ps translates to the libretro controller "joypad" thing.

Code:
<buttonmap>
    <controller id="game.controller.ps" type="analog">
        <feature name="cross" mapto="b"/>
        <feature name="circle" mapto="a"/>
        <feature name="square" mapto="y"/>
        <feature name="triangle" mapto="x"/>
        <feature name="start" mapto="start"/>
        <feature name="select" mapto="select"/>
        <feature name="up" mapto="up"/>
        <feature name="down" mapto="down"/>
        <feature name="right" mapto="right"/>
        <feature name="left" mapto="left"/>
        <feature name="l1" mapto="l"/>
        <feature name="r1" mapto="r"/>
        <feature name="l2" mapto="l2"/>
        <feature name="r2" mapto="r2"/>
    </controller>
</buttonmap>

The names are different, the button is defined leftbumper but game.libretro expects l1. This should be fixed. Also, libretro defines a "l3" and "r3", so you may have to swap these around for the thumbs, shoulders and triggers until the buttons are lined up properly.

beetle-psx doesn't import game.controller.ps in its addon.xml and it doesn't have a button map. These should be copied from pcsx-rearmed once the names and l/l2/l3 issues are fixed.

However, the fallback behavior is to resort to game.controller.default using the libretro mappings. I probably got these mappings wrong (they're hardcoded), so once we get the buttonmap.xml file for PS right, I'll correct the game.controller.default mappings in the code. Then beetle-psx will then work even without its buttonmap.xml.

(2016-01-08, 07:55)zachmorris Wrote: 2) I think SNES left and right bumper are swapped. I ran across a homebrew suite of roms for controller testing and what the 'game' is registering as left and right are opposite of what Kodi maps.
I hit the left bumper, Kodi registers:
game.controller.snes feature [ leftbumper ] released
but the right bumper shows toggled in game.

I did this all by hand. As you can see above, there's a long chain of input, so somewhere along this chain I must have swapped a left and a right. Tracing this down is the same process as the PS controller issue.

(2016-01-08, 07:55)zachmorris Wrote: 3) Not really sure if this is a bug or not. I'm using a PS3 controller and mapped the default/Kodi controller along with NES. I'm playing a mashing games type game for NES which only has two buttons and accidentally hit triangle (not mapped for the NES controller), the default controller mapping fires and my screen view mode is changed inadvertently. Is it possible to inhibit the other non-mapped buttons from triggering when its currently being used in a different core (except maybe the GUIDE button that brings you back to Kodi)

Yes. Some buttons should be absorbed, and some should have different behavior in the game. What if we specialized <FullscreenGame> in the new joystick.xml? I think there's a "noop" command that absorbs input. Would setting the non-guide buttons to "noop" on <FullscreenGame> fix the problem?


RE: RetroPlayer Test Builds (updated for Isengard) - zachmorris - 2016-01-08

(2016-01-08, 21:27)garbear Wrote: I did this all by hand. As you can see above, there's a long chain of input, so somewhere along this chain I must have swapped a left and a right. Tracing this down is the same process as the PS controller issue.

Thanks for the explanation. I see the error in the buttonmap.xml for all SNES cores. I opened issues for them (not sure if thats more annoying than just a post here or not...) and the PS buttonmap.


RE: RetroPlayer Test Builds (updated for Isengard) - garbear - 2016-01-09

Thanks, the SNES fixes will be in the next release. I left a comment on your PS one