OpenEmu / Mupen64Plus-Core

OpenEmu Core plugin with Mupen64Plus to support N64 emulation
49 stars 23 forks source link

Swapping out plugins #16

Closed Fooshman135 closed 7 years ago

Fooshman135 commented 7 years ago

Hello, Apologies if this is just user error, I'm still fairly new to all of this. I'm running OpenEmu v2.0.5 on MacOS Sierra, and I want to update the following plugin (which came with v2.0.5): ~/Library/Application Support/OpenEmu/Cores/Mupen64Plus.oecoreplugin/Contents/PlugIns/mupen64plus-rsp-hle.so

This .so contains a bug, and the devs over at the mupen64plus github recently committed a patch for it. My goal, therefore, is to get mupen64plus within OpenEmu to use the patched plugin.

To attempt this, I cloned the repo containing the patch and compiled it to a .so file. I first confirmed that the patch works by running the new .so file in mupen64plus outside of OpenEmu. I then swapped it in to replace the .so at the above path. However, when I ran mupen64plus within OpenEmu, the bug was still present. This suggests that OpenEmu requires more than simply swapping out .so files, but I can't figure out what else needs to be done. What else do I need to do in order to get mupen64plus within OpenEmu to recognize the new plugin .so?

Thanks in advance!

clobber commented 7 years ago

They are not swappable at run time, and the included RSP plugin should already be more compatible than the other HLE version.

Only thing you can do is change which RSP plugin is used in the implementation itself, but again, I don't think that will affect anything.

clobber commented 7 years ago

Specifically, here: https://github.com/OpenEmu/Mupen64Plus-Core/blob/master/MupenGameCore.m#L370-L379

Fooshman135 commented 7 years ago

Thanks @clobber. Looks like the default RSP plugin is rsp-cxd4.so, not rsp-hle.so. That's strange to me because the crash report suggested rsp-hle was the culprit. In any case, suppose I wanted to change the RSP plugin from rsp-cxd4 to rsp-hle. Would I simply comment out line 379 and uncomment line 371? Like so:

// Load RSP
LoadPlugin(M64PLUGIN_RSP, @"mupen64plus-rsp-hle.so");

// Configure if using rsp-cxd4 plugin
m64p_handle configRSP;
ConfigOpenSection("rsp-cxd4", &configRSP);
int usingHLE = 1; // Set to 0 if using LLE GPU plugin/software rasterizer such as Angry Lion
ConfigSetParameter(configRSP, "DisplayListToGraphicsPlugin", M64TYPE_BOOL, &usingHLE);

//LoadPlugin(M64PLUGIN_RSP, @"mupen64plus-rsp-cxd4.so");