init MelonDS
This commit is contained in:
parent
a867176a94
commit
409e7fabb5
|
@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
|
|
||||||
public ControllerDefinition ControllerDefinition { get; private set; }
|
public ControllerDefinition ControllerDefinition { get; private set; }
|
||||||
|
|
||||||
public int Frame => throw new NotImplementedException();
|
public int Frame => 0;
|
||||||
|
|
||||||
public string SystemId => "NDS";
|
public string SystemId => "NDS";
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool FrameAdvance(IController controller, bool render, bool rendersound = true)
|
public bool FrameAdvance(IController controller, bool render, bool rendersound = true)
|
||||||
|
@ -45,7 +45,9 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
//const string dllPath = "libmelonDS.dll";
|
//const string dllPath = "libmelonDS.dll";
|
||||||
|
|
||||||
[DllImport(dllPath)]
|
[DllImport(dllPath)]
|
||||||
public static extern int test();
|
public static extern bool Init();
|
||||||
|
[DllImport(dllPath)]
|
||||||
|
public static extern void Deinit();
|
||||||
|
|
||||||
[CoreConstructor("NDS")]
|
[CoreConstructor("NDS")]
|
||||||
public MelonDS()
|
public MelonDS()
|
||||||
|
@ -78,7 +80,8 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.NDS
|
||||||
CoreComm.NominalWidth = 256;
|
CoreComm.NominalWidth = 256;
|
||||||
CoreComm.NominalHeight = 192;
|
CoreComm.NominalHeight = 192;
|
||||||
|
|
||||||
Console.WriteLine("Melon returned " + test());
|
if (!Init())
|
||||||
|
throw new Exception("Failed to init NDS.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue