update gambatte (MBC1 & HuC1 improvements; HuC1 IR support)
This commit is contained in:
parent
6db532fb84
commit
a68c835a4b
Binary file not shown.
Binary file not shown.
|
@ -227,47 +227,31 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, oo & 0xff); // ShiftIn
|
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, oo & 0xff); // ShiftIn
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CanIR(one, two))
|
if (LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 259) != 0) // InfraredTrigger
|
||||||
{
|
{
|
||||||
if (LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 259) != 0) // InfraredTrigger
|
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 260); // ack
|
||||||
|
if (LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 261) != 0) // GetOut
|
||||||
{
|
{
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 260); // ack
|
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 262); // ShiftInOn
|
||||||
if (LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 261) != 0) // GetOut
|
|
||||||
{
|
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 262); // ShiftInOn
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 263); // ShiftInOff
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 259) != 0) // InfraredTrigger
|
|
||||||
{
|
{
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 260); // ack
|
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 263); // ShiftInOff
|
||||||
if (LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 261) != 0) // GetOut
|
|
||||||
{
|
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 262); // ShiftInOn
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 263); // ShiftInOff
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private bool CanIR(int one, int two)
|
if (LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 259) != 0) // InfraredTrigger
|
||||||
{
|
|
||||||
// the GB and GBA have no IR port, so ignore them for now
|
|
||||||
// todo: cart based IR
|
|
||||||
if (IsCGBMode(one) && IsCGBMode(two))
|
|
||||||
{
|
{
|
||||||
return _syncSettings._linkedSyncSettings[one].ConsoleMode is not Gameboy.GambatteSyncSettings.ConsoleModeType.GBA
|
LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 260); // ack
|
||||||
&& _syncSettings._linkedSyncSettings[two].ConsoleMode is not Gameboy.GambatteSyncSettings.ConsoleModeType.GBA;
|
if (LibGambatte.gambatte_linkstatus(_linkedCores[two].GambatteState, 261) != 0) // GetOut
|
||||||
|
{
|
||||||
|
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 262); // ShiftInOn
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LibGambatte.gambatte_linkstatus(_linkedCores[one].GambatteState, 263); // ShiftInOff
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Frame { get; private set; }
|
public int Frame { get; private set; }
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 110b3eaab52667dd37d9c2df4bc72b820587e421
|
Subproject commit 9f8f438c727dd7aa52a6a53b4c1ab388bf529e24
|
Loading…
Reference in New Issue