build here, update libgambatte bindings with new api and use it

This commit is contained in:
CasualPokePlayer 2021-11-03 18:53:51 -07:00
parent 463f9bf920
commit 2b15fc958f
3 changed files with 19 additions and 1 deletions

Binary file not shown.

View File

@ -23,7 +23,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
["E"] = (byte)(data[(int)LibGambatte.RegIndices.E] & 0xff),
["F"] = (byte)(data[(int)LibGambatte.RegIndices.F] & 0xff),
["H"] = (byte)(data[(int)LibGambatte.RegIndices.H] & 0xff),
["L"] = (byte)(data[(int)LibGambatte.RegIndices.L] & 0xff)
["L"] = (byte)(data[(int)LibGambatte.RegIndices.L] & 0xff),
["ROM Bank"] = LibGambatte.gambatte_getrombank(GambatteState),
["SRAM Bank"] = LibGambatte.gambatte_getsrambank(GambatteState)
};
}

View File

@ -469,6 +469,22 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
[DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)]
public static extern int gambatte_linkstatus(IntPtr core, int which);
/// <summary>
/// get current rom bank
/// </summary>
/// <param name="core">opaque state pointe</param>
/// <returns>current rom bank</returns>
[DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)]
public static extern int gambatte_getrombank(IntPtr core);
/// <summary>
/// get current sram bank
/// </summary>
/// <param name="core">opaque state pointe</param>
/// <returns>current sram bank</returns>
[DllImport("libgambatte", CallingConvention = CallingConvention.Cdecl)]
public static extern int gambatte_getsrambank(IntPtr core);
/// <summary>
/// get reg and flag values
/// </summary>