• Save 15% on ALL SFF Network merch, until Dec 31st! Use code SFF2024 at checkout. Click here!

RetroBox - the game preservation machine

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
This is quite interesting. It is something that I have struggled with given that my current machine handles four roles: Media playback, office work (web browsing and document editing), 3D modelling and CAD, and very light gaming (including emulation up to the fifth generation).

As-is, this build is an incredibly capable media playback, web and document machine -- though perhaps even a hair overpowered. Kodi will start on boot and will be perfectly capable of playing 4K, h.265, Hi10P - you name it. If you opted to connect this machine to two displays (maybe a monitor, and a TV), and have it boot to the regular Windows shell I think it would be fine to watch TV and surf or edit simultaneously. I have a few AMD APU-based machines (now over 3 years old) scattered across the house that serve as set-top boxes running Kodi and they just don't break a sweat.

Depending on the complexity of your CAD drawings or models, I would be a little worried that the hardware would run out of steam. I'd say that is easy enough to fix by swapping in a Core i5-6600 (over the i3: 2 more cores, only 14W added TDP, 3.3GHz/3.9GHz turbo - $50 USD more or thereabouts). Depending on your exact gaming needs as well it may be worth it to opt for the GTX 1060, though that adds around $100 USD (and some additional power requirements) to the build.

For my purposes, the discrete GPU is there for increased capability and performance in filters/shaders, as well as when you get into graphics renderers in 5th gen console emulation and beyond, which will make direct use of the GPU. Here's a great example of that.
 

Soul_Est

SFF Guru
SFFn Staff
Feb 12, 2016
1,536
1,928
As-is, this build is an incredibly capable media playback, web and document machine -- though perhaps even a hair overpowered. Kodi will start on boot and will be perfectly capable of playing 4K, h.265, Hi10P - you name it. If you opted to connect this machine to two displays (maybe a monitor, and a TV), and have it boot to the regular Windows shell I think it would be fine to watch TV and surf or edit simultaneously. I have a few AMD APU-based machines (now over 3 years old) scattered across the house that serve as set-top boxes running Kodi and they just don't break a sweat.

Depending on the complexity of your CAD drawings or models, I would be a little worried that the hardware would run out of steam. I'd say that is easy enough to fix by swapping in a Core i5-6600 (over the i3: 2 more cores, only 14W added TDP, 3.3GHz/3.9GHz turbo - $50 USD more or thereabouts). Depending on your exact gaming needs as well it may be worth it to opt for the GTX 1060, though that adds around $100 USD (and some additional power requirements) to the build.

For my purposes, the discrete GPU is there for increased capability and performance in filters/shaders, as well as when you get into graphics renderers in 5th gen console emulation and beyond, which will make direct use of the GPU. Here's a great example of that.
Well my ThinkPad X201 has a Core i5-620M and 8GB, I am running FreeCAD on Arch Linux so it's good enough for now. Emulation works well enough using OpenGL (X11) and even better using Kernel-Mode Switching or KMS (console) . As for latency, please have a read through these articles, https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=142251 , https://libretro.com/forums/showthread.php?t=5428 that go into input-lag in RetroArch under Windows and Linux (using KMS and OpenGL). https://www.reddit.com/r/emulation/...meone_help_me_reduce_input_lag_for_retroarch/ goes over possible settings to reduce input-lag.
 
Last edited:
  • Like
Reactions: doogie

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
All About Emulator Performance, and Input Lag

Older video game consoles deal with just about everything (polling input, rendering pixels, keeping audio in sync..) differently versus how your modern PC (and modern display) do business nowadays. A nasty side effect of the desire for massive resolutions and ultra-fast framerates is the necessity to buffer/postprocess/funnel thru many layers of hardware and software - net effect is latency, or input lag.

So I'm clear, by "latency" I mean the duration between an event occurring (say, the user pressing a controller button) and the reaction to that event. This is the only thing that probably will not be solved completely, and because of the aforementioned differences with how the old systems (and their games) expect to work, might be the most disappointing thing about emulation.

But, like I said, as long as you are not blessed with some incredible perception to latency or are not a competitive player, you will probably not be able to tell a significant difference, given the right settings.

