Clean up namespaces for BizHawk.Emulation sound files

This commit is contained in:
adelikat 2013-11-14 19:33:13 +00:00
parent 906c0316a6
commit 25b242ade4
40 changed files with 1442 additions and 1426 deletions

View File

@ -998,7 +998,7 @@ namespace BizHawk.Client.EmuHawk
//avi/wav state
private IVideoWriter CurrAviWriter;
private ISoundProvider AviSoundInput;
private Emulation.Sound.MetaspuSoundProvider DumpProxy; //an audio proxy used for dumping
private MetaspuSoundProvider DumpProxy; //an audio proxy used for dumping
private long SoundRemainder; //audio timekeeping for video dumping
private int avwriter_resizew;
private int avwriter_resizeh;
@ -1412,7 +1412,7 @@ namespace BizHawk.Client.EmuHawk
if (!Global.Emulator.StartAsyncSound())
{
// if the core doesn't support async mode, use a standard vecna wrapper
GlobalWin.Sound.SetAsyncInputPin(new Emulation.Sound.MetaspuAsync(Global.Emulator.SyncSoundProvider, Emulation.Sound.ESynchMethod.ESynchMethod_V));
GlobalWin.Sound.SetAsyncInputPin(new MetaspuAsync(Global.Emulator.SyncSoundProvider, ESynchMethod.ESynchMethod_V));
}
else
{
@ -2854,10 +2854,10 @@ namespace BizHawk.Client.EmuHawk
// do sound rewire. the plan is to eventually have AVI writing support syncsound input, but it doesn't for the moment
if (!Global.Emulator.StartAsyncSound())
AviSoundInput = new Emulation.Sound.MetaspuAsync(Global.Emulator.SyncSoundProvider, Emulation.Sound.ESynchMethod.ESynchMethod_V);
AviSoundInput = new MetaspuAsync(Global.Emulator.SyncSoundProvider, ESynchMethod.ESynchMethod_V);
else
AviSoundInput = Global.Emulator.SoundProvider;
DumpProxy = new Emulation.Sound.MetaspuSoundProvider(Emulation.Sound.ESynchMethod.ESynchMethod_V);
DumpProxy = new MetaspuSoundProvider(ESynchMethod.ESynchMethod_V);
SoundRemainder = 0;
RewireSound();
}

View File

@ -1,13 +1,13 @@
using System;
using BizHawk.Emulation.Sound;
using System.Collections.Generic;
#if WINDOWS
using SlimDX.DirectSound;
using SlimDX.Multimedia;
#endif
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{

View File

@ -1,5 +1,7 @@
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common;
#pragma warning disable 649 //adelikat: Disable dumb warnings until this file is complete
#pragma warning disable 169 //adelikat: Disable dumb warnings until this file is complete
@ -14,7 +16,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
// ------------------------------------
public Sound.Utilities.SpeexResampler resampler;
public SpeexResampler resampler;
static int[] syncNextTable = new int[] { 1, 2, 0 };
static int[] syncPrevTable = new int[] { 2, 0, 1 };
@ -72,7 +74,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
for (int i = 0; i < 3; i++)
filterEnable[i] = false;
resampler = new Sound.Utilities.SpeexResampler(0, cyclesNum, sampleRate * cyclesDen, cyclesNum, sampleRate * cyclesDen, null, null);
resampler = new SpeexResampler(0, cyclesNum, sampleRate * cyclesDen, cyclesNum, sampleRate * cyclesDen, null, null);
}
public void Dispose()

View File

@ -1,6 +1,7 @@
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components.M6502;
@ -12,7 +13,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
public MOS6502X cpu;
public M6532 m6532;
public TIA tia;
public Emulation.Sound.Utilities.DCFilter dcfilter;
public DCFilter dcfilter;
public byte[] ram = new byte[128];
public MapperBase mapper;
@ -183,7 +184,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
//tia = new TIA(this, frameBuffer);
tia = new TIA(this);
// dcfilter coefficent is from real observed hardware behavior: a latched "1" will fully decay by ~170 or so tia sound cycles
dcfilter = Emulation.Sound.Utilities.DCFilter.AsISoundProvider(tia, 256);
dcfilter = DCFilter.AsISoundProvider(tia, 256);
// Setup 6532
m6532 = new M6532(this);

