N64: Implement the video plugin (rice or glide64) option
This commit is contained in:
parent
8c16b78849
commit
08f6fdaf8d
|
@ -190,13 +190,13 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
|||
|
||||
mupen64plusApi api;
|
||||
|
||||
public N64(CoreComm comm, GameInfo game, byte[] rom, int vidX, int vidY)
|
||||
public N64(CoreComm comm, GameInfo game, byte[] rom, int vidX, int vidY, string PluginName)
|
||||
{
|
||||
CoreComm = comm;
|
||||
this.rom = rom;
|
||||
this.game = game;
|
||||
|
||||
api = new mupen64plusApi(this, rom, vidX, vidY);
|
||||
api = new mupen64plusApi(this, rom, vidX, vidY, PluginName);
|
||||
|
||||
MemoryDomains = new List<MemoryDomain>();
|
||||
MemoryDomains.Add(new MemoryDomain("RDRAM", 0x400000, Endian.Little, api.getRDRAMByte, api.setRDRAMByte));
|
||||
|
|
|
@ -371,7 +371,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
|||
IntPtr AudDll;
|
||||
IntPtr InpDll;
|
||||
|
||||
public mupen64plusApi(N64 bizhawkCore, byte[] rom, int vidX, int vidY)
|
||||
public mupen64plusApi(N64 bizhawkCore, byte[] rom, int vidX, int vidY, string PluginName)
|
||||
{
|
||||
if (AttachedCore != null)
|
||||
{
|
||||
|
@ -381,13 +381,27 @@ namespace BizHawk.Emulation.Consoles.Nintendo.N64
|
|||
|
||||
this.bizhawkCore = bizhawkCore;
|
||||
|
||||
string VidDllName;
|
||||
if (PluginName == "Rice")
|
||||
{
|
||||
VidDllName = "mupen64plus-video-rice.dll";
|
||||
}
|
||||
else if (PluginName == "Glide64")
|
||||
{
|
||||
VidDllName = "mupen64plus-video-glide64.dll";
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException(string.Format("Unknown plugin \"" + PluginName));
|
||||
}
|
||||
|
||||
// Load each of the DLLs
|
||||
CoreDll = LoadLibrary("mupen64plus.dll");
|
||||
if (CoreDll == IntPtr.Zero)
|
||||
throw new InvalidOperationException(string.Format("Failed to load mupen64plus.dll"));
|
||||
GfxDll = LoadLibrary("mupen64plus-video-glide64.dll");
|
||||
GfxDll = LoadLibrary(VidDllName);
|
||||
if (GfxDll == IntPtr.Zero)
|
||||
throw new InvalidOperationException(string.Format("Failed to load mupen64plus-video-glide64.dll"));
|
||||
throw new InvalidOperationException(string.Format("Failed to load " + VidDllName));
|
||||
RspDll = LoadLibrary("mupen64plus-rsp-hle.dll");
|
||||
if (RspDll == IntPtr.Zero)
|
||||
throw new InvalidOperationException(string.Format("Failed to load mupen64plus-rsp-hle.dll"));
|
||||
|
|
|
@ -2455,7 +2455,7 @@ namespace BizHawk.MultiClient
|
|||
case "N64":
|
||||
if (INTERIM)
|
||||
{
|
||||
nextEmulator = new N64(nextComm, game, rom.RomData, Global.Config.N64VideoSizeX, Global.Config.N64VideoSizeY);
|
||||
nextEmulator = new N64(nextComm, game, rom.RomData, Global.Config.N64VideoSizeX, Global.Config.N64VideoSizeY, Global.Config.N64VidPlugin);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue