XU4 and RetroPie

Moderators: mdrjr, odroid

XU4 and RetroPie

Unread postby fnkngrv » Mon Sep 25, 2017 4:32 am

So now that RetroPie is starting to support the XU4 officially to a point as of 4.3 I figured that I would start a thread for my build. Right now I and another chap are working on a few items since they are either an issue or aren't part of the native RetroPie application being delivered for the Odroid boards:

Issues:
- Not getting any audio in the ES menus however audio is fine in games that use RA cores
- Many times the screensaver option isn't working correctly. The screen will flicker, but the SS will not engage. It is a random issue.
- Sometimes when moving around within ES or RP configuration menus the screen will go black. I do have the setting for console blanking configured

Features:
- PiShrink has been confirmed to work so working on adding in the ability to expand the rootfs partition on demand.
- Splashscreen support for both static images and video
- Hide bootup text
- Video Screensavers that use video snaps just like on the Raspberry boards
- Possibly KODI being added in reliably

I have built my current image by using the Wiki for reference. I used the Odroid official minimal Ubuntu image. I tried to use MATE however ran into permission and other issues.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby odroid » Mon Sep 25, 2017 8:43 am

Great to see the RetroPie project here.

I also tried to build 4.2 a couple of weeks ago.
viewtopic.php?f=95&t=17063#p201025
But I had to use a Minimal image with Kernel 3.10 to have a Kodi(fbdev) to play 1080p videos.
ubuntu-16.04-minimal-odroid-xu3-20170727.img (this image is based on Kernel 3.10)
Kernel 4.9 still has a problem with Kodi which can play only 720p videos.
Please note Kernel 3.10 Mali GPU performance is also slightly better than 4.9 too.

But Retropie USB ROM service didn't work with Kernel 3.10 while 4.9 had no issue.
I hope your RetroPie 4.3 build can solve that issue.
Once you release a trial image, I will test it and report the results.
User avatar
odroid
Site Admin
 
Posts: 24610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: XU4 and RetroPie

Unread postby fnkngrv » Mon Sep 25, 2017 12:14 pm

We have noticed that the http RetroPie Manager won't autostart and for some reason we can't transfer ROMs with it. File, media, and ROM transfer works fine with winSCP or Windows Samba Network.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Fri Sep 29, 2017 1:09 am

A member in my group over on FB has tested and verified that he is able to get audio in ES reliably by using the steps outlined in this link:


Code: Select all
http://thehumble.ninja/2014/02/06/fixing-alsa-lib-pcmc7843snd_pcm_recover-underrun-occurred-while-keeping-pulseaudio-in-your-system/
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Fri Sep 29, 2017 1:13 am

odroid wrote:Great to see the RetroPie project here.

I also tried to build 4.2 a couple of weeks ago.
viewtopic.php?f=95&t=17063#p201025
But I had to use a Minimal image with Kernel 3.10 to have a Kodi(fbdev) to play 1080p videos.
ubuntu-16.04-minimal-odroid-xu3-20170727.img (this image is based on Kernel 3.10)
Kernel 4.9 still has a problem with Kodi which can play only 720p videos.
Please note Kernel 3.10 Mali GPU performance is also slightly better than 4.9 too.

But Retropie USB ROM service didn't work with Kernel 3.10 while 4.9 had no issue.
I hope your RetroPie 4.3 build can solve that issue.
Once you release a trial image, I will test it and report the results.



We are working on an Alpha image currently using RPI 4.3 and the same OS image that you mentioned above with the 3.10 kermel. The main items that we are trying to address prior to release are:

- Audio in ES (see post regarding solution)
- The ability to expand FS with scripting
- resolve issue we are seeing with erratic temps and possible overheating scenarios. fan keeps cycling on and off no matter what we set the threshold at and the kernel is ignoring RetroPie's configurations for it.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby odroid » Fri Sep 29, 2017 8:45 am

Thank you for the progress updates.
Nice to hear your team found a solution to enable the sound on Emulation-Station.
User avatar
odroid
Site Admin
 
Posts: 24610
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: XU4 and RetroPie

Unread postby fnkngrv » Fri Sep 29, 2017 2:19 pm

Yup, to be clear the ES audio fix only works with the 3.10 kernel. Too much has changed with 4.9.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby linuxest » Fri Sep 29, 2017 2:25 pm

I really want to test RetroPie 4.3. Do you have a plan to release a trial version in near future?