First, a primer by byuu (author of higan) on the causes. Although he may make the situation sound incredibly grim, he is laser focused on complete and total accuracy - so his stance makes sense.

Things that do not work (or cons outweigh pros), in my opinion:
  • Adjusting the USB polling interval
  • Messing with DirectInput/XInput/other Input API layer settings
  • WASAPI Exclusive Mode (Windows only)
You can give these things a shot, but I personally do not find incredible value in them. YMMV.

As to things that do work, let's start at the end of the pipeline:

TV or other display

If you are buying a display with any kind of gaming in mind - it's worth checking DisplayLag's database. If your monitor has a "Game Mode" - try it. It may make a big difference. Some models have a specific input that is designed for lower latency. Double check.

Audio/AVR

If you are outputting audio and video over HDMI - and I think you should to help keep things in sync - you effectively bypass much of the on-board audio hardware and have very few options in software to postprocess the audio stream. For gaming, this is a good thing. AVR's can be configured to delay or advance the audio stream to adjust for lip sync, so check that setting as well.

OS

I am not as experienced on this topic on Linux as I am on Windows, but on Linux you're going to want a minimum of extras running, and a working DRM video driver. On Windows, sadly different versions of GPU drivers can affect latency in big ways - so I'm much more hesitant to upgrade drivers. For my build, I'm normally not running the Windows shell. I set the power profile to "Performance" so as to effectively disable CPU P-states, and I disable the Xbox DVR function. The former setting change is due to the fact that oftentimes only one CPU core is going to be significantly loaded, but we want that core to be clocked as fast as possible rather than have the OS trying to reduce clock speed.

Retroarch

Libretro and Retroarch actually try their best to reduce latency and keep things in sync (audio+video) rather than just syncing to the audio stream or to vsync. This is unique versus other emulators, so taking this into account alongside other nice features, I stick to Retroarch as much as possible. There is a combination of settings that is known to work well in Windows:

video_driver = "gl"
video_vsync = true
video_threaded = false
video_fullscreen = true
video_windowed_fullscreen = false
video_hard_sync = true

Particularly to keep video_threaded disabled and to keep the framerate high, we need a fast CPU.

There are slightly different recommendations for Linux and specifically the RPi - an extensive study has occurred here across many configurations and sets of hardware. See here for the results, recommendations, and further tuning you can do.

Other resources on this topic:

https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=142251
http://filthypants.blogspot.com/2015/06/latency-testing.html
 

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
It's alive.. :thumb:



Yes, that is a very temporary case.

The software setup is relatively simple:

  • Install Windows 10, update, configure for your environment
  • Install Kodi, Controller Companion, Launcher4Kodi, Autologon
  • Install or transfer over your existing LaunchBox and Retroarch directories
  • Import or copy over your games
  • Enable remote desktop, file shares and other remote administration entry points
