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) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
RE: RetroPlayer Test Builds (updated for Nexus) - garbear - 2024-02-01 (2024-02-01, 07:15)Clutz450 Wrote: I know you said in your changelog that you "Fixed Android joysticks that report buttons as keyboard keys" but I'm wondering if for some reason that didn't work on the armeabi-v7a.apk version. Clearly it didn't fix the problem for your Firestick. The bug fix was for Android versions that did funky things, so your Firestick must be _really_ funky. Can you upload a debug log? You can also try using the new Player Viewer window ("Players" from the in-game menu) to see that buttons are being interpreted as keypresses. We're now at the "long tail" of Android controller support. You can see in https://github.com/garbear/xbmc/issues/137 that the Android OS was so funky it reported buttons as keyboard keys, and the only way to fix it was to step through the code and find the exact line that was failing then hack around it. My hope is that I can see the problem from the debug log, but if not then someone will have to do what Abasz did in that issue. And that probably means I'll have to obtain the hardware and find the problem myself. (2024-02-01, 07:15)Clutz450 Wrote: I can't figure out how to attach pictures to this post without uploading the image somewhere else first and then clicking the picture icon and putting in the URL. I like to be as detailed as possible and send pictures/videos of what I am seeing/doing so you don't have to guess or assume anything about what I did. Thanks. Debug logs are actually 100x more useful than pictures. We'll see if we can fix your Firestick problem with a debug log. (2024-02-01, 07:15)Clutz450 Wrote: I only had time to test one game so I went into IAGL and tried to play Pitfall for Atari 2600. I was prompted to download the Stella Addon which went fine. When the game started, the first thing that caught my eye was that the screen seemed a bit too narrow than what I am used to seeing in RetroArch. This is likely an aspect ratio bug in Kodi. When I get a chance I'll try Atari 2600 in RetroArch and Kodi and see if I can fix the bug. RE: RetroPlayer Test Builds (updated for Nexus) - mollyrocco - 2024-02-01 hi i am trying to play some games with this version of retroplayer but cant seem to fine the amiga kickstart any thoughts thanks RE: RetroPlayer Test Builds (updated for Nexus) - Clutz450 - 2024-02-01 (2024-02-01, 07:45)garbear Wrote: Clearly it didn't fix the problem for your Firestick. The bug fix was for Android versions that did funky things, so your Firestick must be _really_ funky. Can you upload a debug log? Here you go: https://paste.kodi.tv/xiyolekoti.kodi I didn't see a Players in the in game menu so I couldn't test that out for you. Also, I wanted to mention something else weird that happened as I was playing around that I don't think the log picked up. So the first time I ran your version of Kodi, it just recognized my XBOX controller and I was able to navigate around Kodi just fine but just wasn't able to use my controller when playing Pitfall using the Stella Addon. The second time I loaded up Kodi, the controller didn't respond right. I noticed that I could use the Left Stick to move around a bit and the right stick to control the volume but that was about it. And when I went into the settings where I could map inputs, there was no Kodi Controller option, just a mouse option to configure. I didn't enable debug logging yet so I didn't think the log captured what was happening. I enabled debug logging and restarted Kodi and the controller was acting fine again (minus being able to be used in the Stella Addon) and is when I gathered the log that I posted above. I tried restarting a few more times but I couldn't get that other controller issue to happen again. I will keep messing around and if I can reproduce it with debugging enabled I will post another log for you to look over. I will mention that Kodi on my Firestick has never really worked very well and 9 times out of 10 requires me to clear the cache, otherwise it won't start up. Just wanted to mention that in case that has any effect on your troubleshooting or what you are seeing in the log. Also, let me know if you think the build I am using is making it hard to troubleshoot and I will reinstall without the build. Hope these logs help. Let me know if there is anything else you need. RE: RetroPlayer Test Builds (updated for Nexus) - garbear - 2024-02-02 (2024-02-01, 22:40)Clutz450 Wrote: Here you go: This was captured at the info level, can you enable debug logging in the settings page located at Settings > System Settings > Logging and capture another log? (2024-02-01, 22:40)Clutz450 Wrote: I didn't see a Players in the in game menu so I couldn't test that out for you. You mean you don't have this in the menu? (2024-02-01, 22:40)Clutz450 Wrote: Also, I wanted to mention something else weird that happened as I was playing around that I don't think the log picked up. So the first time I ran your version of Kodi, it just recognized my XBOX controller and I was able to navigate around Kodi just fine but just wasn't able to use my controller when playing Pitfall using the Stella Addon. The second time I loaded up Kodi, the controller didn't respond right. I noticed that I could use the Left Stick to move around a bit and the right stick to control the volume but that was about it. And when I went into the settings where I could map inputs, there was no Kodi Controller option, just a mouse option to configure. I didn't enable debug logging yet so I didn't think the log captured what was happening. I enabled debug logging and restarted Kodi and the controller was acting fine again (minus being able to be used in the Stella Addon) and is when I gathered the log that I posted above. I tried restarting a few more times but I couldn't get that other controller issue to happen again. I will keep messing around and if I can reproduce it with debugging enabled I will post another log for you to look over. If you can capture this behavior in a debug log somehow, then I might be able to see what went wrong. RE: RetroPlayer Test Builds (updated for Nexus) - Clutz450 - 2024-02-02 I think the build I am using is messing things up. Here is what the menu looks like with the build. And this is what it looks like without the build: So to avoid any further confusions when testing your versions of Kodi, I'm just going to uninstall everything on all my devices and reinstall Kodi and only setup IAGL. I'm working today so I'll be playing around with the Android version on my phone in my downtime and I'll try messing around more with my Firestick in the evening. As far as the logging goes, can you send me a screenshot of exactly what the settings should look like to get you the type of log you are looking for? Thanks. RE: RetroPlayer Test Builds (updated for Nexus) - garbear - 2024-02-02 OK, I've merged the joystick fixes into v21 and opened a backport PR for v20.4. Because the code has diverged between v21 and v20, it's possible that the backport could have a problem. So I created new builds for a v20.4 release candidate, basically same code as v20.3 but shuffled on top of the backport. I'd appreciate testing of the v20.4 release candidate build: https://github.com/garbear/xbmc/releases/tag/retroplayer-20.4-rc-20240202 If everything is working as well as v21, then we'll do a v20.4 release with much better working controllers. RE: RetroPlayer Test Builds (updated for Nexus) - garbear - 2024-02-03 (2024-02-02, 12:44)Clutz450 Wrote: I think the build I am using is messing things up. Here is what the menu looks like with the build. Your first screenshot shows a custom skin. That skin was created for v20. "Players" is added in v21. The reason why it shows up in my apk is because I "backported" the feature, so that I can run v20.3 on my main PC and still have all the juicy game features I've added in v21. When v21 is released, the author of your custom skin will likely update their skin and add the "Players" item. (2024-02-02, 12:44)Clutz450 Wrote: So to avoid any further confusions when testing your versions of Kodi, I'm just going to uninstall everything on all my devices and reinstall Kodi and only setup IAGL. Yes, testing should be done without add-ons, so that we can isolate any issues to a mistake that I made (2024-02-02, 12:44)Clutz450 Wrote: As far as the logging goes, can you send me a screenshot of exactly what the settings should look like to get you the type of log you are looking for? Thanks. You can see a screenshot in the debug logging section of the wiki: https://kodi.wiki/view/Log_file/Easy RE: RetroPlayer Test Builds (updated for Nexus) - Clutz450 - 2024-02-04 (2024-02-03, 00:49)garbear Wrote: You can see a screenshot in the debug logging section of the wiki: Log_file/Easy (wiki) That's the instructions I followed when I sent you my last log. Not sure why it didn't give you what you needed. Anyway, I deleted Kodi from my Firestick and installed your latest version. It seems like the controller issue of my controller not working in game was fixed as I was allowed to control my character in Pitfall. But while I was testing other things and was closing out and restarting Kodi, I had that other controller issue where it appeared that my controller wasn't responding other than the left and right joysticks. Last time that happened, I had noticed that when I went to configure attached controllers, there were only a few controller profiles there and one of them was a mouse (can't remember the others). This time when it happened, it showed a Wii, Vectrex, and Wonderswan controller. I was able to make this happen while I had debug logging enabled. However, looking at the log it appears to only be at the info level again. I have no idea why it's not showing me more information as I'm certain I followed that instructions on the wiki guide properly. I'm wondering if its possible that this in itself is a bug with the Firestick version. Either way, here is the log. Hopefully it provides you something useful. Otherwise let me know what else you think I can try to get the debug log to show you what you need. https://paste.kodi.tv/apojowasop.kodi RE: RetroPlayer Test Builds (updated for Nexus) - KOPRajs - 2024-03-30 Good news, everyone! While I've still not been able to figure out the issue with the libretro GL support, it seems that at least we've been able to find out causes for most of the remaining bugs in the OpenGL shaders backend during our little local hackathon. I'm now doing a rebase and a clean up of the code. Hopefully I will have the patches ready tomorrow. Here is the list of solved bugs: #1 - Active shader thumbnail overdraws the video filter GUI window (affects both GL and GLES) This is caused by the order of calls to videoShader->PrepareParameters() in CShaderPresetGL :: PrepareParameters() (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderPresetGL.cpp#L411). We need to set the parameters for each shader pass after we update the m_dest and the viewport, not before. It can be solved by moving the loop with videoShader->PrepareParameters() below the viewport update, but later we have discovered, that the videoShader->PrepareParameters() needs to be moved elsewhere to fix the bug #3, so this fix gets overwritten by a new fix, which solves both #1 and #3. #2 - The shader overdraws OSD GUI textures (affects GLES only) This one is caused by not properly unbinding the GL_ARRAY_BUFFER after rendering the shader. The CGUITextureGLES::End() (unlike the CGUITextureGL::End()) is not using glBindBuffer() to rebind the array before using it, so it ends up rendering the GUI texture to a wrong buffer. This can be solved by either avoiding the use of glBindBuffer() in the GLES code path completely, or by correctly unbinding the GL_ARRAY_BUFFER before the GUI is rendered. The first method brings more GLES #ifdefs, so we have choosen the second method and have added the unbind of the array to CShaderGL :: Render() after the glDrawElements() (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderGL.cpp#L120). #3 - Multipass shaders doesn't work in GLES This issue is caused by calling the videoShader->PrepareParameters() from the loop (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderPresetGL.cpp#L413). Only parameters of the last shader pass are preserved, the parameters of the other passes are being overwritten before they are rendered. The use of VAO saves the day for the GL, but it doesn't work for GLES (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderGL.cpp#L129). We tried to solve this by removing the videoShader->PrepareParameters() from the loop in CShaderPresetGL :: PrepareParameters() and instead calling it directly from the CShaderPresetGL :: RenderUpdate() before each pass is rendered. After this change we get much more shaders working in GLES (most shaders affected by this bug were rendered in a wrong scale and upside down in GLES before this change). #4 - Broken LUT support (lookup textures) (affects both GL and GLES) First we have found out that the textures for LUTs are currently not being uploaded to GPU at all (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderLutGL.cpp#L60). After fixing the texture loading we needed to uncomment the code in CShaderGL :: Render() (https://github.com/garbear/xbmc/blob/455a6fa68da3052e21bf996c9184d383d5dff8db/xbmc/cores/RetroPlayer/shaders/gl/ShaderGL.cpp#L106) and set the texture name by glUniform1f(). After these fixes we get even more shaders working in both GL and GLES (e.g. those with images of the handheld consoles around the screen). Missing LUTs were also a point of failure for many multipass shader presets. What needs to be done next Now we've got all of the GUI bugs solved and most of the shaders working, but the UI is limited. While playing with the shaders in RetroArch, I've found out why there's so many of them. The use of shaders is very subjective and it depends on the used emulator/system and even on the used hardware (performance issues and driver compatibility), so it is impossible to create a reasonable fixed list of shaders to suite everyone. We need a way to browse the shader folder and to add any shader to the list. Here is my proposal for the UI changes: - Move the ShaderPresetsXXXX.xml to userdata/addon_data/game.shader.presers/, so it is user editable. - Let's reuse what we can from the in-game savestates UI. - Keep the Nearest and Bilinear filters fixed in the first 2 slots. - Make the other filters removable from the list by a context menu (just like we did for savestates). - Create a "+" button in the end of the list which will open the standard browse file dialog and allow adding new filters (we can reuse the "+" button from savestates). - Get rid of the "Category" and "Name" translated strings. It is impossible to get strings for every shader preset out there. Instead use the preset filename without suffix. - Optionally add a context menu item to move the current filter left or right in the list, so users can change order of the filters. This way we can still ship the default xml with the most common presets, but allow every user to test and use any preset (even custom downloaded) and to make their own list of preffered shaders in the "Video filter" settings. I'd say this UI is going to be perfect for shader testing and comparision, as you can easily place 2 shaders next to each other and switch between them in real time. @garbear Can you do this? With the UI update like this, we can call it the Shader support 1.0 and finally get it merged upstream, as it doesn't break anything anymore and it should be fully usable! RE: RetroPlayer Test Builds (updated for Nexus) - KOPRajs - 2024-03-31 The code based on the Nexus 20.5 is here: https://github.com/KOPRajs/xbmc/commits/video-shaders-v2/ You can cherry-pick the last 3 commits: 1d8eb40 - fixes bug #2 440b1b6 - fixes bug #3 (and also bug #1) d16d63c - fixes bug #4 + contains minor related clean up (use BindToUnit() where possible instead of calling glActiveTexture() and glBindTexture() manually to be more consistent) EDIT: I've cleaned up the last commit even more, please update. RE: RetroPlayer Test Builds (updated for Nexus) - KOPRajs - 2024-03-31 I've created some mockups for the proposed UI update, so we can better visualize the changes: P.S. It also shows how multipass shader using LUT is now working in GLES. There is still one minor limitation caused by the GL_CLAMP_TO_EDGE wrap type in GLES (see how the texture is stretched to the bottom edge of the screen). Unfortunately, there seems to be no easy way to fix this, see here: https://community.khronos.org/t/how-to-get-gl-clamp-to-border-effect/104085 Luckily, this only affects few very specific cases (the texture needs to be smaller than the screen and it also needs to have other colour than black on the edge) and it only affects GLES. I would consider this a minor issue, as it only affects limited number of shaders. RE: RetroPlayer Test Builds (updated for Nexus) - OmniBlade - 2024-04-06 This looks great, hope it can be merged into Kodi 22. RE: RetroPlayer Test Builds - johntravler5 - 2024-04-08 (2013-09-12, 23:32)garbear Wrote: Archive of Kodi 18 alpha1 test builds Thank you brother RE: RetroPlayer Test Builds (updated for Nexus) - gusandrianos - 2024-04-08 Hey there! Thanks for taking the time to do these changes! I am extremely rusty on my C++ and OpenGL but the changes look good as far as I can tell. Feel free to go whichever way you like with this as I have extremely little time these days and I also don't have a personal machine with me because I relocated to another country. I wanted to note one thing which we found during the hackathon on DevCon 2023. We saw that Shaders on Mac broke the entire Kodi UI and we couldn't figure out why. I can't set up an environment on my work laptop so if nobody else is able to test this, would it be possible to have a mac build so I can test if the bug still occurs? Quote:The use of shaders is very subjective and it depends on the used emulator/system and even on the used hardware (performance issues and driver compatibility), so it is impossible to create a reasonable fixed list of shaders to suite everyone. We need a way to browse the shader folder and to add any shader to the list.This is very accurate. There are some scaling shaders that pretty much just work and there are also some "gimmick" shaders (some with LUTs of a Game-boy device frame) that are fun to play with and showcase what the possibilities are. I would suggest a limited selection of those is initially available and then some better way can be found to allow for custom ones or for further preset selection. Quote:Here is my proposal for the UI changes:These changes are reasonable but if I may suggest, I think it's better to merge things up to the point of your work as a sort of MVP and then add these. It works well enough for MVP and these mostly seem like quality of life changes. Wdyt? RE: RetroPlayer Test Builds (updated for Nexus) - KOPRajs - 2024-04-08 (2024-04-08, 14:06)gusandrianos Wrote: These changes are reasonable but if I may suggest, I think it's better to merge things up to the point of your work as a sort of MVP and then add these. It works well enough for MVP and these mostly seem like quality of life changes. Since not even the original GSoC 2017 project (video shaders for Windows including the current UI) was merged to upstream yet, I think the proposed changes to UI are small enough to be part of the initial big Video shaders feature PR. The hardcoded path to the ShaderPresetsXXXX.xml file should be resolved before the merge anyway. However, while I've been testing the code with my fixes, I've discovered another bunch of bugs to solve: #5 - Shaders look distorted when starting new game (affects both GL and GLES) When starting a new game from the emulator selection window with shader enabled the picture looks distorted. The other shaders selected by Video Filter menu are rendered correctly, only the shader which was enabled during the new game initialization looks distorted. Even more interesting is that this bug does not affect the game if started from a savestate (which can be used as a workaround), only starting a new game from the emulator selection window is triggering it. EDIT: It also seems to be triggered if the game changes output resolution on its own (e.g. PSX is changing resolution between intro video, menu and in-game). EDIT 2: I've added screenshots of 2 shaders (xBRZ Freescale and CRT Geom) showing the distortion (and the correct render for comparison). Look at the edges of the diamond. These screenshots are from Retroplayer 21.0 (without my previous fixes), so this issue is confirmed in 21.0. #6 - Crashes when changing internal game resolution (affects both GL and GLES) While testing shaders with Beetle PSX emulator, I've sometimes experienced Kodi crashes when changing internal resolution from 2x to 1x in advanced settings. I've not been able to reproduce it every time, it just happens randomly. It might be related to the previous bug, as triggering a resolution change seems to fix the distortion. #7 - Washout colors in built-in GUI shaders (affects only GL) This one is not caused by the video shaders code (as I can reproduce it on pure Nexus 20.5 as well), but it seems related. In my system running AMD GPU on Wayland I get washout colors and I can even partially see through the game when using the built-in Nearest and Bilinear filters. It seems like an issue with GL_BLEND. It only happens when I build Kodi with OpenGL, it works fine when I build it with OpenGL ES. EDIT: I've reproduced the #7 on a clean Omega 21.0 build (without the video shaders code) and I have added a screenshot (see how the desktop is partially visible under the game). I'm going to look more closely on these when I get time. |