I've played with the great OGST image over two years and really satisfied.
But my kids just want to play games with Kodi videos like a little consumer product.
So RetroPie can be a good solution for my family.
linuxest
 
Posts: 35
Joined: Tue Nov 08, 2016 6:35 pm
languages_spoken: english
ODROIDs: 1 x HC1 and 2 x C2s with HiFi-Shield 2
And some RPi3 boards

Re: XU4 and RetroPie

Unread postby fnkngrv » Sun Oct 01, 2017 3:21 pm

linuxest wrote:I really want to test RetroPie 4.3. Do you have a plan to release a trial version in near future?

I've played with the great OGST image over two years and really satisfied.
But my kids just want to play games with Kodi videos like a little consumer product.
So RetroPie can be a good solution for my family.



Me and a couple other chaps are working together to put a base image together. I will be honest that Kodi isn't in the plans for installation and testing as it isn't in the "vanilla" RetroPie build. It is in the menu on the Raspberry Pie version because that is the bread and butter for RetroPie.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby sikotik » Sun Oct 08, 2017 5:31 am

I've built a basic install following the guides and have been testing packages that are marked as unsupported for Mali graphics.
Here are my results so far:

Build unsupported modules for testing

edit shell scripts located in /home/odroid/RetroPie-Setup/scriptmodules

/emulators

/ports

example: rp_module_flags="dispmanx !mali"

change to: rp_module_flags=""

Modules tested as of 10/7/2017

jzintv: working (add flags -z4 -f1 to emulators.cfg in the /opt/retropie/configs/intellivision folder)

ti99sim: working (add flag -f=2 to emulators.cfg in /opt/retropie/configs/ti99 folder)

frotz: working (as is)

c-dogs-sdl: working (as is)

ReiCast: working (as is) I only tested Soul Calibur and there were some minor graphical glitches, but fully playable

BasiliskII: not working

Xroar: not working

DosBox: working: (edit dosbox-SVN.conf to adjust resolution)

(Note: screen is shifted to left when i tried 1920x1080)
wolf4sdl: working ( add flag --resf 1920 1080 to its emulators.cfg file) Screen is shifted slightly to the left

Linapple: working ( edit linapple.CONF to configure resolution, etc.)

atari800/5200: working with an audio issue (you can set fullscreen within the emulator menu)
sikotik
 
Posts: 3
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4

Re: XU4 and RetroPie

Unread postby fnkngrv » Sun Oct 08, 2017 3:15 pm

I am pretty intrigued to see how well N64 bodes on this RPi 4.3 build. I will need to test this week. I am not going to get my hopes very high as I have been told previously that it isn't much better than on the Pi.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby sikotik » Mon Oct 09, 2017 3:08 pm

I took this script from the RetrOrangepi setup
splashscreens are working if you replace splashscreen.sh in /scriptmodules/supplementary/ with the attached file.
Attachments
splashscreen.sh
enable splashscreen functionality for mali devices
(11 KiB) Downloaded 8 times
sikotik
 
Posts: 3
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4

Re: XU4 and RetroPie

Unread postby stmicro » Mon Oct 09, 2017 8:15 pm

I'm very interested in this project.
When I played with Lakka and Batocera.linux(improved Recalbox) on my XU4, N64 emulation showed very decent performance with 640x480 native resolution while Rpi3 could handle only 320x240 low resolution.
I hope RetroPie 4.3 on XU4 will be a great gaming platform soon.
stmicro
 
Posts: 211
Joined: Tue Apr 28, 2015 4:23 pm
Location: shenzhen
languages_spoken: english, chinese
ODROIDs: 2 x C1+, 2 x C2
1 x XU-L, 2 x XU3-L, 3 x U3, 2 x U2, 9 x XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Tue Oct 10, 2017 2:03 pm

sikotik wrote:I took this script from the RetrOrangepi setup
splashscreens are working if you replace splashscreen.sh in /scriptmodules/supplementary/ with the attached file.


replaced that file with the one you attached and then placed files in the /scriptmodules/supplementary/splashscreen directory and then the odroid/splashscreens when you access it from windows samba, but none of them play....what am I missing?
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby sikotik » Tue Oct 10, 2017 2:23 pm

fnkngrv wrote:
sikotik wrote:I took this script from the RetrOrangepi setup
splashscreens are working if you replace splashscreen.sh in /scriptmodules/supplementary/ with the attached file.


replaced that file with the one you attached and then placed files in the /scriptmodules/supplementary/splashscreen directory and then the odroid/splashscreens when you access it from windows samba, but none of them play....what am I missing?


