washingtondc-emu / washingtondc

Open-source Sega Dreamcast emulator
http://www.washemu.org
GNU General Public License v3.0
240 stars 7 forks source link

libretro port #59

Open barbudreadmon opened 5 years ago

barbudreadmon commented 5 years ago

That's not a request, i discovered your emulator after your message about FBNeo today, and i just wanted to mention that if you are interested in a libretro port, i can probably help you with that :).

snickerbockers commented 5 years ago

Yes, I'd very much appreciate your help with that!

The same IRL thing which prevents me from getting to work on the FBNeo stuff for a couple weeks is also going to keep me from making progress on WashingtonDC so I won't be around to coordinate with you for a while.

The general gist of things is that all the core emulation code is in a library called libwashdc, and the frontend code is in a program called washingtondc which links against libwashdc. So hopefully, if I've done it right then it should be possible to create a libretro core without making invasive changes to the emulator by having the core link against libwashdc and use the same APIs to control execution that washingtondc uses.

Like I said, I'll be gone for a month or two, so I'll let you know when I'm back. Or if you want you can get started now (but don't feel pressured to do so!).

Thanks again!

barbudreadmon commented 5 years ago

I'll probably start working on it soon, thanks for the explanations :)

snickerbockers commented 5 years ago

btw, the thing i was talking about that was going to keep me out of contact for a month or two turned out to not be as big of a deal as i had initially feared, so I'm able to talk about this now if you have any questions about how to implement or suggestions about things I need to change to accommodate it. I'm also going to start looking into the FB stuff soon, too.

barbudreadmon commented 5 years ago

That's great news ! I didn't have time to look at the source code yet (i spent my free time this week working with address sanitizer on FBNeo). If anything, i would expect having troubles if the gl rendering is done by a sub thread, is that the case ?

It will be my first time writing a libretro port from scratch, but at this point i'm kinda used to the libretro api (i'm already working on several cores, including a few GL ones)

snickerbockers commented 5 years ago

No, the GL rendering is done in the same thread as the emulation is.

barbudreadmon commented 5 years ago

I started working on this yesterday, maybe you'll want to take a look : https://github.com/barbudreadmon/washingtondc/tree/master/src/libretro I added a bunch of comment in libretro.cpp about what i still need to do.

snickerbockers commented 5 years ago

okay, thanks. ill make sure to go into washingtondc's core code and fix it up to make it more versatile, too. seeing this made me realize there's some hardcoded config things that still need to be exposed via APIs.