I separate my Retroarch config files as follows and make heavy use of the --appendconfig option. I also disable writing new configuration on exit, so whatever is changed in the UI does not become permanent (aka only valid for that specific session). Permanent configuration edits can be done remotely.

  • retroarch.cfg (basics - video drivers, global configuration)
    • master_input.cfg (keyboard shortcuts, global hotkeys accepted via the "master" controller)
    • bb_joypadmapping.cfg (joypad ID's to Bliss Box ports)
    • <console specific>.cfg - console specific options, including input mapping, controller type, shaders, etc
Storage: So far I have everything but game files stored on the SSD, and games go on the spinning disk. I imagine if I have to expand beyond the 2TB 7mm drive I would go with an external disk.

LaunchBox 7 as well as Kodi 17, both towards the end of their respective beta cycles and getting close to release, are going to be game changers in their own ways. I am normally a big fan of stable software but the added features were tough to ignore, and I did my prototyping on both of them.



So this is it, for now! I'll hopefully be back in a few weeks with final pictures of the build in the S4 Mini!
 

GuilleAcoustic

Chief Procrastination Officer
SFFn Staff
LOSIAS
Jun 29, 2015
2,984
4,421
guilleacoustic.wordpress.com
Nice project, will follow closely. I'm using an i7-4785T on Archlinux as a workstation (CAD, coding) and retro gaming (Retroarch + EmulationStation) and some Minecraft. All works very well, impressed by how FreeCAD runs on the HD4600. I'll give PSX emulation a go with the new Vulkan renderer.
 
  • Like
Reactions: Soul_Est and doogie

3lfk1ng

King of Cable Management
SFFn Staff
Bronze Supporter
Jun 3, 2016
918
1,717
www.reihengaming.com
@doogie
I just wanted to let you know that I was inspired by your build and decided to get my Mancade up to speed again.

In the process I discarded nearly 40 hours of progress to start anew (I had nearly forgetten how it was all setup and connected to eachother via .XML files and the likes)
Hyperspin - violently taken out back and shot.
Rocketlaunch - discarded (for now)

Launchpad license- Purchased
Emumovies license- Purchased
RetroArch - Downloaded

Big Box is so good!
It took no more than 3 hours to get everything setup. No hassle. No confusion. Everything just works.
I need to bring over the rest of my roms tomorrow so we'll see how well it plays with .ISO files but for the moment I am quite pleased with how it all turned out.

Thanks for reigniting my flame for emulation.
I'll be watching your progress, keep up the good work.
 

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
Quick Update and more Performance Tuning - Long time no post!



Many thanks to @Josh | NFC for the attempts at getting powdercoat to work out - through absolutely no fault of his, the colors just didn't work, and I'm very grateful for the attempt (and, sheesh, the willingness to still sell me a case in the end). I'm incredibly impressed by Josh's attention to detail and refusal to accept less than perfect results. Thanks man.

I've got the build in a working state and have been doing some profiling at 4k60, which was totally unexpected. I can't believe that this machine is able to render a consistent 60fps at this resolution, but it most certainly can even with some of the most brutal RetroArch shaders in existence enabled.

One big change I made on the machine was to disable Hyperthreading:


..we're watching CPU utilization while rendering one of the more demanding SNES games (funny that it's taking this much horsepower to emulate something from 1990, right?). Red and green lines are % Processor Time for each core. I should point out that this is using the bsnes-balanced core, which focuses on cycle accuracy and thus requires quite a bit more grunt. Mednafen PSX is another great example of this (and PS1 games are fully playable on this rig, if you're wondering).

One of the things I noticed right away was that RetroArch is just putting all its work onto a very consistent 8 threads, no matter what system or core I had loaded up. With Hyperthreading on, utilization would be affected by any sort of context switch from things happening in the background or whatever. It's possible that Windows 10's upcoming Game Mode may help with this sort of situation, but for now I'm able to get consistent 60fps (versus intermittent dips to 50-55) with HT off.

In Dolphin, I then actually had to disable dual-core speedups. This put more overall utilization on the processor but gave me a much more consistent, playable framerate. I noticed a ton of context switching with the Dolphin option enabled (and I was getting around 11-20 fps), so having that option enabled may be much more effective with HT on, or especially with 4+ core processors. I'd say experiment both ways, particularly if you have a high frequency dual core processor like this one.

Overall, I'm extremely pleased with the hardware selection. I've used the stock HDPLEX cables temporarily and things are a mess inside the case, but it does fit and work fine. I've got supplies on the way to make some shorter cables, and I'll share some more pictures then.
 
Last edited:
  • Like
Reactions: Kwirek and Soul_Est

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
NFC S4 Mini #191

I went ahead and finished the EPS 8-pin cable, but ran out of time this evening to get started on the ATX cable. This is actually my first try at building these cables, so I was super slow. It turned out great - hidden, just like I wanted:



I'll certainly make an attempt at the 24-pin however I'm relatively pleased with the cleanliness of the build so far.




Time to play some games guys! I hope you enjoyed this adventure, and if you find yourself missing the titles you played in years past..this is definitely a solid build to relive multiple decades of gaming greatness. Thanks everyone!
 

Phuncz

Lord of the Boards
SFFn Staff
May 9, 2015
5,947
4,953
Very nice ! Remarkable to see so many classic game emulator builds on here. Interesting to read your experiences with RetroArch. I'm keeping a close eye on Hakchi2's development as I have a Nintendo Classic Mini waiting to be "unlocked" to it's full potential.
 

CC Ricers

Shrink Ray Wielder
Bronze Supporter
Nov 1, 2015
2,234
2,557
That S4 is looking sharp, dude. Silver bezel looks nice on it, and great fit for an emulation machine. Great build log too, it's very informative.
 

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
Before we get into the new build, I wanted to put down what I've learned with regards to this specific hardware selection, after putting way, way too many hours on this machine.

RETROBOX 1.0: THE POST-MORTEM

Systems that I ended up "supporting" aka built-in to Launchbox and expected to work:

  • Atari 2600
  • Atari 7800
  • Atari Lynx
  • Atari Jaguar
  • Panasonic 3DO
  • Nintendo Entertainment System
  • Super Nintendo Entertainment System
  • Nintendo Game Boy
  • Nintendo Game Boy Color
  • Nintendo Game Boy Advance
  • Nintendo Gamecube
  • Nintendo Wii
  • Magnavox Odyssey2
  • Sega Master System
  • Sega Game Gear
  • Sega Genesis
  • Sega CD
  • Sega 32X
  • Sega Saturn
  • SNK Neo Geo Pocket Color
  • NEC TurboGrafx-16
  • NEC TurboGrafx-CD
What about arcade games, DOS/Windows 9x/earlier Mac games, or some other system that isn't listed here?
I take into consideration input/control method, alongside performance and accuracy of the emulator code available. For example, the Atari 5200 has an interesting controller that would be tough to replicate. The Nintendo DS has a touchscreen. N64 emulation (until very recently) was just not set and forget. And so on.

Given a different type of setup, perhaps one where the machine were plugged into a lapboard or to a plain ol' monitor/keyboard/mouse, it would make way more sense to add a whole bunch more systems to the mix. The same would apply if I committed to a gun controller and/or arcade-style controls. For now, though, I'm focused on couch gaming.

What worked well:
  • Hardware selection: I am very, very pleased overall with the performance of the hardware that I bought all the way back in September 2016. At 1080p, the limits are few in terms of what systems you can emulate with a high degree of confidence and accuracy. However, there is a ton of development time being put into more recent consoles (5th generation and beyond - notably Nintendo 64, Sega Saturn, Sega Dreamcast, and many others). In some cases, the i3-6320 is just running out of steam: a great example is the very recently released multithreaded Angrylion code for Libretro's ParaLLEl core (emulating the Nintendo 64). Both CPU cores are just out of breath running this, but it is incredibly accurate.
  • Bliss-Box: if you're completely insane like me and must have original controllers, this is the only way to go. If you're not quite that nuts, I recommend 8Bitdo for controllers that are not only wireless but feel very, very close to the originals.
  • Launchbox/Big Box: amazing software. If you are dedicating a machine to your emulation needs, you definitely can't go wrong by using this software to catalog your games and present them in a beautiful way. New versions with new features show up at least once a month and stability has not yet been a problem for me.
What's definitely going to change for the next revision:
  • Eliminating the dedicated controller to drive the menus. This guaranteed that I could get myself out of any sort of bad situation that may arise, but it's unnecessary. Instead, any controller that is plugged in or connected wirelessly can navigate the UI.
  • Separating administrative user accounts versus the account that runs Kodi or Big Box. This is primarily so I can more easily administer the machine when needed - for example, the admin account's shell should be explorer.exe, not Kodi.
  • Scale everything up to 4K (or very near 4K), which should keep many consoles much closer to a correct aspect ratio. For mimicking a CRT, switch to crt-royale.
  • Add border graphics for handheld systems (Game Boy and the like), LCD grids, and other enhancements that make the display look more accurate to the original.
  • Automate upgrades for Retroarch, and backups of saved games or game states.
  • Have plenty of extra CPU/GPU horsepower to add accurate N64, Dreamcast, Saturn, PS2 emulation as the relevant code matures.

ADVICE FOR YOUR OWN RETROBOX

Hopefully one of the following statements describes you or your desire for retro gaming awesomeness. If I left you out, definitely ask!

I love this concept, but I just want it to be cheap and easy to get working.
I don't blame you. Buy a Raspberry Pi 3, an Xbox One (or 8Bitdo) controller and drop one of RetroPie, Recalbox, or Lakka on an SD card, along with your ROMs. Last year, I did a few Recalbox RPi3 setups and the recipients were very happy, so perhaps check that out first.

(or, Haxchi an NES or SNES Classic, if you prefer)

I want a little more grunt than what an RPi offers, but still want the setup to be simple and cost to be reasonable.
Grab an Intel NUC and throw Lakka on it.

Wait, I just built a Z170/Z270-based Retrobox and now you're talking 2.0? What gives??
Sorry, it was a bit of a learning exercise for me, too. If you're not happy, throw a 65W CPU in it - i5-7600 for example. No need for an i7 in my opinion.

Give me unlimited retro gaming horsepower, aka "I'm single" ;) aka "my wife told me to build whatever I want"
Stay tuned for Retrobox 2.0.
 