I'm not sure sure. I ended up creating a huge mess swapping scripts around between distros and half of everything else had gotten broken. I'll look back into it in a day or two.
sikotik
 
Posts: 3
Joined: Wed Feb 22, 2017 6:05 am
languages_spoken: english
ODROIDs: xu4

Re: XU4 and RetroPie

Unread postby fnkngrv » Tue Oct 10, 2017 2:25 pm

So after a ton of work for me being someone that isn't very versed with Linux compilation and coding I was able to at least get to what I believe is a stable running ES build with audio. I can't vouch for whether it will work for those that have been tinkering and making a bunch of system changes already, but from a fresh build of 4.3.2 using the official Odroid ubuntu-16.04-minimal-odroid-xu3-20170727 image you should be able to have this working pretty quickly.

Here are the basic steps that got me going. Note that every time I tried something and failed I went back to rewriting my base 4.3.2 image to my card to avoid any garbage files/configs being left as orphans by doing uninstalls, etc. I tried a few audio frontend suites however the only one that seems to be working as close to out of the box as possible is indeed PulseAudio.

------------------------------------- DISCLAIMER-----------------------------------------------------
There may be a "better" way to accomplish this task so do so at your own risk. I have seen no issues from it after dozens of reboots and starting/ending emulation however your mileage may vary. ALWAYS BACKUP YOUR IMAGE BEFORE INSTALLING OR MODIFYING SYSTEM FILES.
-----------------------------------------------------------------------------------------------------------

1) After you have followed the initial steps on the XU4 RetroPie install Wiki and then installed RetroPie (I used the MAKEFLAGS="-j1" flag) get your RPi installation where you want to. I installed all the emulators that I wanted to use/test, updated the locale, and then a couple themes you will need to be sure that you can connect via SSH to the terminal and also with winSCP. You will want to use Notepad++ and get it if you don't have it. You will also need to be sure that you place at least 1 system into your build with a video snap to test.

2) I installed PulseAudio control with
Code: Select all
sudo apt-get install pavucontrol
via putty. It took roughly 12 minutes. Once it is done, reboot.

3) In order for PA to properly lay down the required files you will need to go into one of your game system's menus. Drill down to that system (EXAMPLE: PC Engine). You will notice that you don't have any audio in the snap. Reboot.

4) Once you are back to the main ES systems screen connect again to your build with putty and go to /etc/pulse/ and backup both the default.pa files and the daemon.conf file by using
Code: Select all
sudo cp /etc/pulse/default.pa /etc/pulse/default.pa.bak
and
Code: Select all
sudo cp /etc/pulse/daemon.conf /etc/pulse/daemon.conf.bak
.

5) Now that you have these files backed up I used winSCP to drill to the directory /etc/pulse/ directory, right click default.pa and select to edit with Notepad++. You will need to go to what should be line 55 and tack on tsched=0 to the end like you see in the snip below:

PulseAudio dafault.pa Edits.PNG
PulseAudio dafault.pa Edits.PNG (7.37 KiB) Viewed 85 times


after doing this change close out Notepad++ and Save upon exit when prompted otherwise you can just close the file by clicking on the red x to the right of the filename for the open file tab. Reboot.

6) Go back to winSCP once the build is back to the ES systems screen and open daemon.conf by right click, open with Notepad++. Here you will scroll all the way to the bottom to lines 81 and 82. Here you will uncomment by removing the **;** character and then changing the values from 4 to 5 on line 81 and then 25 to 2 on line 82 so that it resembles the snip below:

PulseAudio daemon.conf Edits.PNG
PulseAudio daemon.conf Edits.PNG (10.08 KiB) Viewed 85 times


Close and Save the file. Reboot.

7) Once you get back into ES you should be able to drill into the system you have a game in and the video snap should now have audio along with it. Launch the game and the audio should work as anticipated. If it does not then check your changes because you most likely missed something.

What these changes are doing is from my understanding the following:

tsched=0 - this has to do with how the kernel manages your hardware , in this case your sound card. Some sound cards need real time sqeuencing and apparently the built-in Odroid soudncard does not return accurate timing information.

fragment settings in daemon.conf - DEFAULT FRAGMENT SETTINGS

Some hardware drivers require the hardware playback buffer to be subdivided into several fragments. It is possible to change these buffer metrics for machines with high scheduling latencies. Not all possible values that may be configured here are available in all hardware. The driver will find the nearest setting supported. Modern drivers that support timer-based scheduling ignore these options.
default-fragments= The default number of fragments. Defaults to 4.
default-fragment-size-msec=The duration of a single fragment. Defaults to 25ms (i.e. the total buffer is thus 100ms long).


