RetroPlayer and Rom Collection Browser
#3
Malte, I think the work you've done here is stellar. Something I would like to see is the convenience of RetroPlayer brought to other PC emulators. Similar to how RetroPlayer loads ROMs by solving the decision problem "can game client X open rom Y?", you could implement "is PC emulator X installed?", etc. and reduce most (if not all) of the RCB setup process. To get technical, you could create a folder called emulators and each python file (like VisualBoyAdvance.py) could be a class containing all the logic for that emulator. An example interface could be:
  • IsInstalled()
  • CanPlay(filename)
  • Play(filename, config) (where config is configuration params like fullscreen that e.g. get translated into command-line params)

Abstracted emulator classes could then encode auto-configuration details by implementing as many functions for as many platforms as possible. For example, VisualBoyAdvance.IsInstalled() could sniff the registry (looking for keys set upon installation) and filesystem (looking in known locations for executables) on windows, and query the OS's platform manager under linux or sniff the common FHS directories for the executable. For portable emulators, a single folder could be designated to contain all the emulators - globbing this tree wouldn't take that log, and could match against all known emulator executable names.

Manual configuration is the fallback for unimplemented functions or custom installations, of course. At first there would be no change in functionality, but as more and more functions get implemented for different platforms, RCB would slowly get smarter and smarter.

At least that's the idea on the top of my head. There are other implementation strategies of course, the advantage of this one is that it encapsulates all the details in a single class and hides the ugliness of auto-configuration from the rest of the program.
BTC: 1JtXwJdGdE9YnYgThWBT2StFCU5sEYkbVD (personal), https://kodi.tv/contribute/donate-bitcoin (foundation). Donations in the form of controllers, especially ones that don't work in Kodi, are also appreciated.
Reply
 
Thread Rating:
  • 2 Vote(s) - 5 Average


Messages In This Thread
RE: RetroPlayer and Rom Collection Browser - by garbear - 2013-10-06, 20:59


Logout Mark Read Team Forum Stats Members Help
RetroPlayer and Rom Collection Browser52