Last edited:

zovc

King of Cable Management
Jan 5, 2017
852
603
This is awesome! Definitely staying tuned for Retrobox 2.0.

The other day I was just talking with some friends about how I was kicking myself for learning about emulation "purism" because it's harder to enjoy emulation now. I set up PCSX2 on my laptop to play Shin Megami Tensi 3: Nocturne, and some aspects of emulating it are still really rough. It's totally playable, but the motion blur is a huge eyesore and I haven't been able to figure out how to solve it and it's ruining my enjoyment. The rest of the game looks pretty awesome oversampled to 4K though!
 

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129


Here we go! If you've been following along, the hardware I've selected for this iteration should not be crazy surprising:

Asus Z370-I ROG STRIX
Intel Core i7-8700 (6c/12t, 3.2GHz, 4.6GHz turbo, 65W)
EVGA GeForce 1060 SC GAMING (ACX, single fan)
16GB G.Skill TridentZ RGB F4-3200C16D-16GTZR
Noctua NH-L9i (thanks to @Josh | NFC for the video on how to get the best possible temperatures with this cooler)
Samsung 960 EVO 500GB
HDPLEX HiFi 400w + Dell 330PM111

And the chassis? SKYREACH 4 MINI, of course!

Okay..the only thing that might be kinda surprising here is the CPU - well, using the Single Thread chart from PassMark as a rough guide, it's pretty easy to see that at 65W, you can't beat the i7-8700. The Coffee Lake processors are just wicked fast for gaming, and for this specific scenario we need all the single thread horsepower we can get for many emulators. As I mentioned before, though, where it gets interesting is in instances like the one with ParaLLEl - to get the most accurate imitation of a real N64, we've got to run Angrylion, and it'll even work a 7700K hard. This seems to be in general the direction that the emulation development scene is heading - so in hopes of getting a few more years out of this build, I'm going higher end this time.

