Could RetroArch be ported to Dreamcast?

Discussion in 'Sega Dreamcast Development and Research' started by mauler, Apr 6, 2014.

  1. mauler

    mauler Member

    Joined:
    Nov 9, 2012
    Messages:
    18
    Likes Received:
    0
    The people over at http://www.libretro.com/ have a very portable product, is the Dreamcast powerful enough if a knowledgeable coder where to port this over?
     
  2. Storm

    Storm Robust Member

    Joined:
    May 1, 2008
    Messages:
    228
    Likes Received:
    1
    Not in any meaningful way.
     
  3. petterk

    petterk Spirited Member

    Joined:
    Dec 30, 2011
    Messages:
    137
    Likes Received:
    11
    Well, it would be meaningfull to have a single application to emulate various other consoles, for practical reasons.
     
  4. Storm

    Storm Robust Member

    Joined:
    May 1, 2008
    Messages:
    228
    Likes Received:
    1
    It might be, but this project in particular will not save you any job on that. Each sub-emulator is at least as much work to port from their source as from up-stream.
     
  5. mauler

    mauler Member

    Joined:
    Nov 9, 2012
    Messages:
    18
    Likes Received:
    0

    From http://www.libretro.com/index.php/api/

    "A frontend that supports the libretro API can then load that library file and run the app"
     
  6. Storm

    Storm Robust Member

    Joined:
    May 1, 2008
    Messages:
    228
    Likes Received:
    1
    Yes, that means nothing to the Dreamcast.
     
  7. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    It would probably be relatively easy for a (good) developer (with free time) to port a retroarch frontend to dreamcast. But even then, each emulator core would have to be also ported, and that is a lot of tedious work. There's already a few good and well-optimized emulators for dreamcast, so redoing this job over again just to get a single frontend...

    A better way to spend developer time would probably be to build a frontend for a set of pre-existing emulators.
     
    Last edited: Apr 23, 2014
  8. mauler

    mauler Member

    Joined:
    Nov 9, 2012
    Messages:
    18
    Likes Received:
    0
    As far as I understand how RetroArch works, is that you port the front end and all of the Libertro cores will plug in and work. It would just be a matter of how well the front end was ported and which cores can attain a reasonable level of speed.

    "When you choose to use the libretro API, your program gets turned into a single library file (called a ‘libretro core’). A frontend that supports the libretro API can then load that library file and run the app."
     
  9. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,906
    Likes Received:
    21
    What is the point? The Dreamcast is too slow to port a genericly written emulator to. To get the most out of the 200-400 MIPs available you'd really have to optimize and cut corners wherever possible.

    If you're that dedicated to the DC you might want to try your own hand at it because it's a tall order for anyone less passionate.
     
  10. APE

    APE Site Supporter 2015

    Joined:
    Dec 5, 2005
    Messages:
    6,416
    Likes Received:
    138
    SH4 ASM can do some pretty spiffy things if you know what you're doing. I recall seeing crt0 and Sayten try their hands at a Genesis emulator for the Dreamcast but found it difficult to work with. Being this was 11 years ago I've largely forgotten why but it should be obvious to anyone trying their hand today.
     
  11. libretro

    libretro Active Member

    Joined:
    Aug 17, 2012
    Messages:
    25
    Likes Received:
    0
    I still have a Dreamcast and I would have done the port myself at this point weren't it for the fact that my DC only has a 33K6 modem (European model), and trying to develop for such a thing through that would be hell. And I dont' feel like spending lots of money on a broadband adapter or some kind of SDcard I/O device just to port it over.

    We rely mostly on gifted devices/hardware for the libretro/RA project. So far our 'slowest' system that we support is the PSP and it can run a fair number of cores at fullspeed.
     
    Last edited: May 13, 2014
  12. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    It could mostly be tested on an emulator and then the dreamcast can boot cdr's & the sd card interfaces are really cheap.

    The dreamcast is slower than the PSP, so it wouldn't run well at all.

    If you're lucky then you can get a compiler for the dreamcast that means you don't have to do too much in the way of changes to each "core".
     
  13. libretro

    libretro Active Member

    Joined:
    Aug 17, 2012
    Messages:
    25
    Likes Received:
    0
    I hope you're kidding. Because this is not serious at all.

    But we know the real reason why you felt compelled to make a post about a possible RA DC port. Anyway, I'll play along for now.

    I don't think we need to make any assumptions about how well it would run. We all know that the Dreamcast is severely underpowered and this will undoubtedly be reflected in whatever code you would run at it. Nevertheless, homebrew for it is dead. The system as-is is dead. And it will remain dead until some project like RetroArch/libretro with an ever expanding library of content expands to this platform.

    This is exactly what I made libretro/RetroArch for in the first place - to ensure that old systems don't just die over time due to neglect of individual developers/porters.

    I don't think you need to tell a guy who has been there, done that for over 12 different platforms exactly what he needs to do to get this. Just like I don't go around the block and tell you how you need to do your MAME dev work.

    This is literally half a day's work. 'Porting the cores over' would be no effort at all based on my experiences with all the other platforms so far.
     
    Last edited: May 14, 2014
  14. libretro

    libretro Active Member

    Joined:
    Aug 17, 2012
    Messages:
    25
    Likes Received:
    0
    So basically re-implement RetroArch then? Because that is essentially what you're talking about.

    Anyway, RetroArch is not strictly limited to a bunch of emulators. It has several game ports too - and non-game cores as well (ffmpeg, OpenGL 3D modelling, etc)
     
    Last edited: May 14, 2014
  15. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    Yeah that's what I'm talking about. That or modifying the RetroArch frontend so that it interfaces with pre-existing DC emulators.

    The DC isn't THAT underpowered, but emulator cores would certainly require a lot of SH4 optimisation to work at playable speeds (for snes especially). I mean even if you'd port the realistic cores (snes and under) relatively easily, they probably wouldn't run at satisfying speed unless there's a lot of dreamcast-oriented optimisation done. I don't know your background, but DC developpers well-versed in SH4 assembly optimisation are pretty scarce nowadays.
     
    Last edited: May 14, 2014
  16. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    I'm not kidding. Testing on an emulator is the fastest way & you can build an SD card adapter yourself or buy one cheap off ebay.

    I'd like to see it, but if you're not going to do it then I'm not going to lose sleep.
     
    Last edited: May 14, 2014
  17. Sonny_Jim

    Sonny_Jim Enthusiastic Member

    Joined:
    Apr 29, 2012
    Messages:
    525
    Likes Received:
    31
    What use is 10,000 games if they all run at 4fps?
     
  18. libretro

    libretro Active Member

    Joined:
    Aug 17, 2012
    Messages:
    25
    Likes Received:
    0

    Most of those 'optimised' Dreamcast emulators were just hacked-up ports of the usual suspects (SNES9x, some Genesis emu - probably DGen) with interpreters written in SH4 assembly. AFAIK there weren't really many emulators made from scratch specifically for the console. So nothing that wouldn't be possible to backport really to newer versions with some effort. Then again, I'm certainly not going to undertake that effort myself and as we've seen with the other platforms, after the systems' shelf-life has expired, so does most of the talent and the interest of the devs.

    Anyway, you could raise the same arguments against SDL/any middleware tool at this point. Libretro/RetroArch is more about the API and a single codebase for all platforms under one roof. Therefore, any port to any one platform makes sense. Nothing in the libretro API really prevents you from being able to do custom code for a specific platform (we roll in custom PSP command buffer blitting for some of the cores we use on PSP to get higher framerates - just as an example - while all other platforms still take the 'generic' codepath). And it's better that it's all under one roof anyway as opposed to all sorts of different splintered projects that all wither on the vine as time passes on.
     
    Last edited: May 14, 2014
  19. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,034
    Likes Received:
    891
    I understand the point and structure of libRetro. I'm just pointing that it's not really adapted for the Dreamcast.

    The emulators on DC are mainly ports yeah, not necessarily hacked-up, that were optimized on some points to enhance performance. DreamSnes comes to mind as a fine example of an emulator that was SH4 optimized through it's lifetime.

    You're missing the point with the middleware comparison, as I'm not arguing against the good-points of middlewares and the libraries/cores structure of libretro. I'm just saying this architecture isn't well-adapted for lower-powered architectures as the DC where per-system optimisation is important. It does totally make sense for pc/7th gen consoles/pandora/phone OSes though!
     
    Last edited: May 14, 2014
  20. libretro

    libretro Active Member

    Joined:
    Aug 17, 2012
    Messages:
    25
    Likes Received:
    0
    Well, we have to do per-system optimization now for the PSP, and so the generic API isn't really limiting or preventing that in any way. If anything, libretro/RA just allows you to more elegantly write a codebase that targets all platforms at the same time instead of every port residing in its own little 'island' (codebase).

    It's just a vastly better way for a dev to work on things that will be sustainable in the long run rather than having all these standalone forks around that won't last the test of time because platforms eventually get abandoned and so will the development work on a fork targeted at mainly one platform. The same can't be said for a codebase that targets all platforms at the same time - there's always an incentive to contribute to it and to push it along.
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page