Best of luck and may the odds be ever in your favor!
Last edited by fnkngrv on Mon Oct 16, 2017 12:37 pm, edited 2 times in total.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby Sashby » Tue Oct 10, 2017 2:29 pm

fnkngrv wrote: replaced that file with the one you attached and then placed files in the /scriptmodules/supplementary/splashscreen directory and then the odroid/splashscreens when you access it from windows samba, but none of them play....what am I missing?


Splashscreen XU4 support:
Step 1: install mplayer
Step 2: Download asplashscreen.sh from Retropie-Setup Github page. https://github.com/RetroPie/RetroPie-Se ... hscreen.sh
Step 3: Replace omxplayer with mplayer
Step 4: Place modified asplashscreen.sh in etc/init.d

I achieved it this way, although I have not tested this enough to see if it leads to any problems (i.e: longer video file that would load emulationstation before video has finished, etc).
Sashby
 
Posts: 5
Joined: Tue May 30, 2017 1:20 pm
languages_spoken: english
ODROIDs: Odroid-XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Tue Oct 10, 2017 2:34 pm

I have verified that my PiShrink Hub works with the Odroid's Ubuntu/RetroPie build. I put together a kit of sorts that is a self contained VirtualBox portable tool that allows you to shrink your images without having to actually install VB, the guest OS, etc. I have had dozens of folks use it now and express that it works well for them. I am not sure how to provide people here accessibility, but if it is desired maybe we can see what we can do. That being said I figured out a procedure to be able to expand the FS from a shrunk image or to move a backed up image from a smaller card to a larger one. I have attached the script, but you would also follow the steps in yellow in the capture below. The script needs to be in the /root/ folder on the primary partition (not the boot partition). I am still working on a way to have the script be able to be chosen to run without having to go to terminal. Perhaps add it to the RetroPie Setup Menu.


Resize PT.PNG
Resize PT.PNG (36.5 KiB) Viewed 222 times



resize.sh
(600 Bytes) Downloaded 2 times
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby memeka » Wed Oct 11, 2017 11:58 am

Latest SDL2 (2.0.6) that comes with artful has support for DRM/KMS.
I've compiled it for 16.04 and confirmed it works correctly.
Next, I compiled emulationstation, retroarch with support for DRM/KMS, and a couple of cores (GLES3 supported).
All working just nice.
Oh, and I also have a branch for latest Kodi Krypton working on DRM/KMS with full acceleration.

All with latest 4.9 kernel and r12p0 binary drivers...

So instead of using fbdev, which is buggy on 4.9 and forces you to use the 3.10 kernel, you guys should think about compiling everything for DRM/KMS + GBM.
User avatar
memeka
 
Posts: 3631
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: XU4 and RetroPie

Unread postby fnkngrv » Mon Oct 16, 2017 12:39 pm

Corrected my post above about getting ES audio to work. I went back and built from scratch to see if I could easily duplicate my previous success with the settings that are now removed. Obviously I could not so I started over to come up with a more stable solution. After dozens of reboots and going in/out of games dozens of times I have not had an underrun event yet so feel pretty confident in my new configurations.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Thu Oct 19, 2017 1:39 am

memeka wrote:Latest SDL2 (2.0.6) that comes with artful has support for DRM/KMS.
I've compiled it for 16.04 and confirmed it works correctly.
Next, I compiled emulationstation, retroarch with support for DRM/KMS, and a couple of cores (GLES3 supported).
All working just nice.
Oh, and I also have a branch for latest Kodi Krypton working on DRM/KMS with full acceleration.

All with latest 4.9 kernel and r12p0 binary drivers...

So instead of using fbdev, which is buggy on 4.9 and forces you to use the 3.10 kernel, you guys should think about compiling everything for DRM/KMS + GBM.



Appreciate the info. It sounds like you have a solid working setup. This type of thing is over my head at this time so I wouldn't even know where to begin.
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4

Re: XU4 and RetroPie

Unread postby fnkngrv » Thu Oct 19, 2017 6:53 am

I can tell you that trying to figure out how to set up a boot splashscreen video is kicking my @ss
fnkngrv
 
Posts: 19
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: none yet...looking to pick up XU4


Return to Projects

Who is online

Users browsing this forum: Sashby and 1 guest