From da5795255cbb3fd2f39f495335166b2ec60b22e7 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 11 Dec 2016 11:33:33 -0600 Subject: [PATCH] Wire up Colecovision sound --- .../Consoles/Coleco/ColecoVision.ISoundProvider.cs | 7 ++----- BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISoundProvider.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISoundProvider.cs index ff11587cf4..424dbf003f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISoundProvider.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.ISoundProvider.cs @@ -4,12 +4,9 @@ using BizHawk.Emulation.Cores.Components; namespace BizHawk.Emulation.Cores.ColecoVision { - // Sound refactor TODO: Implement ISoundProvider here and sort this mess out public partial class ColecoVision { - public SN76489 PSG; - - public IAsyncSoundProvider SoundProvider { get { return PSG; } } - //public ISyncSoundProvider SyncSoundProvider { get { return new FakeSyncSound(SoundProvider, 735); } } + private SN76489 PSG; + private FakeSyncSound _fakeSyncSound; } } diff --git a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs index 8eda990bae..a2511fb6df 100644 --- a/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs +++ b/BizHawk.Emulation.Cores/Consoles/Coleco/ColecoVision.cs @@ -44,6 +44,8 @@ namespace BizHawk.Emulation.Cores.ColecoVision VDP = new TMS9918A(Cpu); (ServiceProvider as BasicServiceProvider).Register(VDP); PSG = new SN76489(); + _fakeSyncSound = new FakeSyncSound(PSG, 735); + (ServiceProvider as BasicServiceProvider).Register(_fakeSyncSound); // TODO: hack to allow bios-less operation would be nice, no idea if its feasible BiosRom = CoreComm.CoreFileProvider.GetFirmware("Coleco", "Bios", true, "Coleco BIOS file is required.");