From 89940b85afa67f8d903f9bba82e516d9faa61039 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Wed, 7 Dec 2016 20:49:47 -0500 Subject: [PATCH] Intellivision wire up sound system --- .../Intellivision/Intellivision.IEmulator.cs | 8 ++++---- .../Consoles/Intellivision/Intellivision.cs | 2 ++ .../Consoles/Intellivision/PSG.cs | 14 +++++++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs index a733f8c176..41509f0cdb 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.IEmulator.cs @@ -7,16 +7,16 @@ namespace BizHawk.Emulation.Cores.Intellivision { public IEmulatorServiceProvider ServiceProvider { get; private set; } - [FeatureNotImplemented] + private DCFilter _dcfilter; + public ISoundProvider SoundProvider { - get { return NullSound.SilenceProvider; } + get { return _dcfilter; } } - [FeatureNotImplemented] public ISyncSoundProvider SyncSoundProvider { - get { return new FakeSyncSound(NullSound.SilenceProvider, 735); } + get { return new FakeSyncSound(_dcfilter, 735); } } public bool StartAsyncSound() diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs index 182d21dcd5..4a90e1b64e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/Intellivision.cs @@ -63,6 +63,8 @@ namespace BizHawk.Emulation.Cores.Intellivision (ServiceProvider as BasicServiceProvider).Register(Tracer); SetupMemoryDomains(); + + _dcfilter = DCFilter.AsISoundProvider(_psg, 256); // not sure how the 256 will change for intellivision I just copied it from Atari for now } public IntellivisionControllerDeck ControllerDeck { get; private set; } diff --git a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs index 0df58f39f5..f9c2a4bb01 100644 --- a/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs +++ b/BizHawk.Emulation.Cores/Consoles/Intellivision/PSG.cs @@ -1,13 +1,25 @@ using BizHawk.Common.NumberExtensions; using System; using BizHawk.Common; +using BizHawk.Emulation.Common; namespace BizHawk.Emulation.Cores.Intellivision { - public sealed class PSG + public sealed class PSG : ISoundProvider { public ushort[] Register = new ushort[16]; + public int MaxVolume { get; set; } + + public void DiscardSamples() + { + + } + + public void GetSamples(short[] samples) + { + } + public int TotalExecutedCycles; public int PendingCycles;