I'll need to go get in line for NFC's latest case, but in the meantime..she POSTs, so it's back to the test bench for the photo shoot:



 
Last edited:

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
Cloud Powered* sort of

I've built a whole lot of PCs over the last two+ decades, and yet none quite like this. At first, I took the words "couch gaming" to heart and modeled after what would be the closest example that you can buy off the shelf - game consoles. A spinning disk for the game files was therefore a given, which of course takes up more space, makes noise, and creates need to dissipate additional heat and provide more power (albeit very small amounts, but still). I definitely wasn't trying to integrate an optical drive as the PS4 or Xbox One do, because there's genuinely no need.

I had one of those 3am, "why didn't I think of this sooner?" moments. In the pursuit of increased efficiency and less power/heat/noise, it makes a lot of sense in this instance to ditch the spinning disk, and just store the game files on my NAS. For many of the systems being emulated here, the entire game is going to be read directly into RAM - at worst, we might see a second or two added before we're in game (and that's in instances where the built-in HDD didn't have to spin up!). For optical media based consoles like the PlayStation, it's possible that we might see some increased delays due to more random reads; but emulators seem to either take the pure accuracy stance of emulating the super slow disc read (at which point, who cares about going over the network), or they will cache the disc image (meaning all of the content will be pulled down locally and read from). I'll need to do some further testing/tuning on this.