View File

@ -344,16 +344,16 @@ namespace BizHawk.Emulation.Cores.Atari.Atari7800
// really shouldn't happen (after init), but if it does, we're ready
if (resampler != null)
resampler.Dispose();
resampler = new Emulation.Sound.Utilities.SpeexResampler(3, newsamplerate, 44100, newsamplerate, 44100, null, null);
resampler = new SpeexResampler(3, newsamplerate, 44100, newsamplerate, 44100, null, null);
samplerate = newsamplerate;
dcfilter = Emulation.Sound.Utilities.DCFilter.DetatchedMode(256);
dcfilter = DCFilter.DetatchedMode(256);
}
}
uint samplerate;
int[] vidbuffer;
Emulation.Sound.Utilities.SpeexResampler resampler;
Emulation.Sound.Utilities.DCFilter dcfilter;
SpeexResampler resampler;
DCFilter dcfilter;
public void FillFrameBuffer()
{

View File

@ -4,8 +4,8 @@ using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components;
using BizHawk.Emulation.Common.Components.Z80;
using BizHawk.Emulation.Sound;
namespace BizHawk.Emulation.Cores.ColecoVision
{

View File

@ -826,10 +826,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
int latchaudio = 0;
//Sound.Utilities.SpeexResampler resampler;
//Sound.Utilities.DCFilter dcfilter;
//SpeexResampler resampler;
//DCFilter dcfilter;
Sound.Utilities.BlipBuffer blip;
BlipBuffer blip;
void ProcessSound()
{
@ -862,7 +862,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
//dcfilter = Sound.Utilities.DCFilter.AsISyncSoundProvider(resampler, 65536);
// lowpass filtering on an actual GB was probably pretty aggressive?
//dcfilter = Sound.Utilities.DCFilter.AsISyncSoundProvider(resampler, 2048);
blip = new Sound.Utilities.BlipBuffer(1024);
blip = new BlipBuffer(1024);
blip.SetRates(2097152, 44100);
}

View File

@ -60,8 +60,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
LagCount = 0;
IsLagFrame = false;
blip_left = new Sound.Utilities.BlipBuffer(1024);
blip_right = new Sound.Utilities.BlipBuffer(1024);
blip_left = new BlipBuffer(1024);
blip_right = new BlipBuffer(1024);
blip_left.SetRates(2097152 * 2, 44100);
blip_right.SetRates(2097152 * 2, 44100);
@ -357,9 +357,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.Gameboy
// i tried using the left and right buffers and then mixing them together... it was kind of a mess of code, and slow
Sound.Utilities.BlipBuffer blip_left;
Sound.Utilities.BlipBuffer blip_right;
BlipBuffer blip_left;
BlipBuffer blip_right;
short[] LeftBuffer = new short[(35112 + 2064) * 2];
short[] RightBuffer = new short[(35112 + 2064) * 2];

View File

@ -33,7 +33,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
public int BackgroundColor { get { return 0; } }
public Sound.Utilities.SpeexResampler resampler;
public SpeexResampler resampler;
public ISoundProvider SoundProvider { get { return null; } }
public ISyncSoundProvider SyncSoundProvider { get { return resampler; } }

View File

@ -5,6 +5,8 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.N64
{
public class mupen64plusApi : IDisposable
@ -515,7 +517,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.N64
// Set up the resampler
m64pSamplingRate = (uint)AudGetAudioRate();
bizhawkCore.resampler = new Sound.Utilities.SpeexResampler(6, m64pSamplingRate, 44100, m64pSamplingRate, 44100, null, null);
bizhawkCore.resampler = new SpeexResampler(6, m64pSamplingRate, 44100, m64pSamplingRate, 44100, null, null);
AttachedCore = this;
}

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Sound;
//http://wiki.nesdev.com/w/index.php/APU_Mixer_Emulation
//http://wiki.nesdev.com/w/index.php/APU

View File

@ -2,6 +2,7 @@
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components;
//simplifications/approximations:
//* "Note that no commercial games rely on this mirroring -- therefore you can take the easy way out and simply give all MMC5 games 64k PRG-RAM."
@ -38,7 +39,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
int wram_bank;
byte[] EXRAM = new byte[1024];
byte multiplicand, multiplier;
Sound.MMC5Audio audio;
MMC5Audio audio;
//regeneratable state
IntBuffer a_banks_1k = new IntBuffer(8);
IntBuffer b_banks_1k = new IntBuffer(8);
@ -119,7 +120,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
PoweronState();
if (NES.apu != null)
audio = new Sound.MMC5Audio(NES.apu.ExternalQueue, (e) => { irq_audio = e; SyncIRQ(); });
audio = new MMC5Audio(NES.apu.ExternalQueue, (e) => { irq_audio = e; SyncIRQ(); });
return true;
}

View File

@ -1,4 +1,5 @@
using BizHawk.Common;
using BizHawk.Emulation.Common.Components;
namespace BizHawk.Emulation.Cores.Nintendo.NES
{
@ -7,7 +8,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
public sealed class Sunsoft_5 : Sunsoft_FME7
{
Sound.Sunsoft5BAudio audio;
Sunsoft5BAudio audio;
public override bool Configure(NES.EDetectionOrigin origin)
{
@ -23,7 +24,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
BaseConfigure();
if (NES.apu != null)
audio = new Sound.Sunsoft5BAudio(NES.apu.ExternalQueue);
audio = new Sunsoft5BAudio(NES.apu.ExternalQueue);
return true;
}

View File

@ -1,5 +1,7 @@
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Cores.Nintendo.NES
{
@ -116,15 +118,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
ser.Sync("ch", ref ch);
}
Sound.Utilities.SpeexResampler resampler;
Sound.Utilities.DCFilter dc;
Sound.MetaspuAsync metaspu;
SpeexResampler resampler;
DCFilter dc;
MetaspuAsync metaspu;
public Namco163Audio()
{
resampler = new Sound.Utilities.SpeexResampler(2, 119318, 44100, 119318, 44100, null, null);
dc = Sound.Utilities.DCFilter.DetatchedMode(4096);
metaspu = new Sound.MetaspuAsync(resampler, Sound.ESynchMethod.ESynchMethod_V);
resampler = new SpeexResampler(2, 119318, 44100, 119318, 44100, null, null);
dc = DCFilter.DetatchedMode(4096);
metaspu = new MetaspuAsync(resampler, ESynchMethod.ESynchMethod_V);
}
public void ApplyCustomAudio(short[] samples)

View File

@ -1,5 +1,7 @@
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common.Components;
namespace BizHawk.Emulation.Cores.Nintendo.NES
{
@ -12,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
bool newer_variant;
//Sound.VRC6 VRC6Sound = new Sound.VRC6();
Sound.VRC6Alt VRC6Sound;
VRC6Alt VRC6Sound;
//state
int prg_bank_16k, prg_bank_8k;
@ -96,7 +98,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
SetMirrorType(EMirrorType.Vertical);
if (NES.apu != null) // don't start up sound when in configurator
VRC6Sound = new Sound.VRC6Alt((uint)NES.cpuclockrate, NES.apu.ExternalQueue);
VRC6Sound = new VRC6Alt((uint)NES.cpuclockrate, NES.apu.ExternalQueue);
return true;
}

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using BizHawk.Common;
using BizHawk.Emulation.Common.Components;
namespace BizHawk.Emulation.Cores.Nintendo.NES
{
@ -14,7 +15,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
Func<int, int> remap;
//state
BizHawk.Emulation.Sound.YM2413 fm; //= new Sound.YM2413(Sound.YM2413.ChipType.VRC7);
YM2413 fm; //= new Sound.YM2413(Sound.YM2413.ChipType.VRC7);
ByteBuffer prg_banks_8k = new ByteBuffer(4);
ByteBuffer chr_banks_1k = new ByteBuffer(8);
@ -94,7 +95,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
// presumably the only reason a homebrew would use mapper085 is for the sound?
// so initialize like lagrange point
remap = (addr) => ((addr & 0xF000) | ((addr & 0x30) >> 4));
fm = new Sound.YM2413(Sound.YM2413.ChipType.VRC7);
fm = new YM2413(YM2413.ChipType.VRC7);
break;
case "KONAMI-VRC-7":
AssertPrg(128, 512); AssertChr(0, 128); AssertVram(0, 8); AssertWram(0, 8);
@ -109,7 +110,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
//lagrange point
remap = (addr) => ((addr & 0xF000) | ((addr & 0x30) >> 4));
fm = new Sound.YM2413(Sound.YM2413.ChipType.VRC7);
fm = new YM2413(YM2413.ChipType.VRC7);
}
else
throw new Exception("Unknown PCB type for VRC7");

View File

@ -66,7 +66,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
class MagicSoundProvider : ISoundProvider, ISyncSoundProvider, IDisposable
{
Sound.Utilities.BlipBuffer blip;
BlipBuffer blip;
NES nes;
const int blipbuffsize = 4096;
@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
{
this.nes = nes;
blip = new Sound.Utilities.BlipBuffer(blipbuffsize);
blip = new BlipBuffer(blipbuffsize);
blip.SetRates(infreq, 44100);
//var actualMetaspu = new Sound.MetaspuSoundProvider(Sound.ESynchMethod.ESynchMethod_V);

View File

@ -975,11 +975,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
#region audio stuff
Sound.Utilities.SpeexResampler resampler;
SpeexResampler resampler;
void InitAudio()
{
resampler = new Sound.Utilities.SpeexResampler(6, 64081, 88200, 32041, 44100);
resampler = new SpeexResampler(6, 64081, 88200, 32041, 44100);
}
void snes_audio_sample(ushort left, ushort right)

View File

@ -1,5 +1,4 @@
using System;
using BizHawk.Emulation.Sound;
using System.IO;
using System.Globalization;

View File

@ -5,9 +5,9 @@ using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components;
using BizHawk.Emulation.Common.Components.H6280;
using BizHawk.Emulation.DiscSystem;
using BizHawk.Emulation.Sound;
namespace BizHawk.Emulation.Cores.PCEngine
{

View File

@ -3,8 +3,8 @@ using System.IO;
using System.Globalization;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.DiscSystem;
using BizHawk.Emulation.Sound;
namespace BizHawk.Emulation.Cores.PCEngine
{

View File

@ -7,12 +7,11 @@ using System.Runtime.InteropServices;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components;
using BizHawk.Emulation.Common.Components.M68000;
using BizHawk.Emulation.Common.Components.Z80;
using BizHawk.Emulation.Sound;
using Native68000;
namespace BizHawk.Emulation.Cores.Sega.Genesis
{
public sealed partial class Genesis : IEmulator

View File

@ -5,8 +5,8 @@ using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.Components;
using BizHawk.Emulation.Common.Components.Z80;
using BizHawk.Emulation.Sound;
/*****************************************************

View File

@ -9,7 +9,7 @@ using BizHawk.Emulation.DiscSystem;
// I decided not to let the perfect be the enemy of the good.
// It can always be refactored. It's at least deterministic.
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
public sealed class CDAudio : ISoundProvider
{

View File

@ -6,7 +6,7 @@ using System.IO;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
// Emulates PSG audio unit of a PC Engine / Turbografx-16 / SuperGrafx.
// It is embedded on the CPU and doesn't have its own part number. None the less, it is emulated separately from the 6280 CPU.

View File

@ -5,7 +5,7 @@ using System.Text;
using BizHawk.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
public class MMC5Audio
{

View File

@ -5,11 +5,13 @@ using System.IO;
using BizHawk.Emulation.Common;
// Emulates a Texas Instruments SN76489
// TODO the freq->note translation should be moved to a separate utility class.
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
/// <summary>
/// Emulates a Texas Instruments SN76489
/// </summary>
public sealed class SN76489 : ISoundProvider
{
public sealed class Channel

View File

@ -5,11 +5,13 @@ using System.Text;
using BizHawk.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
// YM2149F variant
// this implementation is quite incomplete
// http://wiki.nesdev.com/w/index.php/Sunsoft_5B_audio
/// <summary>
/// YM2149F variant
/// this implementation is quite incomplete
/// http://wiki.nesdev.com/w/index.php/Sunsoft_5B_audio
/// </summary>
public class Sunsoft5BAudio
{
class Pulse

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace BizHawk.Emulation.Sound.Utilities
namespace BizHawk.Emulation.Common
{
/// <summary>
/// wrapper around blargg's unmanaged blip_buf

View File

@ -2,7 +2,7 @@
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
// Generates SEMI-synchronous sound, or "buffered asynchronous" sound.

View File

@ -5,7 +5,7 @@ using System.Text;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound.Utilities
namespace BizHawk.Emulation.Common
{
/// <summary>
/// implements a DC block filter on top of an ISoundProvider. rather simple.

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
public sealed class Equalizer
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
/// <summary>
/// uses Metaspu to have an ISyncSoundProvider input to a ISoundProvider
@ -36,8 +36,6 @@ namespace BizHawk.Emulation.Sound
public int MaxVolume { get; set; }
}
public class MetaspuSoundProvider : ISoundProvider
{
public ISynchronizingAudioBuffer buffer;
@ -46,7 +44,8 @@ namespace BizHawk.Emulation.Sound
buffer = Metaspu.metaspu_construct(method);
}
public MetaspuSoundProvider() : this(ESynchMethod.ESynchMethod_V)
public MetaspuSoundProvider()
: this(ESynchMethod.ESynchMethod_V)
{
}
@ -236,9 +235,11 @@ namespace BizHawk.Emulation.Sound
{
targetRate = 1.0f - (targetLatency - averageSize) / kAverageSize;
}
else if(averageSize > targetLatency) {
else if (averageSize > targetLatency)
{
targetRate = 1.0f + (averageSize - targetLatency) / kAverageSize;
} else targetRate = 1.0f;
}
else targetRate = 1.0f;
//rate = moveValueTowards(rate,targetRate,0.001f);
rate = targetRate;
@ -255,9 +256,11 @@ namespace BizHawk.Emulation.Sound
addStatistic();
if (size == 0) { return; }
cursor += rate;
while(cursor>1.0f) {
while (cursor > 1.0f)
{
cursor -= 1.0f;
if(size>0) {
if (size > 0)
{
curr[0] = buffer.Dequeue();
curr[1] = buffer.Dequeue();
size--;
@ -668,7 +671,9 @@ namespace BizHawk.Emulation.Sound
buf[index++] += sample.left;
buf[index++] += sample.right;
}
} else {
}
else
{
// we're outside of a "reasonable" underflow. Give up and output silence.
// Do nothing. The whole frame will be excess buffer.
}

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
// This is a straightforward class to mix/chain multiple ISoundProvider sources.

View File

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound.Utilities
namespace BizHawk.Emulation.Common
{
/// <summary>
/// junk wrapper around LibSpeexDSP. quite inefficient. will be replaced

View File

@ -1,4 +1,4 @@
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common
{
public static class Waves
{

View File

@ -5,7 +5,7 @@ using System.Text;
using BizHawk.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
public class VRC6Alt
{

View File

@ -1,16 +1,15 @@
using System;
// Credits:
// Credits:
// Original emulator written by Mitsutaka Okazaki 2001.
// Original conversion to C# by Ben Ryves.
// TODO The savestate support here is very simplistic and incomplete. However, this does not result in desyncs as the YM2413 is write-only.
// TODO This should eventually be replaced, due to 1) uncertain licensing terms 2) This is not a native C# implementation, but a naive port.
using System;
using BizHawk.Common;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
public sealed class YM2413 : ISoundProvider
{

View File

@ -5,7 +5,7 @@ using System.IO;
using BizHawk.Emulation.Common;
namespace BizHawk.Emulation.Sound
namespace BizHawk.Emulation.Common.Components
{
// ======================================================================
// Yamaha YM2612 Emulation Core