diff --git a/Assets/dll/libgambatte.dll.so b/Assets/dll/libgambatte.so similarity index 100% rename from Assets/dll/libgambatte.dll.so rename to Assets/dll/libgambatte.so diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs index 9734533548..cee616ff43 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Gameboy/LibGambatte.cs @@ -10,11 +10,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy public static class LibGambatte { /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern IntPtr gambatte_create(); /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_destroy(IntPtr core); [Flags] @@ -55,7 +55,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// length of romdata in bytes /// ORed combination of LoadFlags. /// 0 on success, negative value on failure. - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_loadbuf(IntPtr core, byte[] romdata, uint length, LoadFlags flags); /// @@ -65,7 +65,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// the bios data, can be disposed of once this function returns /// length of romdata in bytes /// 0 on success, negative value on failure. - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_loadbiosbuf(IntPtr core, byte[] biosdata, uint length); /// @@ -86,9 +86,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// buffer with space >= samples + 2064 /// in: number of stereo samples to produce, out: actual number of samples produced /// sample number at which the video frame was produced. -1 means no frame was produced. - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_altrunfor(IntPtr core, short[] soundbuf, ref uint samples); - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern unsafe int gambatte_altrunfor(IntPtr core, short* soundbuf, ref uint samples); /// @@ -96,14 +96,14 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// in pixels - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern unsafe void gambatte_blitto(IntPtr core, int* videobuf, int pitch); /// /// blit from internal framebuffer to provided framebuffer /// /// opaque state pointer /// in pixels - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_blitto(IntPtr core, int[] videobuf, int pitch); /// @@ -111,7 +111,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// Equivalent to reloading a ROM image, or turning a Game Boy Color off and on again. /// /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_reset(IntPtr core); /// @@ -127,7 +127,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// in [0, 2]: One of BG_PALETTE, SP1_PALETTE and SP2_PALETTE. /// in [0, 3] - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setdmgpalettecolor(IntPtr core, PalType palnum, uint colornum, uint rgb32); /// @@ -135,7 +135,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// uint32[32768], input color (r,g,b) is at lut[r | g << 5 | b << 10] - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setcgbpalette(IntPtr core, int[] lut); /// @@ -165,7 +165,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// Sets the callback used for getting input state. /// /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setinputgetter(IntPtr core, InputGetter getinput); /// @@ -186,7 +186,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// null to clear - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setreadcallback(IntPtr core, MemoryCallback callback); /// @@ -194,7 +194,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// null to clear - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setwritecallback(IntPtr core, MemoryCallback callback); /// @@ -202,13 +202,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// null to clear - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setexeccallback(IntPtr core, MemoryCallback callback); /// /// set a callback whicih enables CD Logger feedback /// - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setcdcallback(IntPtr core, CDCallback callback); /// @@ -223,7 +223,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// null to clear - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_settracecallback(IntPtr core, TraceCallback callback); /// @@ -231,7 +231,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// layermask, 1=BG, 2=OBJ, 4=WINDOW - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setlayers(IntPtr core, int mask); /// @@ -248,7 +248,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// null to clear /// 0-153 inclusive - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setscanlinecallback(IntPtr core, ScanlineCallback callback, int sl); /// @@ -262,7 +262,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// the callback - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setlinkcallback(IntPtr core, LinkCallback callback); /// @@ -270,7 +270,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// use cycle-based RTC - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_settimemode(IntPtr core, bool useCycles); /// @@ -280,7 +280,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// CPU frequency adjustment - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setrtcdivisoroffset(IntPtr core, int rtcDivisorOffset); /// @@ -289,28 +289,28 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// Pull-Up Time - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setcartbuspulluptime(IntPtr core, uint cartBusPullUpTime); /// /// Returns true if the currently loaded ROM image is treated as having CGB support. /// /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_iscgb(IntPtr core); /// /// Returns true if the currently loaded ROM image is treated as having CGB-DMG support. /// /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_iscgbdmg(IntPtr core); /// /// Returns true if a ROM image is loaded. /// /// opaque state pointer - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_isloaded(IntPtr core); /// @@ -319,7 +319,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// byte buffer to write into. gambatte_savesavedatalength() bytes will be written /// determinism bool. RTC data is ignored if set - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_savesavedata(IntPtr core, byte[] dest, bool isDeterministic); /// @@ -328,7 +328,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// byte buffer to read from. gambatte_savesavedatalength() bytes will be read /// determinism bool. RTC data is ignored if set - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_loadsavedata(IntPtr core, byte[] data, bool isDeterministic); /// @@ -337,31 +337,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// determinism bool. RTC data is ignored if set /// length in bytes. 0 means no internal persistant cart memory - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_savesavedatalength(IntPtr core, bool isDeterministic); /// /// new savestate method /// - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_newstatelen(IntPtr core); /// /// new savestate method /// - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_newstatesave(IntPtr core, byte[] data, int len); /// /// new savestate method /// - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_newstateload(IntPtr core, byte[] data, int len); - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_newstatesave_ex(IntPtr core, ref TextStateFPtrs ff); - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_newstateload_ex(IntPtr core, ref TextStateFPtrs ff); /// @@ -369,7 +369,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// enough room for 16 ascii chars plus terminator - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_romtitle(IntPtr core, byte[] data); /// @@ -397,7 +397,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// pointer to the start of the area /// valid length of the area, in bytes /// success - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern bool gambatte_getmemoryarea(IntPtr core, MemoryAreas which, ref IntPtr data, ref int length); /// @@ -407,7 +407,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointer /// system bus address /// byte read - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern byte gambatte_cpuread(IntPtr core, ushort addr); /// @@ -417,7 +417,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointe /// system bus address /// byte to write - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_cpuwrite(IntPtr core, ushort addr, byte val); /// @@ -426,7 +426,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// opaque state pointe /// todo /// todo - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern int gambatte_linkstatus(IntPtr core, int which); /// @@ -434,7 +434,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// length of at least 10, please - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_getregs(IntPtr core, int[] dest); /// @@ -442,7 +442,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// length of at least 10, please - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setregs(IntPtr core, int[] src); public enum RegIndices : int @@ -455,7 +455,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// length of at least 11, please - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_getrtcregs(IntPtr core, int[] dest); /// @@ -463,7 +463,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy /// /// opaque state pointer /// length of at least 11, please - [DllImport("libgambatte.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)] public static extern void gambatte_setrtcregs(IntPtr core, int[] src); public enum RtcRegIndicies : int diff --git a/submodules/gambatte b/submodules/gambatte index 6e475f769d..b1ba962eb3 160000 --- a/submodules/gambatte +++ b/submodules/gambatte @@ -1 +1 @@ -Subproject commit 6e475f769d69b1b7f2ad3e5af1d48fdb46ebbbe8 +Subproject commit b1ba962eb39c4e29569764b6d639cb044349f95f