If you're considering this model, I would treat it somewhat like a media streaming situation - wired connectivity would definitely be preferred; and maximizing for read performance would be best on the NAS.

Pulling this off is as simple as leveraging mklink in Windows 10, so for example:

Code:
mklink -d C:\LaunchBox\Games \\server\share

And if you're really crazy and want to try substituting in cloud storage for the NAS - well, if the storage client caches content locally (a la Google File Stream, or OneDrive Files on Demand), you'd probably actually be fine!

More testing on this to come.
 

zovc

King of Cable Management
Jan 5, 2017
852
603
I've had similar thoughts before, particularly wanting to be able to use my saves from games across emulators/platforms/computers.

The only real headway I made was storing a few Gameboy Advance roms on my Google Drive, and accessing them both from my (Android) phone and my computers. (Maybe also my work computer, shh!) With GBA and other systems that saved directly to their cartridge, this is pretty much as simple as putting the ROM on your NAS/Cloud and then making sure what you're running your emulator on can also access the networked ROM.

For systems that had memory cards, you need to make sure your emulators (across platforms) use the same kind of memory card emulation, or have compatible saving systems, or whatever else. Not sure if you could also get Save States to work across platforms, but I would have my doubts.

Definitely--once I get into a more permanent living situation--I'd like to start tricking out a NAS/Cloud emulation setup.
 
  • Like
Reactions: Soul_Est and doogie

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
Looking the Part - Hiding the Windows UI, lockscreen, etc.

For a more complete "console" look in Retrobox 2, I took on some additional steps. The ability to hide more of the Windows UI requires the Enterprise or Enterprise LTSB version of Windows 10 - however the Shell and UEFI logo customizations will work fine without.

Short of is:
  • In an administrative command prompt:
    Code:
    bcdedit.exe -set {globalsettings} bootuxdisabled on
  • In Windows Features: under Device Lockdown, enable 'Custom Logon', 'Shell Launcher' and 'Unbranded Boot'
  • Reboot
  • In the registry:
Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EmbeddedLogon

HideAutoLoginUI=1
HideFirstLogonAnimation=1

It's also a whole lot cleaner if you create a separate administrative user account, allow that account to logon over RDP, and set it to start explorer.exe rather than Big Box or Kodi. To do that, create the user, and then set these items in the registry:

Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Shell=explorer.exe

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot
Shell=USR:Microsoft\Windows NT\CurrentVersion\Winlogon

The above settings define two things: the default shell (explorer.exe), and to look at the HKEY_CURRENT_USER hive for the user's shell executable (rather than the machine-wide setting).

Finally, set the shell for your auto-logged-on user:

Code:
HKEY_Current_User\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
Shell=<BigBox, Kodi etc>

See this MSDN article for all the details on what we're doing here.

Also, credit to:


On top of this, I like to flash a custom boot logo instead of the OEM Asus Republic of Gamers UEFI logo. You can do so by installing ASUS AI Suite (specifically, the EzUpdate utility). Download the latest BIOS update from ASUS along with your preferred boot logo, and tell EzUpdate to flash that BIOS version. Then, click "MyLogo" as it instructs. Select your image and away you go.
 

doogie

Trash Compacter
Original poster
Nov 28, 2016
43
129
I've had similar thoughts before, particularly wanting to be able to use my saves from games across emulators/platforms/computers.
...
For systems that had memory cards, you need to make sure your emulators (across platforms) use the same kind of memory card emulation, or have compatible saving systems, or whatever else. Not sure if you could also get Save States to work across platforms, but I would have my doubts.

This is all correct! With regards to Save States (that is, a snapshot of the entire memory space of the console), yes, you need to be careful that you're using the same emulator (or "core" if RetroArch) and, sometimes even the same version of that emulator! Platform (ARM vs x86, Windows vs Linux vs Android etc) should not matter, however.

For SRAM or EEPROM saved games aka the built-in save function for many games - these files are a little bit more universal and will in more cases work across emulators and such, however if possible I would not depend on this being true.

If maximum portability, backup, or game continuity between home and mobile is your goal (and all are excellent use cases for cloud, here), then it will pay to use similar RetroArch configurations everywhere - it does run on just about everything, after all.