Add Insert Coin Controls

This commit is contained in:
alyosha-tas 2016-10-29 19:39:47 -04:00 committed by GitHub
parent bbabe23355
commit dcce0320d2
1 changed files with 25 additions and 0 deletions

View File

@ -192,6 +192,13 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
for (int i = 0; i < b.NumSides; i++)
ControllerDefinition.BoolButtons.Add("FDS Insert " + i);
}
if (_isVS)
{
ControllerDefinition.BoolButtons.Add("Insert Coin P1");
ControllerDefinition.BoolButtons.Add("Insert Coin P2");
ControllerDefinition.BoolButtons.Add("Service Switch");
}
}
// don't replace the magicSoundProvider on reset, as it's not needed
@ -327,6 +334,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
b.InsertSide(i);
}
if (_isVS)
{
if (controller["Service Switch"])
VS_service = 1;
else
VS_service = 0;
if (controller["Insert Coin P1"])
VS_coin_inserted |= 1;
else
VS_coin_inserted &= 2;
if (controller["Insert Coin P2"])
VS_coin_inserted |= 2;
else
VS_coin_inserted &= 1;
}
ppu.FrameAdvance();
if (lagged)
{