fix default patch set for VRC7

This commit is contained in:
goyuken 2012-09-24 17:34:17 +00:00
parent c94d5aa9b8
commit 36df8e4aab
2 changed files with 16 additions and 4 deletions

View File

@ -13,7 +13,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
Func<int, int> remap;
//state
BizHawk.Emulation.Sound.YM2413 fm = new Sound.YM2413();
BizHawk.Emulation.Sound.YM2413 fm = new Sound.YM2413(Sound.YM2413.ChipType.VRC7);
ByteBuffer prg_banks_8k = new ByteBuffer(4);
ByteBuffer chr_banks_1k = new ByteBuffer(8);

View File

@ -19,7 +19,19 @@ namespace BizHawk.Emulation.Sound
public YM2413()
{
MaxVolume = short.MaxValue;
opll = OPLL_new(3579545, 44100);
opll = OPLL_new(3579545, 44100, 0);
}
public enum ChipType
{
Default = 0,
VRC7 = 1,
YMF281B = 2
};
public YM2413(ChipType type)
{
MaxVolume = short.MaxValue;
opll = OPLL_new(3579545, 44100, (int)type);
}
public void SyncState(Serializer ser)
@ -896,7 +908,7 @@ namespace BizHawk.Emulation.Sound
}
}
OPLL OPLL_new(uint clk, uint rate)
OPLL OPLL_new(uint clk, uint rate, int type)
{
OPLL opll = new OPLL();
int i;
@ -909,7 +921,7 @@ namespace BizHawk.Emulation.Sound
opll.mask = 0;
OPLL_reset(opll);
OPLL_reset_patch(opll, 0);
OPLL_reset_patch(opll, type);
return opll;
}