diff --git a/Library/DirectSound.cs b/Library/DirectSound.cs index 9121004..8cd9766 100644 --- a/Library/DirectSound.cs +++ b/Library/DirectSound.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Security; using System.Threading; namespace Jellyfish.Library @@ -26,6 +27,7 @@ public static DirectSoundUpdateEventArgs Create(IntPtr buffer, int bufferSize) public sealed partial class DirectSound : IDisposable { + [SecurityCritical] public DirectSound(int sampleRate, int sampleChannels, int sampleBits, int sampleSize) { _sampleRate = sampleRate; @@ -55,6 +57,7 @@ public void Stop() _thread.Join(); } + [SecurityCritical] private void Initialize() { int hresult = NativeMethods.DirectSoundCreate(IntPtr.Zero, out _device, IntPtr.Zero); @@ -83,6 +86,7 @@ private void Initialize() _buffer.Play(0, 0, BufferPlay.Looping); } + [SecurityCritical] private void ClearBuffer() { UpdateBuffer(0, 0, BufferLock.EntireBuffer, (buffer, bufferSize) => MarshalHelpers.ZeroMemory(buffer, bufferSize)); @@ -100,7 +104,7 @@ private void RestoreBuffer() private void UpdateBuffer(int block) { - EventHandler handler = Update; + var handler = Update; if (handler != null) { UpdateBuffer(block * _sampleSize, _sampleSize, BufferLock.None, (buffer, bufferSize) => handler(this, DirectSoundUpdateEventArgs.Create(buffer, bufferSize))); @@ -144,6 +148,7 @@ private void Uninitialize() } } + [SecurityCritical] private void Run() // com mta thread { Initialize(); diff --git a/Library/DirectSoundInterop.cs b/Library/DirectSoundInterop.cs index 026e036..677a31e 100644 --- a/Library/DirectSoundInterop.cs +++ b/Library/DirectSoundInterop.cs @@ -97,6 +97,7 @@ private interface IDirectSoundNotify void SetNotificationPositions(int dwPositionNotifies, [MarshalAs(UnmanagedType.LPArray)] BufferPositionNotify[] pcPositionNotifies); } + [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static class NativeMethods { diff --git a/Library/Wpf/FrameRateCounter.xaml b/Library/FrameRateCounter.xaml similarity index 100% rename from Library/Wpf/FrameRateCounter.xaml rename to Library/FrameRateCounter.xaml diff --git a/Library/Silverlight/FrameRateCounter.xaml.cs b/Library/FrameRateCounter.xaml.cs similarity index 100% rename from Library/Silverlight/FrameRateCounter.xaml.cs rename to Library/FrameRateCounter.xaml.cs diff --git a/Library/GCHandleHelpers.cs b/Library/GCHandleHelpers.cs index bab841d..abd9c5c 100644 --- a/Library/GCHandleHelpers.cs +++ b/Library/GCHandleHelpers.cs @@ -1,12 +1,12 @@ using System; using System.Runtime.InteropServices; -using System.Security.Permissions; +using System.Security; namespace Jellyfish.Library { public static class GCHandleHelpers { - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public static void Pin(object value, Action action) { if (action == null) diff --git a/Library/GeneralSecurity.cs b/Library/GeneralSecurity.cs index c224790..43914f5 100644 --- a/Library/GeneralSecurity.cs +++ b/Library/GeneralSecurity.cs @@ -1,8 +1,8 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; +using System.Security; using System.Security.AccessControl; -using System.Security.Permissions; using System.Security.Principal; namespace Jellyfish.Library @@ -10,7 +10,6 @@ namespace Jellyfish.Library [StructLayout(LayoutKind.Sequential)] public sealed class SecurityAttributes { - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] public SecurityAttributes() { _length = Marshal.SizeOf(typeof(SecurityAttributes)); @@ -118,13 +117,13 @@ public void AddAuditRule(GeneralAuditRule rule) base.AddAuditRule(rule); } - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public void GetSecurityAttributes(bool inheritable, Action action) { GetSecurityAttributes(this, inheritable, action); } - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public static void GetSecurityAttributes(ObjectSecurity security, bool inheritable, Action action) { if (action == null) diff --git a/Library/Jellyfish.Library.sln b/Library/Jellyfish.Library.sln index 1df2317..cc7449c 100644 --- a/Library/Jellyfish.Library.sln +++ b/Library/Jellyfish.Library.sln @@ -1,98 +1,122 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "Silverlight\Jellyfish.Library.Silverlight.csproj", "{DAB11A70-D08B-4A96-8A54-E81B1DE39681}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "Silverlight\Jellyfish.Library.Silverlight.csproj", "{99CA7796-B72A-4F8C-BCDB-0D688220A331}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Wpf", "Wpf\Jellyfish.Library.Wpf.csproj", "{D47A24A9-1590-4E8A-A406-BC66D5891BFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight.Phone", "Silverlight\Phone\Jellyfish.Library.Silverlight.Phone.csproj", "{D4880706-29A6-449C-A2A6-3058C37583DA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "Xna\Jellyfish.Library.Xna.csproj", "{E246958B-EAD8-48E9-844B-54718C952869}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Wpf", "Wpf\Jellyfish.Library.Wpf.csproj", "{93900841-7250-4D3A-837E-43EE3FD118DC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "Xna\Jellyfish.Library.Xna.Xbox.csproj", "{6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "Xna\Jellyfish.Library.Xna.csproj", "{82F56318-A1FD-4078-A42F-06CAB8B97F63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Zune", "Xna\Jellyfish.Library.Xna.Zune.csproj", "{8B5D5A39-10FA-434A-B8C4-09D4FDB96720}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Phone", "Xna\Jellyfish.Library.Xna.Phone.csproj", "{46B2BD23-3D45-4268-9979-B9CF136CC982}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "Xna\Jellyfish.Library.Xna.Xbox.csproj", "{222412EE-A626-493F-AE72-344657A6840D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Windows Phone = Debug|Windows Phone Debug|x86 = Debug|x86 Debug|Xbox 360 = Debug|Xbox 360 - Debug|Zune = Debug|Zune + Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms + Release|Windows Phone = Release|Windows Phone Release|x86 = Release|x86 Release|Xbox 360 = Release|Xbox 360 - Release|Zune = Release|Zune EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|x86.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.Build.0 = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|x86.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|x86.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Any CPU.Build.0 = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|x86.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Zune.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Xbox 360.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Zune.ActiveCfg = Release|x86 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Zune.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|x86.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Zune.ActiveCfg = Release|Xbox 360 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|x86.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Zune.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|x86.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Xbox 360.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Zune.ActiveCfg = Release|x86 - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Mixed Platforms.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Mixed Platforms.Build.0 = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|x86.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Xbox 360.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Zune.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Zune.Build.0 = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Mixed Platforms.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Mixed Platforms.Build.0 = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|x86.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Xbox 360.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Zune.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Zune.Build.0 = Release|Zune + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|x86.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.Build.0 = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|x86.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|x86.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.Build.0 = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|x86.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|x86.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Any CPU.Build.0 = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|x86.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Any CPU.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Windows Phone.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Windows Phone.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Xbox 360.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Any CPU.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Windows Phone.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Windows Phone.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Xbox 360.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Xbox 360.Build.0 = Release|x86 + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|x86.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Xbox 360.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Xbox 360.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Any CPU.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|x86.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Xbox 360.Build.0 = Release|Windows Phone + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Any CPU.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|x86.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.Build.0 = Release|Xbox 360 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Library/MarshalHelpers.cs b/Library/MarshalHelpers.cs index 5f03978..2e4beed 100644 --- a/Library/MarshalHelpers.cs +++ b/Library/MarshalHelpers.cs @@ -1,29 +1,33 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using System.Security; -using System.Security.Permissions; namespace Jellyfish.Library { - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] public static class MarshalHelpers { + [SecurityCritical] public static void FillMemory(IntPtr buffer, int bufferSize, byte value) { NativeMethods.FillMemory(buffer, (IntPtr)bufferSize, value); } + [SecurityCritical] public static void ZeroMemory(IntPtr buffer, int bufferSize) { NativeMethods.ZeroMemory(buffer, (IntPtr)bufferSize); } + [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static class NativeMethods { + [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] [DllImport("kernel32.dll", SetLastError = true)] public static extern void FillMemory(IntPtr destination, IntPtr length, byte fill); + [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] [DllImport("kernel32.dll", SetLastError = true)] public static extern void ZeroMemory(IntPtr destination, IntPtr length); } diff --git a/Library/SafeAllocHandle.cs b/Library/SafeAllocHandle.cs index 8e85414..2d176fb 100644 --- a/Library/SafeAllocHandle.cs +++ b/Library/SafeAllocHandle.cs @@ -1,15 +1,13 @@ using System; -using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Security; -using System.Security.Permissions; using Microsoft.Win32.SafeHandles; namespace Jellyfish.Library { - [SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode = true)] - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public abstract class SafeAllocHandle : SafeHandleZeroOrMinusOneIsInvalid { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] @@ -19,7 +17,7 @@ protected SafeAllocHandle(bool ownsHandle) : } } - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public sealed class SafeGlobalAllocHandle : SafeAllocHandle { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] @@ -35,11 +33,13 @@ public SafeGlobalAllocHandle(IntPtr existingHandle, bool ownsHandle) : SetHandle(existingHandle); } + [SecurityCritical] public static SafeGlobalAllocHandle Allocate(int size) { return Allocate(0x0, size); } + [SecurityCritical] public static SafeGlobalAllocHandle Allocate(byte[] value) { if (value == null) @@ -54,25 +54,29 @@ public static SafeGlobalAllocHandle Allocate(byte[] value) } [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] + [SecurityCritical] protected override bool ReleaseHandle() { return (NativeMethods.GlobalFree(handle) == IntPtr.Zero); } + [SecurityCritical] private static SafeGlobalAllocHandle Allocate(uint flags, int size) { var alloc = NativeMethods.GlobalAlloc(flags, (IntPtr)size); if (alloc.IsInvalid) { - throw new Win32Exception(); + Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); } return alloc; } + [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static class NativeMethods { + [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] [DllImport("kernel32.dll", SetLastError = true)] public static extern SafeGlobalAllocHandle GlobalAlloc(uint dwFlags, IntPtr sizetBytes); @@ -82,7 +86,7 @@ private static class NativeMethods } } - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public sealed class SafeLocalAllocHandle : SafeAllocHandle { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] @@ -98,11 +102,13 @@ public SafeLocalAllocHandle(IntPtr existingHandle, bool ownsHandle) : SetHandle(existingHandle); } + [SecurityCritical] public static SafeLocalAllocHandle Allocate(int size) { return Allocate(0x0, size); } + [SecurityCritical] public static SafeLocalAllocHandle Allocate(byte[] value) { if (value == null) @@ -117,25 +123,29 @@ public static SafeLocalAllocHandle Allocate(byte[] value) } [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] + [SecurityCritical] protected override bool ReleaseHandle() { return (NativeMethods.LocalFree(handle) == IntPtr.Zero); } + [SecurityCritical] private static SafeLocalAllocHandle Allocate(uint flags, int size) { var alloc = NativeMethods.LocalAlloc(flags, (IntPtr)size); if (alloc.IsInvalid) { - throw new Win32Exception(); + Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); } return alloc; } + [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static class NativeMethods { + [SuppressMessage("Microsoft.Security", "CA2118:ReviewSuppressUnmanagedCodeSecurityUsage")] [DllImport("kernel32.dll", SetLastError = true)] public static extern SafeLocalAllocHandle LocalAlloc(uint dwFlags, IntPtr sizetBytes); diff --git a/Library/SafeFileHandle.cs b/Library/SafeFileHandle.cs index e7f68ff..a7b2436 100644 --- a/Library/SafeFileHandle.cs +++ b/Library/SafeFileHandle.cs @@ -1,17 +1,15 @@ using System; -using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Security; using System.Security.AccessControl; -using System.Security.Permissions; using Microsoft.Win32.SafeHandles; namespace Jellyfish.Library { - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public sealed class SafeFileHandle : SafeHandleZeroOrMinusOneIsInvalid { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] @@ -27,6 +25,7 @@ public SafeFileHandle(IntPtr existingHandle, bool ownsHandle) : SetHandle(existingHandle); } + [SecurityCritical] public static SafeFileHandle CreateFile(string fileName, FileAccess fileAccess, FileShare fileShare, FileMode fileMode, GeneralSecurity fileSecurity) { if (fileMode == FileMode.Append) @@ -41,6 +40,7 @@ public static SafeFileHandle CreateFile(string fileName, FileAccess fileAccess, } [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] + [SecurityCritical] protected override bool ReleaseHandle() { return NativeMethods.CloseHandle(handle); @@ -62,6 +62,7 @@ public void SetAccessControl(GeneralSecurity fileSecurity) fileSecurity.Persist(this); } + [SecurityCritical] private static SafeFileHandle CreateFile(string fileName, uint fileAccess, uint fileShare, uint fileMode, uint fileOptions, GeneralSecurity fileSecurity, bool inheritable) { @@ -72,13 +73,14 @@ private static SafeFileHandle CreateFile(string fileName, uint fileAccess, uint file = NativeMethods.CreateFile(fileName, fileAccess, fileShare, securityAttributes, fileMode, fileOptions, IntPtr.Zero); if (file.IsInvalid) { - throw new Win32Exception(); + Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); } }); return file; } + [SecurityCritical] [SuppressUnmanagedCodeSecurity] private static class NativeMethods { diff --git a/Library/Silverlight/Jellyfish.Library.Silverlight.csproj b/Library/Silverlight/Jellyfish.Library.Silverlight.csproj index a1b4b81..03d2548 100644 --- a/Library/Silverlight/Jellyfish.Library.Silverlight.csproj +++ b/Library/Silverlight/Jellyfish.Library.Silverlight.csproj @@ -1,34 +1,42 @@ - + + Debug AnyCPU - 9.0.30729 + 8.0.50727 2.0 - {DAB11A70-D08B-4A96-8A54-E81B1DE39681} + {99CA7796-B72A-4F8C-BCDB-0D688220A331} {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties Jellyfish.Library Jellyfish.Library - v3.5 + Silverlight + v4.0 + $(TargetFrameworkVersion) false true - false - false - ..\..\Jellyfish.snk + true + + + + v3.5 true full false bin\ - TRACE;DEBUG;SILVERLIGHT;CODE_ANALYSIS + DEBUG;TRACE;SILVERLIGHT;CODE_ANALYSIS true true prompt 4 - false true + AllRules.ruleset + false pdbonly @@ -40,29 +48,35 @@ prompt 4 true + AllRules.ruleset + false - - + + + + True + AssemblyCommentAttribute.cs + + FrameRateCounter.xaml.cs + FrameRateCounter.xaml + GlobalSuppressions.cs IEnumerableExtensions.cs - - Lazy.cs - MathHelpers.cs @@ -78,16 +92,16 @@ WaveFormat.cs - - - FrameRateCounter.xaml + + XmlSerializerHelpers.cs - + - + + FrameRateCounter.xaml MSBuild:Compile Designer @@ -97,14 +111,7 @@ CustomDictionary.xml - - + @@ -112,4 +119,11 @@ + \ No newline at end of file diff --git a/Library/Silverlight/Jellyfish.Library.Silverlight.sln b/Library/Silverlight/Jellyfish.Library.Silverlight.sln index 958afc7..8efa74d 100644 --- a/Library/Silverlight/Jellyfish.Library.Silverlight.sln +++ b/Library/Silverlight/Jellyfish.Library.Silverlight.sln @@ -1,7 +1,9 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "Jellyfish.Library.Silverlight.csproj", "{DAB11A70-D08B-4A96-8A54-E81B1DE39681}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "Jellyfish.Library.Silverlight.csproj", "{99CA7796-B72A-4F8C-BCDB-0D688220A331}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight.Phone", "Phone\Jellyfish.Library.Silverlight.Phone.csproj", "{D4880706-29A6-449C-A2A6-3058C37583DA}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,10 +11,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.Build.0 = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.Build.0 = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Library/Silverlight/FrameRateCounter.xaml b/Library/Silverlight/Phone/FrameRateCounter.xaml similarity index 100% rename from Library/Silverlight/FrameRateCounter.xaml rename to Library/Silverlight/Phone/FrameRateCounter.xaml diff --git a/Library/Wpf/FrameRateCounter.xaml.cs b/Library/Silverlight/Phone/FrameRateCounter.xaml.cs similarity index 100% rename from Library/Wpf/FrameRateCounter.xaml.cs rename to Library/Silverlight/Phone/FrameRateCounter.xaml.cs diff --git a/Library/Silverlight/Phone/Jellyfish.Library.Silverlight.Phone.csproj b/Library/Silverlight/Phone/Jellyfish.Library.Silverlight.Phone.csproj new file mode 100644 index 0000000..473c3f1 --- /dev/null +++ b/Library/Silverlight/Phone/Jellyfish.Library.Silverlight.Phone.csproj @@ -0,0 +1,119 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {D4880706-29A6-449C-A2A6-3058C37583DA} + {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Jellyfish.Library + Jellyfish.Library + v4.0 + $(TargetFrameworkVersion) + WindowsPhone + Silverlight + false + true + true + + + true + full + false + bin\ + DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE;CODE_ANALYSIS + true + true + prompt + 4 + true + AllRules.ruleset + false + + + pdbonly + true + bin\ + TRACE;SILVERLIGHT;WINDOWS_PHONE;CODE_ANALYSIS + true + true + prompt + 4 + true + AllRules.ruleset + false + + + + + + + + + + + + + AssemblyCommentAttribute.cs + + + GlobalSuppressions.cs + + + IEnumerableExtensions.cs + + + MathHelpers.cs + + + SingletonFactory.cs + + + StreamExtensions.cs + + + StringBuilderExtensions.cs + + + WaveFormat.cs + + + XmlSerializerHelpers.cs + + + ApplicationBase.cs + + + WaveMediaStreamSource.cs + + + + FrameRateCounter.xaml + + + + + + MSBuild:Compile + Designer + + + + + CustomDictionary.xml + + + + + + + \ No newline at end of file diff --git a/Library/Silverlight/Phone/Properties/AssemblyInfo.cs b/Library/Silverlight/Phone/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f67fc77 --- /dev/null +++ b/Library/Silverlight/Phone/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System; +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; +using Jellyfish.Library; + +[assembly: AssemblyTitle("Library")] +[assembly: AssemblyDescription("Common Library")] +[assembly: AssemblyProduct("Jellyfish.Library.Silverlight.Phone")] +[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] +[assembly: AssemblyComment("Developed by Sean Fausett")] + +[assembly: AssemblyVersion("0.1.2.0")] +[assembly: AssemblyFileVersion("0.1.2.0")] +[assembly: AssemblyInformationalVersion("0.1.2.0")] + +[assembly: CLSCompliant(false)] +[assembly: ComVisible(false)] +[assembly: Guid("66034b9e-9f0b-47b0-aac4-cade9a748891")] + +[assembly: NeutralResourcesLanguage("en")] diff --git a/Library/Silverlight/StringFormatConverter.cs b/Library/Silverlight/Phone/StringFormatConverter.cs similarity index 100% rename from Library/Silverlight/StringFormatConverter.cs rename to Library/Silverlight/Phone/StringFormatConverter.cs diff --git a/Library/Silverlight/Properties/AssemblyInfo.cs b/Library/Silverlight/Properties/AssemblyInfo.cs index e120db0..e366aac 100644 --- a/Library/Silverlight/Properties/AssemblyInfo.cs +++ b/Library/Silverlight/Properties/AssemblyInfo.cs @@ -11,9 +11,9 @@ [assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett")] -[assembly: AssemblyVersion("0.1.1.0")] -[assembly: AssemblyFileVersion("0.1.1.0")] -[assembly: AssemblyInformationalVersion("0.1.1.0")] +[assembly: AssemblyVersion("0.1.2.0")] +[assembly: AssemblyFileVersion("0.1.2.0")] +[assembly: AssemblyInformationalVersion("0.1.2.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Library/StringBuilderExtensions.cs b/Library/StringBuilderExtensions.cs index 7a7edb3..744400d 100644 --- a/Library/StringBuilderExtensions.cs +++ b/Library/StringBuilderExtensions.cs @@ -1,4 +1,5 @@ -using System.Globalization; +using System; +using System.Globalization; using System.Text; namespace Jellyfish.Library @@ -7,16 +8,31 @@ public static class StringBuilderExtensions { public static StringBuilder AppendHex(this StringBuilder builder, short value) // little endian { + if (builder == null) + { + throw new ArgumentNullException("builder"); + } + return builder.AppendFormat(CultureInfo.InvariantCulture, "{0:X2}{1:X2}", value & 0xFF, value >> 8); } public static StringBuilder AppendHex(this StringBuilder builder, int value) // little endian { + if (builder == null) + { + throw new ArgumentNullException("builder"); + } + return builder.AppendFormat(CultureInfo.InvariantCulture, "{0:X2}{1:X2}{2:X2}{3:X2}", value & 0xFF, (value >> 8) & 0xFF, (value >> 16) & 0xFF, value >> 24); } public static StringBuilder AppendWithoutGarbage(this StringBuilder builder, int value) { + if (builder == null) + { + throw new ArgumentNullException("builder"); + } + if (value < 0) { builder.Append('-'); diff --git a/Library/Wpf/ApplicationBase.cs b/Library/Wpf/ApplicationBase.cs index ed62bb2..5b3635f 100644 --- a/Library/Wpf/ApplicationBase.cs +++ b/Library/Wpf/ApplicationBase.cs @@ -1,6 +1,6 @@ using System; using System.Diagnostics; -using System.Security.Permissions; +using System.Security; using System.Text; using System.Windows; using System.Windows.Threading; @@ -9,13 +9,13 @@ namespace Jellyfish.Library { public class ApplicationBase : Application { - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public ApplicationBase() : this(null) { } - [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = true)] + [SecurityCritical] public ApplicationBase(string name) { Name = name; diff --git a/Library/Wpf/Jellyfish.Library.Wpf.csproj b/Library/Wpf/Jellyfish.Library.Wpf.csproj index 50e3b1b..4b1c515 100644 --- a/Library/Wpf/Jellyfish.Library.Wpf.csproj +++ b/Library/Wpf/Jellyfish.Library.Wpf.csproj @@ -1,33 +1,30 @@ - + + Debug AnyCPU - 9.0.30729 + 8.0.30703 2.0 - {D47A24A9-1590-4E8A-A406-BC66D5891BFA} + {93900841-7250-4D3A-837E-43EE3FD118DC} Library Properties Jellyfish.Library Jellyfish.Library - false - ..\..\Jellyfish.snk - - - 2.0 - - - v3.5 + v4.0 + 512 + Client true full false bin\ - TRACE;DEBUG;WINDOWS;CODE_ANALYSIS + DEBUG;TRACE;WINDOWS;CODE_ANALYSIS prompt 4 - false true + AllRules.ruleset + false pdbonly @@ -37,26 +34,19 @@ prompt 4 true + AllRules.ruleset + false - - 3.0 - - - 3.0 - + + + - - 3.5 - - + + - - 3.5 - - - 3.0 - + + @@ -68,6 +58,10 @@ DirectSoundInterop.cs + + FrameRateCounter.xaml.cs + FrameRateCounter.xaml + GCHandleHelpers.cs @@ -80,9 +74,6 @@ IEnumerableExtensions.cs - - Lazy.cs - MarshalHelpers.cs @@ -110,15 +101,13 @@ XmlSerializerHelpers.cs - - - FrameRateCounter.xaml - + - + + FrameRateCounter.xaml MSBuild:Compile Designer @@ -128,7 +117,7 @@ CustomDictionary.xml - + - \ No newline at end of file diff --git a/Library/Xna/FrameRateCounter.cs b/Library/Xna/FrameRateCounter.cs index 52c016b..219ac4b 100644 --- a/Library/Xna/FrameRateCounter.cs +++ b/Library/Xna/FrameRateCounter.cs @@ -36,17 +36,22 @@ public override void Draw(GameTime gameTime) _frameRateBuilder.Length = 0; _frameRateBuilder.AppendWithoutGarbage(_frameRate).Append(" fps"); - _spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.None); - //_spriteBatch.DrawString(_spriteFont, fps, Position - Vector2.UnitX, Color.Black); // rough outline - //_spriteBatch.DrawString(_spriteFont, fps, Position + Vector2.UnitX, Color.Black); - //_spriteBatch.DrawString(_spriteFont, fps, Position - Vector2.UnitY, Color.Black); - //_spriteBatch.DrawString(_spriteFont, fps, Position + Vector2.UnitY, Color.Black); + _spriteBatch.Begin(); + //_spriteBatch.DrawString(_spriteFont, _frameRateBuilder, Position - Vector2.UnitX, Color.Black); // rough outline + //_spriteBatch.DrawString(_spriteFont, _frameRateBuilder, Position + Vector2.UnitX, Color.Black); + //_spriteBatch.DrawString(_spriteFont, _frameRateBuilder, Position - Vector2.UnitY, Color.Black); + //_spriteBatch.DrawString(_spriteFont, _frameRateBuilder, Position + Vector2.UnitY, Color.Black); _spriteBatch.DrawString(_spriteFont, _frameRateBuilder, Position, FontColor); _spriteBatch.End(); } public override void Update(GameTime gameTime) { + if (gameTime == null) + { + throw new ArgumentNullException("gameTime"); + } + _elapsedTime += gameTime.ElapsedGameTime.Ticks; if (_elapsedTime >= TimeSpan.TicksPerSecond) diff --git a/Library/Xna/GameBase.cs b/Library/Xna/GameBase.cs index 885a79b..c0d56de 100644 --- a/Library/Xna/GameBase.cs +++ b/Library/Xna/GameBase.cs @@ -19,7 +19,6 @@ public GameBase(string name) GraphicsDeviceManager = new GraphicsDeviceManager(this); GraphicsDeviceService = (IGraphicsDeviceService)Services.GetService(typeof(IGraphicsDeviceService)); - Components.Add(new GamerServicesComponent(this)); Content.RootDirectory = "Content"; if (!string.IsNullOrEmpty(Name)) { diff --git a/Library/Xna/Jellyfish.Library.Xna.Phone.csproj b/Library/Xna/Jellyfish.Library.Xna.Phone.csproj new file mode 100644 index 0000000..8d3462e --- /dev/null +++ b/Library/Xna/Jellyfish.Library.Xna.Phone.csproj @@ -0,0 +1,136 @@ + + + + {46B2BD23-3D45-4268-9979-B9CF136CC982} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + Windows Phone + Library + Properties + Jellyfish.Library + Jellyfish.Library + v4.0 + Client + v4.0 + Windows Phone + Reach + f1d4203f-e8dd-43ff-81b2-e4562d3ae0b6 + Library + + + true + full + false + bin\Windows Phone\ + DEBUG;TRACE;WINDOWS_PHONE;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + pdbonly + true + bin\Windows Phone\ + TRACE;WINDOWS_PHONE;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + 4.0 + False + + + False + + + 4.0 + False + + + False + + + + + AssemblyCommentAttribute.cs + + + GlobalSuppressions.cs + + + IEnumerableExtensions.cs + + + Lazy.cs + + + MathHelpers.cs + + + SingletonFactory.cs + + + StreamExtensions.cs + + + StringBuilderExtensions.cs + + + WaveFormat.cs + + + XmlSerializerHelpers.cs + + + + + + + + CustomDictionary.xml + + + + + + \ No newline at end of file diff --git a/Library/Xna/Jellyfish.Library.Xna.Xbox.csproj b/Library/Xna/Jellyfish.Library.Xna.Xbox.csproj index cc816f2..70a86d8 100644 --- a/Library/Xna/Jellyfish.Library.Xna.Xbox.csproj +++ b/Library/Xna/Jellyfish.Library.Xna.Xbox.csproj @@ -1,6 +1,7 @@ - + + - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA} + {222412EE-A626-493F-AE72-344657A6840D} {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Debug Xbox 360 @@ -8,56 +9,92 @@ Properties Jellyfish.Library Jellyfish.Library - v3.5 - v3.1 + v4.0 + Client + v4.0 Xbox 360 - 3289d0b6-d8a8-415e-8c29-dc355352cb54 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - false - ..\..\Jellyfish.snk + Reach + f1d4203f-e8dd-43ff-81b2-e4562d3ae0b6 + Library - bin\Xbox\ - prompt - 4 - true - false - x86 true full false - TRACE;DEBUG;XBOX;XBOX360;CODE_ANALYSIS - true - false - true - - - bin\Xbox\ + bin\Xbox 360\ + DEBUG;TRACE;XBOX;XBOX360;CODE_ANALYSIS prompt 4 true false - x86 - pdbonly - true - TRACE;XBOX;XBOX360;CODE_ANALYSIS true true + AllRules.ruleset + false + + pdbonly + true + bin\Xbox 360\ + TRACE;XBOX;XBOX360;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + 4.0 + False + + + False + + + 4.0 + False + + AssemblyCommentAttribute.cs @@ -89,77 +126,9 @@ XmlSerializerHelpers.cs + - - - - - a96f5631-40e1-40b0-aee2-6f2e3368e2ae - False - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - - - - - False - - - False - - - False - - - False - - - False - 3.5 - - - False - - - False - 3.5 - @@ -168,11 +137,12 @@ - + \ No newline at end of file diff --git a/Library/Xna/Jellyfish.Library.Xna.Zune.csproj b/Library/Xna/Jellyfish.Library.Xna.Zune.csproj deleted file mode 100644 index 256fb16..0000000 --- a/Library/Xna/Jellyfish.Library.Xna.Zune.csproj +++ /dev/null @@ -1,176 +0,0 @@ - - - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720} - {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Debug - Zune - Library - Properties - Jellyfish.Library - Jellyfish.Library - v3.5 - v3.1 - Zune - 3289d0b6-d8a8-415e-8c29-dc355352cb54 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - false - ..\..\Jellyfish.snk - - - bin\Zune\ - prompt - 4 - true - false - x86 - true - full - false - TRACE;DEBUG;ZUNE;CODE_ANALYSIS - false - true - - - bin\Zune\ - prompt - 4 - true - false - x86 - pdbonly - true - TRACE;ZUNE;CODE_ANALYSIS - true - - - - AssemblyCommentAttribute.cs - - - GlobalSuppressions.cs - - - IEnumerableExtensions.cs - - - Lazy.cs - - - MathHelpers.cs - - - SingletonFactory.cs - - - StreamExtensions.cs - - - StringBuilderExtensions.cs - - - WaveFormat.cs - - - XmlSerializerHelpers.cs - - - - - - - - a96f5631-40e1-40b0-aee2-6f2e3368e2ae - False - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - - - - - False - - - False - - - False - - - False - - - False - 3.5 - - - False - - - False - 3.5 - - - - - CustomDictionary.xml - - - - - - \ No newline at end of file diff --git a/Library/Xna/Jellyfish.Library.Xna.csproj b/Library/Xna/Jellyfish.Library.Xna.csproj index 181bca4..f93731f 100644 --- a/Library/Xna/Jellyfish.Library.Xna.csproj +++ b/Library/Xna/Jellyfish.Library.Xna.csproj @@ -1,6 +1,7 @@ - + + - {E246958B-EAD8-48E9-844B-54718C952869} + {82F56318-A1FD-4078-A42F-06CAB8B97F63} {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Debug x86 @@ -8,47 +9,34 @@ Properties Jellyfish.Library Jellyfish.Library - v3.5 - v3.1 + v4.0 + Client + v4.0 Windows - 3289d0b6-d8a8-415e-8c29-dc355352cb54 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - false - ..\..\Jellyfish.snk + Reach + f1d4203f-e8dd-43ff-81b2-e4562d3ae0b6 + Library true full false - bin\ - TRACE;DEBUG;WINDOWS;CODE_ANALYSIS + bin\x86\ + DEBUG;TRACE;WINDOWS;CODE_ANALYSIS prompt 4 true false x86 - false - false + true true + AllRules.ruleset + false pdbonly true - bin\ + bin\x86\ TRACE;WINDOWS;CODE_ANALYSIS prompt 4 @@ -57,26 +45,55 @@ x86 true true + AllRules.ruleset + false - - + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + False False - + + 4.0 + False + False - - 3.5 - False - - 3.5 + 4.0 False @@ -102,9 +119,6 @@ IEnumerableExtensions.cs - - Lazy.cs - MarshalHelpers.cs @@ -132,52 +146,9 @@ XmlSerializerHelpers.cs + - - - - - a96f5631-40e1-40b0-aee2-6f2e3368e2ae - False - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - @@ -186,11 +157,12 @@ - + \ No newline at end of file diff --git a/Library/Xna/Jellyfish.Library.Xna.sln b/Library/Xna/Jellyfish.Library.Xna.sln index f6ff467..9365562 100644 --- a/Library/Xna/Jellyfish.Library.Xna.sln +++ b/Library/Xna/Jellyfish.Library.Xna.sln @@ -1,68 +1,60 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "Jellyfish.Library.Xna.csproj", "{E246958B-EAD8-48E9-844B-54718C952869}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "Jellyfish.Library.Xna.csproj", "{82F56318-A1FD-4078-A42F-06CAB8B97F63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "Jellyfish.Library.Xna.Xbox.csproj", "{6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Phone", "Jellyfish.Library.Xna.Phone.csproj", "{46B2BD23-3D45-4268-9979-B9CF136CC982}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Zune", "Jellyfish.Library.Xna.Zune.csproj", "{8B5D5A39-10FA-434A-B8C4-09D4FDB96720}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "Jellyfish.Library.Xna.Xbox.csproj", "{222412EE-A626-493F-AE72-344657A6840D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Windows Phone = Debug|Windows Phone Debug|x86 = Debug|x86 Debug|Xbox 360 = Debug|Xbox 360 - Debug|Zune = Debug|Zune Release|Mixed Platforms = Release|Mixed Platforms + Release|Windows Phone = Release|Windows Phone Release|x86 = Release|x86 Release|Xbox 360 = Release|Xbox 360 - Release|Zune = Release|Zune EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Zune.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Xbox 360.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Zune.ActiveCfg = Release|x86 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Zune.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|x86.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Zune.ActiveCfg = Release|Xbox 360 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|x86.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Zune.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|x86.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Xbox 360.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Zune.ActiveCfg = Release|x86 - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Mixed Platforms.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Mixed Platforms.Build.0 = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|x86.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Xbox 360.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Zune.ActiveCfg = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Debug|Zune.Build.0 = Debug|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Mixed Platforms.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Mixed Platforms.Build.0 = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|x86.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Xbox 360.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Zune.ActiveCfg = Release|Zune - {8B5D5A39-10FA-434A-B8C4-09D4FDB96720}.Release|Zune.Build.0 = Release|Zune + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Windows Phone.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Windows Phone.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Xbox 360.ActiveCfg = Release|x86 + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|x86.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Xbox 360.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|x86.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|x86.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.Build.0 = Release|Xbox 360 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Library/Xna/Properties/AssemblyInfo.cs b/Library/Xna/Properties/AssemblyInfo.cs index 722b9f7..c4caf81 100644 --- a/Library/Xna/Properties/AssemblyInfo.cs +++ b/Library/Xna/Properties/AssemblyInfo.cs @@ -6,10 +6,10 @@ [assembly: AssemblyTitle("Library")] [assembly: AssemblyDescription("Common Library")] -#if XBOX +#if WINDOWS_PHONE +[assembly: AssemblyProduct("Jellyfish.Library.Xna.Phone")] +#elif XBOX [assembly: AssemblyProduct("Jellyfish.Library.Xna.Xbox")] -#elif ZUNE -[assembly: AssemblyProduct("Jellyfish.Library.Xna.Zune")] #else [assembly: AssemblyProduct("Jellyfish.Library.Xna")] #endif @@ -17,11 +17,9 @@ [assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett")] -[assembly: AssemblyVersion("0.1.1.0")] -#if WINDOWS -[assembly: AssemblyFileVersion("0.1.1.0")] -#endif -[assembly: AssemblyInformationalVersion("0.1.1.0")] +[assembly: AssemblyVersion("0.1.2.0")] +[assembly: AssemblyFileVersion("0.1.2.0")] +[assembly: AssemblyInformationalVersion("0.1.2.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/Cpu.cs b/Virtu/Cpu.cs index df67de6..d08773f 100644 --- a/Virtu/Cpu.cs +++ b/Virtu/Cpu.cs @@ -10,7 +10,7 @@ public sealed partial class Cpu : MachineComponent public Cpu(Machine machine) : base(machine) { - ExecuteOpcode65N02 = new Action[OpcodeCount] + ExecuteOpCode65N02 = new Action[OpCodeCount] { Execute65X02Brk00, Execute65X02Ora01, Execute65N02Nop02, Execute65N02Nop03, Execute65N02Nop04, Execute65X02Ora05, Execute65X02Asl06, Execute65N02Nop07, @@ -78,7 +78,7 @@ public Cpu(Machine machine) : Execute65N02NopFC, Execute65N02SbcFD, Execute65N02IncFE, Execute65N02NopFF }; - ExecuteOpcode65C02 = new Action[OpcodeCount] + ExecuteOpCode65C02 = new Action[OpCodeCount] { Execute65X02Brk00, Execute65X02Ora01, Execute65C02Nop02, Execute65C02Nop03, Execute65C02Tsb04, Execute65X02Ora05, Execute65X02Asl06, Execute65C02Nop07, @@ -178,9 +178,9 @@ public override string ToString() public int Execute() { CC = 0; - Opcode = _memory.Read(RPC); + OpCode = _memory.Read(RPC); RPC = (RPC + 1) & 0xFFFF; - _executeOpcode[Opcode](); + _executeOpCode[OpCode](); Cycles += CC; return CC; @@ -386,7 +386,7 @@ private void WriteZpgY(int data) // zpg, y } #endregion - #region Core Opcode Actions + #region Core OpCode Actions private void ExecuteAdc65N02(int data, int cc) { if ((RP & PD) == 0x0) @@ -1123,7 +1123,7 @@ private void ExecuteTya(int cc) } #endregion - #region 6502 Opcode Actions + #region 6502 OpCode Actions private void Execute65X02And21() // and (zpg, x) { GetAddressZpgIndX(); @@ -1858,7 +1858,7 @@ private void Execute65X02Tya98() // tya imp } #endregion - #region 65N02 Opcode Actions + #region 65N02 OpCode Actions private void Execute65N02Adc61() // adc (zpg, x) { GetAddressZpgIndX(); @@ -2520,7 +2520,7 @@ private void Execute65N02SbcFD() // sbc abs, x } #endregion - #region 65C02 Opcode Actions + #region 65C02 OpCode Actions private void Execute65C02Adc61() // adc (zpg, x) { GetAddressZpgIndX(); @@ -3212,7 +3212,7 @@ private void OnVideoVSync(object sender, EventArgs e) private void UpdateSettings() { - _executeOpcode = Machine.Settings.Cpu.Is65C02 ? ExecuteOpcode65C02 : ExecuteOpcode65N02; + _executeOpCode = Machine.Settings.Cpu.Is65C02 ? ExecuteOpCode65C02 : ExecuteOpCode65N02; } public int RA { get; private set; } @@ -3223,11 +3223,11 @@ private void UpdateSettings() public int RPC { get; private set; } public int EA { get; private set; } public int CC { get; private set; } - public int Opcode { get; private set; } + public int OpCode { get; private set; } public long Cycles { get; private set; } private Memory _memory; - private Action[] _executeOpcode; + private Action[] _executeOpCode; } } diff --git a/Virtu/CpuData.cs b/Virtu/CpuData.cs index 14ab1b5..361aa55 100644 --- a/Virtu/CpuData.cs +++ b/Virtu/CpuData.cs @@ -4,10 +4,10 @@ namespace Jellyfish.Virtu { public partial class Cpu { - private const int OpcodeCount = 256; + private const int OpCodeCount = 256; - private readonly Action[] ExecuteOpcode65N02; - private readonly Action[] ExecuteOpcode65C02; + private readonly Action[] ExecuteOpCode65N02; + private readonly Action[] ExecuteOpCode65C02; private const int PC = 0x01; private const int PZ = 0x02; diff --git a/Virtu/CustomDictionary.xml b/Virtu/CustomDictionary.xml index 0ad9820..0f57381 100644 --- a/Virtu/CustomDictionary.xml +++ b/Virtu/CustomDictionary.xml @@ -10,7 +10,6 @@ Annunciator Dsk - Opcode Unpause Virtu Xna diff --git a/Virtu/Disk525.cs b/Virtu/Disk525.cs index e9d7bfa..d1979a7 100644 --- a/Virtu/Disk525.cs +++ b/Virtu/Disk525.cs @@ -14,6 +14,15 @@ protected Disk525(string name, byte[] data, bool isWriteProtected) public static Disk525 CreateDisk(string name, byte[] data, bool isWriteProtected) { + if (name == null) + { + throw new ArgumentNullException("name"); + } + if (data == null) + { + throw new ArgumentNullException("data"); + } + if (name.EndsWith(".nib", StringComparison.OrdinalIgnoreCase) && (data.Length == TrackCount * TrackSize)) { return new DiskNib(name, data, isWriteProtected); diff --git a/Virtu/DiskII.cs b/Virtu/DiskII.cs index e0dba46..d1b3017 100644 --- a/Virtu/DiskII.cs +++ b/Virtu/DiskII.cs @@ -13,7 +13,7 @@ public DiskII(Machine machine) : public override void Initialize() { - _drives[0].InsertDisk("Default.dsk", StorageService.GetResourceStream("Default.dsk", 0x23000), false); + _drives[0].InsertDisk("Default.dsk", StorageService.GetResourceStream("Disks/Default.dsk", 0x23000), false); #if WINDOWS var settings = Machine.Settings.DiskII; diff --git a/Virtu/Drive525.cs b/Virtu/Drive525.cs index c140cd9..40356b1 100644 --- a/Virtu/Drive525.cs +++ b/Virtu/Drive525.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Security; using Jellyfish.Library; namespace Jellyfish.Virtu @@ -14,6 +15,9 @@ public Drive525() DriveArmStepDelta[3] = new int[] { 0, 1, 0, 1, -1, 0, -1, 0, 0, 1, 0, 1, -1, 0, -1, 0 }; // phase 3 } +#if !XBOX + [SecurityCritical] +#endif public void InsertDisk(string fileName, bool isWriteProtected) { using (var stream = File.OpenRead(fileName)) diff --git a/Virtu/Jellyfish.Virtu.sln b/Virtu/Jellyfish.Virtu.sln index 468a5c0..dbec855 100644 --- a/Virtu/Jellyfish.Virtu.sln +++ b/Virtu/Jellyfish.Virtu.sln @@ -1,146 +1,228 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Silverlight", "Silverlight\Jellyfish.Virtu.Silverlight.csproj", "{5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "..\Library\Silverlight\Jellyfish.Library.Silverlight.csproj", "{99CA7796-B72A-4F8C-BCDB-0D688220A331}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Wpf", "Wpf\Jellyfish.Virtu.Wpf.csproj", "{D59B29AC-1105-410D-A88D-61E9C98B0C4B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight.Phone", "..\Library\Silverlight\Phone\Jellyfish.Library.Silverlight.Phone.csproj", "{D4880706-29A6-449C-A2A6-3058C37583DA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna", "Xna\Jellyfish.Virtu.Xna.csproj", "{F72C1068-E6F3-4A6C-A404-F88626B43B7C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Wpf", "..\Library\Wpf\Jellyfish.Library.Wpf.csproj", "{93900841-7250-4D3A-837E-43EE3FD118DC}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Xbox", "Xna\Jellyfish.Virtu.Xna.Xbox.csproj", "{1D3618DE-F050-4350-826E-5E84BC62DEE3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "..\Library\Xna\Jellyfish.Library.Xna.csproj", "{82F56318-A1FD-4078-A42F-06CAB8B97F63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Silverlight", "..\Library\Silverlight\Jellyfish.Library.Silverlight.csproj", "{DAB11A70-D08B-4A96-8A54-E81B1DE39681}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Phone", "..\Library\Xna\Jellyfish.Library.Xna.Phone.csproj", "{46B2BD23-3D45-4268-9979-B9CF136CC982}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Wpf", "..\Library\Wpf\Jellyfish.Library.Wpf.csproj", "{D47A24A9-1590-4E8A-A406-BC66D5891BFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "..\Library\Xna\Jellyfish.Library.Xna.Xbox.csproj", "{222412EE-A626-493F-AE72-344657A6840D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "..\Library\Xna\Jellyfish.Library.Xna.csproj", "{E246958B-EAD8-48E9-844B-54718C952869}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Silverlight", "Silverlight\Jellyfish.Virtu.Silverlight.csproj", "{F8DB6D3A-807D-4E2D-92D5-469273E088DA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "..\Library\Xna\Jellyfish.Library.Xna.Xbox.csproj", "{6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Silverlight.Phone", "Silverlight\Phone\Jellyfish.Virtu.Silverlight.Phone.csproj", "{9F1025D2-E23B-4CDC-AC63-150941013963}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Wpf", "Wpf\Jellyfish.Virtu.Wpf.csproj", "{C152D47E-BBC1-4C35-8646-465180720A72}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna", "Xna\Jellyfish.Virtu.Xna.csproj", "{3D0AE444-357F-4986-859F-602CC9BB4EF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Content", "Xna\Content\Jellyfish.Virtu.Xna.Content.contentproj", "{C138ADC9-8F2B-414A-930D-12B489A96BBB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Phone", "Xna\Jellyfish.Virtu.Xna.Phone.csproj", "{AE4C0489-3A21-4264-BE20-EA6C72B24B2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Xbox", "Xna\Jellyfish.Virtu.Xna.Xbox.csproj", "{1400371E-AC2E-4BC5-8A52-077616F716C4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Windows Phone = Debug|Windows Phone Debug|x86 = Debug|x86 Debug|Xbox 360 = Debug|Xbox 360 Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms + Release|Windows Phone = Release|Windows Phone Release|x86 = Release|x86 Release|Xbox 360 = Release|Xbox 360 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|x86.ActiveCfg = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|Any CPU.Build.0 = Release|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|x86.ActiveCfg = Release|Any CPU - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|x86.ActiveCfg = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|Any CPU.Build.0 = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|x86.ActiveCfg = Release|Any CPU - {D59B29AC-1105-410D-A88D-61E9C98B0C4B}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Any CPU.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|x86.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|x86.Build.0 = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Any CPU.ActiveCfg = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Mixed Platforms.Build.0 = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|x86.ActiveCfg = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|x86.Build.0 = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Xbox 360.ActiveCfg = Release|x86 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Any CPU.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|x86.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Xbox 360.Build.0 = Release|Xbox 360 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|Any CPU.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|x86.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|Any CPU.ActiveCfg = Release|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|x86.ActiveCfg = Release|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|Xbox 360.ActiveCfg = Release|x86 - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|x86.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Any CPU.Build.0 = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|x86.ActiveCfg = Release|Any CPU - {DAB11A70-D08B-4A96-8A54-E81B1DE39681}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|x86.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Any CPU.Build.0 = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|x86.ActiveCfg = Release|Any CPU - {D47A24A9-1590-4E8A-A406-BC66D5891BFA}.Release|Xbox 360.ActiveCfg = Release|Any CPU - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Any CPU.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Any CPU.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Xbox 360.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Any CPU.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|x86.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Any CPU.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|x86.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Xbox 360.ActiveCfg = Release|x86 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Any CPU.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|x86.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|x86.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Any CPU.Build.0 = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|x86.ActiveCfg = Release|Any CPU + {99CA7796-B72A-4F8C-BCDB-0D688220A331}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|x86.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Any CPU.Build.0 = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|x86.ActiveCfg = Release|Any CPU + {D4880706-29A6-449C-A2A6-3058C37583DA}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|x86.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Any CPU.Build.0 = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|x86.ActiveCfg = Release|Any CPU + {93900841-7250-4D3A-837E-43EE3FD118DC}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Any CPU.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Windows Phone.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Any CPU.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Windows Phone.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Xbox 360.ActiveCfg = Release|x86 + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|x86.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Xbox 360.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Any CPU.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|x86.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Any CPU.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|x86.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|x86.ActiveCfg = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Any CPU.Build.0 = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|x86.ActiveCfg = Release|Any CPU + {F8DB6D3A-807D-4E2D-92D5-469273E088DA}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|x86.ActiveCfg = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Any CPU.Build.0 = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Windows Phone.ActiveCfg = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|x86.ActiveCfg = Release|Any CPU + {9F1025D2-E23B-4CDC-AC63-150941013963}.Release|Xbox 360.ActiveCfg = Release|Any CPU + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|Any CPU.ActiveCfg = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|Windows Phone.ActiveCfg = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|x86.ActiveCfg = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|x86.Build.0 = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|Any CPU.ActiveCfg = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|Mixed Platforms.Build.0 = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|Windows Phone.ActiveCfg = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|x86.ActiveCfg = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|x86.Build.0 = Release|x86 + {C152D47E-BBC1-4C35-8646-465180720A72}.Release|Xbox 360.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Any CPU.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Windows Phone.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|x86.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|x86.Build.0 = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Xbox 360.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Any CPU.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Mixed Platforms.Build.0 = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Windows Phone.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|x86.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|x86.Build.0 = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Xbox 360.ActiveCfg = Release|x86 + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|x86.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Windows Phone.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|x86.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Xbox 360.ActiveCfg = Debug|Any CPU + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.Build.0 = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.Deploy.0 = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|x86.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Xbox 360.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Any CPU.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.Build.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.Deploy.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|x86.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Windows Phone.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.Deploy.0 = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Any CPU.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|x86.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.Deploy.0 = Release|Xbox 360 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Virtu/MachineEvents.cs b/Virtu/MachineEvents.cs index da393b0..a9e459e 100644 --- a/Virtu/MachineEvents.cs +++ b/Virtu/MachineEvents.cs @@ -25,7 +25,7 @@ public sealed class MachineEvents { public void AddEvent(int delta, Action action) { - LinkedListNode node = _used.First; + var node = _used.First; for (; node != null; node = node.Next) { if (delta < node.Value.Delta) @@ -39,7 +39,7 @@ public void AddEvent(int delta, Action action) } } - LinkedListNode newNode = _free.First; + var newNode = _free.First; if (newNode != null) { _free.RemoveFirst(); @@ -65,7 +65,7 @@ public int FindEvent(Action action) { int delta = 0; - for (LinkedListNode node = _used.First; node != null; node = node.Next) + for (var node = _used.First; node != null; node = node.Next) { delta += node.Value.Delta; if (object.ReferenceEquals(node.Value.Action, action)) // assumes delegate cached @@ -79,7 +79,7 @@ public int FindEvent(Action action) public void HandleEvents(int delta) { - LinkedListNode node = _used.First; + var node = _used.First; node.Value.Delta -= delta; while (node.Value.Delta <= 0) diff --git a/Virtu/Memory.cs b/Virtu/Memory.cs index b27e0c5..1ffa964 100644 --- a/Virtu/Memory.cs +++ b/Virtu/Memory.cs @@ -88,13 +88,13 @@ public override void Initialize() _speaker = Machine.Speaker; _video = Machine.Video; - var romStream = StorageService.GetResourceStream("AppleIIe.rom", 0x4000); + var romStream = StorageService.GetResourceStream("Roms/AppleIIe.rom", 0x4000); romStream.Seek(0x0100, SeekOrigin.Current); romStream.ReadBlock(_romInternalRegionC1CF, 0x0000, 0x0F00); romStream.ReadBlock(_romRegionD0DF, 0x0000, 0x1000); romStream.ReadBlock(_romRegionE0FF, 0x0000, 0x2000); - romStream = StorageService.GetResourceStream("DiskII.rom", 0x0100); + romStream = StorageService.GetResourceStream("Roms/DiskII.rom", 0x0100); romStream.ReadBlock(_romExternalRegionC1CF, 0x0500, 0x0100); if ((ReadRomRegionE0FF(0xFBB3) == 0x06) && (ReadRomRegionE0FF(0xFBBF) == 0xC1)) diff --git a/Virtu/Properties/Strings.Designer.cs b/Virtu/Properties/Strings.Designer.cs new file mode 100644 index 0000000..0398b8d --- /dev/null +++ b/Virtu/Properties/Strings.Designer.cs @@ -0,0 +1,99 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Jellyfish.Virtu.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Jellyfish.Virtu.Properties.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Resource '{0}' invalid.. + /// + internal static string ResourceInvalid { + get { + return ResourceManager.GetString("ResourceInvalid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource '{0}' not found.. + /// + internal static string ResourceNotFound { + get { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service type '{0}' already present.. + /// + internal static string ServiceAlreadyPresent { + get { + return ResourceManager.GetString("ServiceAlreadyPresent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service type '{0}' must be assignable from service provider '{1}'.. + /// + internal static string ServiceMustBeAssignable { + get { + return ResourceManager.GetString("ServiceMustBeAssignable", resourceCulture); + } + } + } +} diff --git a/Virtu/Properties/SR.resx b/Virtu/Properties/Strings.resx similarity index 100% rename from Virtu/Properties/SR.resx rename to Virtu/Properties/Strings.resx diff --git a/Virtu/Services/AudioService.cs b/Virtu/Services/AudioService.cs index df454fe..9cd1919 100644 --- a/Virtu/Services/AudioService.cs +++ b/Virtu/Services/AudioService.cs @@ -19,7 +19,9 @@ public void Output(int data) // machine thread _readEvent.Set(); if (Machine.Settings.Cpu.IsThrottled) { +#if !WINDOWS_PHONE // TODO remove; implement phone audio _writeEvent.WaitOne(); +#endif } } } diff --git a/Virtu/Services/IsolatedStorageService.cs b/Virtu/Services/IsolatedStorageService.cs new file mode 100644 index 0000000..e445e92 --- /dev/null +++ b/Virtu/Services/IsolatedStorageService.cs @@ -0,0 +1,68 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.IO.IsolatedStorage; + +namespace Jellyfish.Virtu.Services +{ + public class IsolatedStorageService : StorageService + { + public IsolatedStorageService(Machine machine) : + base(machine) + { + } + + public override void Load(string path, Action reader) + { + if (reader == null) + { + throw new ArgumentNullException("reader"); + } + + try + { + using (var store = GetStore()) + { + using (var stream = new IsolatedStorageFileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read, store)) + { + reader(stream); + } + } + } + catch (FileNotFoundException) + { + } + catch (IsolatedStorageException) + { + } + } + + public override void Save(string path, Action writer) + { + if (writer == null) + { + throw new ArgumentNullException("writer"); + } + + try + { + using (var store = GetStore()) + { + using (var stream = new IsolatedStorageFileStream(path, FileMode.Create, FileAccess.Write, FileShare.None, store)) + { + writer(stream); + } + } + } + catch (IsolatedStorageException) + { + } + } + + [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] + protected virtual IsolatedStorageFile GetStore() + { + return IsolatedStorageFile.GetUserStoreForApplication(); + } + } +} diff --git a/Virtu/Services/KeyboardService.cs b/Virtu/Services/KeyboardService.cs index f50d51a..40d2e3b 100644 --- a/Virtu/Services/KeyboardService.cs +++ b/Virtu/Services/KeyboardService.cs @@ -50,7 +50,7 @@ public virtual void Update() // main thread protected void OnAsciiKeyDown(int asciiKey) { - EventHandler handler = AsciiKeyDown; + var handler = AsciiKeyDown; if (handler != null) { handler(this, AsciiKeyEventArgs.Create(asciiKey)); diff --git a/Virtu/Services/MachineService.cs b/Virtu/Services/MachineService.cs index f242480..cfa3463 100644 --- a/Virtu/Services/MachineService.cs +++ b/Virtu/Services/MachineService.cs @@ -7,11 +7,6 @@ public abstract class MachineService : IDisposable { protected MachineService(Machine machine) { - if (machine == null) - { - throw new ArgumentNullException("machine"); - } - Machine = machine; } diff --git a/Virtu/Services/MachineServices.cs b/Virtu/Services/MachineServices.cs index e05d360..60dac9c 100644 --- a/Virtu/Services/MachineServices.cs +++ b/Virtu/Services/MachineServices.cs @@ -17,7 +17,7 @@ public void AddService(Type serviceType, MachineService serviceProvider) } if (_serviceProviders.ContainsKey(serviceType)) { - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ServiceAlreadyPresent, serviceType.FullName), "serviceType"); + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ServiceAlreadyPresent, serviceType.FullName), "serviceType"); } if (serviceProvider == null) { @@ -25,7 +25,7 @@ public void AddService(Type serviceType, MachineService serviceProvider) } if (!serviceType.IsAssignableFrom(serviceProvider.GetType())) { - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.ServiceMustBeAssignable, serviceType.FullName, serviceProvider.GetType().FullName)); + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.ServiceMustBeAssignable, serviceType.FullName, serviceProvider.GetType().FullName)); } _serviceProviders.Add(serviceType, serviceProvider); diff --git a/Virtu/Services/StorageService.cs b/Virtu/Services/StorageService.cs index 69e8bc0..caa1a12 100644 --- a/Virtu/Services/StorageService.cs +++ b/Virtu/Services/StorageService.cs @@ -25,11 +25,11 @@ public static Stream GetResourceStream(string resourceName, int resourceSize) var resourceStream = (Stream)resourceManager.GetObject(resourceName); if (resourceStream == null) { - throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ResourceNotFound, resourceName)); + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.ResourceNotFound, resourceName)); } if ((resourceSize > 0) && (resourceStream.Length != resourceSize)) { - throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, SR.ResourceInvalid, resourceName)); + throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, Strings.ResourceInvalid, resourceName)); } return resourceStream; diff --git a/Virtu/Silverlight/Jellyfish.Virtu.Silverlight.csproj b/Virtu/Silverlight/Jellyfish.Virtu.Silverlight.csproj index b895a6f..31eb4ee 100644 --- a/Virtu/Silverlight/Jellyfish.Virtu.Silverlight.csproj +++ b/Virtu/Silverlight/Jellyfish.Virtu.Silverlight.csproj @@ -1,16 +1,19 @@ - + + Debug AnyCPU - 9.0.30729 + 8.0.50727 2.0 - {5AA9C39E-DB55-4AD9-92EB-E8951D5AD680} + {F8DB6D3A-807D-4E2D-92D5-469273E088DA} {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties Jellyfish.Virtu Jellyfish.Virtu - v3.5 + Silverlight + v4.0 + $(TargetFrameworkVersion) true @@ -19,29 +22,35 @@ Jellyfish.Virtu.xap Properties\AppManifest.xml Jellyfish.Virtu.MainApp - TestPage.html + Jellyfish.Virtu.html true true - false - false - ..\..\Jellyfish.snk - false true Properties\OutOfBrowserSettings.xml + false + true + + + + + + v3.5 true full false bin\ - TRACE;DEBUG;SILVERLIGHT;CODE_ANALYSIS + DEBUG;TRACE;SILVERLIGHT;CODE_ANALYSIS true true prompt 4 true - - + AllRules.ruleset + false pdbonly @@ -53,19 +62,37 @@ prompt 4 true - - + AllRules.ruleset + false - - - + - + + + + True + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MainApp.xaml + + + MainPage.xaml + @@ -119,11 +146,11 @@ Core\MemoryData.cs - - Properties\SR.Designer.cs + + Properties\Strings.Designer.cs True True - SR.resx + Strings.resx Services\AudioService.cs @@ -131,6 +158,9 @@ Services\GamePortService.cs + + Services\IsolatedStorageService.cs + Services\KeyboardService.cs @@ -155,49 +185,32 @@ Core\VideoData.cs - - MainApp.xaml - - - MainPage.xaml - - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - + + + + Properties\Strings.resx + ResXFileCodeGenerator + Strings.Designer.cs + + + + + Disks\Default.dsk + Roms\AppleIIe.rom Roms\DiskII.rom - - - - - Properties\SR.resx - ResXFileCodeGenerator - SR.Designer.cs - - - - - {DAB11A70-D08B-4A96-8A54-E81B1DE39681} - Jellyfish.Library.Silverlight - @@ -205,12 +218,12 @@ - - Disks\Default.dsk - - + + {99CA7796-B72A-4F8C-BCDB-0D688220A331} + Jellyfish.Library.Silverlight + - + + + \ No newline at end of file diff --git a/Virtu/Silverlight/Phone/MainApp.xaml b/Virtu/Silverlight/Phone/MainApp.xaml new file mode 100644 index 0000000..ae8211f --- /dev/null +++ b/Virtu/Silverlight/Phone/MainApp.xaml @@ -0,0 +1,566 @@ + + + + + + + + + + + + #FF1F1F1F + Black + White + #FF666666 + #FF808080 + #FF999999 + #FFFFFFFF + #FFBFBFBF + #FFCCCCCC + Black + #FF1BA1E2 + + + + + + + + + + + + + + + + + 12 + + + 3 + + + Segoe WP + Segoe WP Light + Segoe WP Semilight + Segoe WP Semibold + + + + 18.667 + + 20 + + 22.667 + + 25.333 + + 32 + + 42.667 + + 72 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Virtu/Silverlight/Phone/MainApp.xaml.cs b/Virtu/Silverlight/Phone/MainApp.xaml.cs new file mode 100644 index 0000000..bcf3de9 --- /dev/null +++ b/Virtu/Silverlight/Phone/MainApp.xaml.cs @@ -0,0 +1,13 @@ +using Jellyfish.Library; + +namespace Jellyfish.Virtu +{ + public sealed partial class MainApp : ApplicationBase + { + public MainApp() : + base("Virtu") + { + InitializeComponent(); + } + } +} diff --git a/Virtu/Silverlight/Phone/MainPage.xaml b/Virtu/Silverlight/Phone/MainPage.xaml new file mode 100644 index 0000000..8aca00a --- /dev/null +++ b/Virtu/Silverlight/Phone/MainPage.xaml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Virtu/Silverlight/Phone/MainPage.xaml.cs b/Virtu/Silverlight/Phone/MainPage.xaml.cs new file mode 100644 index 0000000..9e3f5da --- /dev/null +++ b/Virtu/Silverlight/Phone/MainPage.xaml.cs @@ -0,0 +1,77 @@ +using System; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using Jellyfish.Virtu.Services; +using Microsoft.Phone.Controls; + +namespace Jellyfish.Virtu +{ + public sealed partial class MainPage : PhoneApplicationPage, IDisposable + { + public MainPage() + { + InitializeComponent(); + + _storageService = new IsolatedStorageService(_machine); + _keyboardService = new SilverlightKeyboardService(_machine, this); + _gamePortService = new GamePortService(_machine); // not connected + _audioService = new SilverlightAudioService(_machine, this, _media); + _videoService = new SilverlightVideoService(_machine, this, _image); + + _machine.Services.AddService(typeof(StorageService), _storageService); + _machine.Services.AddService(typeof(KeyboardService), _keyboardService); + _machine.Services.AddService(typeof(GamePortService), _gamePortService); + _machine.Services.AddService(typeof(AudioService), _audioService); + _machine.Services.AddService(typeof(VideoService), _videoService); + + Loaded += (sender, e) => _machine.Start(); + CompositionTarget.Rendering += OnCompositionTargetRendering; + Application.Current.Exit += (sender, e) => _machine.Stop(); + + //_disk1Button.Click += (sender, e) => OnDiskButtonClick(0); // TODO + //_disk2Button.Click += (sender, e) => OnDiskButtonClick(1); + } + + public void Dispose() + { + _machine.Dispose(); + _storageService.Dispose(); + _keyboardService.Dispose(); + _gamePortService.Dispose(); + _audioService.Dispose(); + _videoService.Dispose(); + } + + private void OnCompositionTargetRendering(object sender, EventArgs e) + { + _keyboardService.Update(); + _gamePortService.Update(); + _videoService.Update(); + } + + //private void OnDiskButtonClick(int drive) // TODO + //{ + // var dialog = new OpenFileDialog() { Filter = "Disk Files (*.dsk;*.nib)|*.dsk;*.nib|All Files (*.*)|*.*" }; + + // bool? result = dialog.ShowDialog(); + // if (result.HasValue && result.Value) + // { + // using (var stream = dialog.File.OpenRead()) + // { + // _machine.Pause(); + // _machine.DiskII.Drives[drive].InsertDisk(dialog.File.Name, stream, false); + // _machine.Unpause(); + // } + // } + //} + + private Machine _machine = new Machine(); + + private StorageService _storageService; + private KeyboardService _keyboardService; + private GamePortService _gamePortService; + private AudioService _audioService; + private VideoService _videoService; + } +} diff --git a/Virtu/Silverlight/Phone/Properties/AppManifest.xml b/Virtu/Silverlight/Phone/Properties/AppManifest.xml new file mode 100644 index 0000000..8eaa335 --- /dev/null +++ b/Virtu/Silverlight/Phone/Properties/AppManifest.xml @@ -0,0 +1,5 @@ + + + + diff --git a/Virtu/Silverlight/Phone/Properties/AssemblyInfo.cs b/Virtu/Silverlight/Phone/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..746e02f --- /dev/null +++ b/Virtu/Silverlight/Phone/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System; +using System.Reflection; +using System.Resources; +using System.Runtime.InteropServices; +using Jellyfish.Library; + +[assembly: AssemblyTitle("Virtu")] +[assembly: AssemblyDescription("Apple IIe Emulator")] +[assembly: AssemblyProduct("Jellyfish.Virtu.Silverlight.Phone")] +[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] +[assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] + +[assembly: AssemblyVersion("0.8.2.0")] +[assembly: AssemblyFileVersion("0.8.2.0")] +[assembly: AssemblyInformationalVersion("0.8.2.0")] + +[assembly: CLSCompliant(false)] +[assembly: ComVisible(false)] +[assembly: Guid("89a50370-1ed9-4cf1-ad08-043b6e6f3c90")] + +[assembly: NeutralResourcesLanguage("en")] diff --git a/Virtu/Silverlight/Phone/Properties/WMAppManifest.xml b/Virtu/Silverlight/Phone/Properties/WMAppManifest.xml new file mode 100644 index 0000000..c2c794a --- /dev/null +++ b/Virtu/Silverlight/Phone/Properties/WMAppManifest.xml @@ -0,0 +1,29 @@ + + + + AppIcon.png + + + + + + + + + + + + + + + + + + Background.png + 0 + Virtu + + + + + diff --git a/Virtu/Silverlight/Properties/AssemblyInfo.cs b/Virtu/Silverlight/Properties/AssemblyInfo.cs index a107935..503fd9e 100644 --- a/Virtu/Silverlight/Properties/AssemblyInfo.cs +++ b/Virtu/Silverlight/Properties/AssemblyInfo.cs @@ -11,9 +11,9 @@ [assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] -[assembly: AssemblyVersion("0.8.1.0")] -[assembly: AssemblyFileVersion("0.8.1.0")] -[assembly: AssemblyInformationalVersion("0.8.1.0")] +[assembly: AssemblyVersion("0.8.2.0")] +[assembly: AssemblyFileVersion("0.8.2.0")] +[assembly: AssemblyInformationalVersion("0.8.2.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/Silverlight/Properties/OutOfBrowserSettings.xml b/Virtu/Silverlight/Properties/OutOfBrowserSettings.xml index 118b758..48a528c 100644 --- a/Virtu/Silverlight/Properties/OutOfBrowserSettings.xml +++ b/Virtu/Silverlight/Properties/OutOfBrowserSettings.xml @@ -1,7 +1,10 @@ - - Apple IIe Emulator - - - - - + + Apple IIe Emulator + + + + + + + + \ No newline at end of file diff --git a/Virtu/Silverlight/Services/SilverlightAudioService.cs b/Virtu/Silverlight/Services/SilverlightAudioService.cs index a54c1de..562df37 100644 --- a/Virtu/Silverlight/Services/SilverlightAudioService.cs +++ b/Virtu/Silverlight/Services/SilverlightAudioService.cs @@ -23,17 +23,19 @@ public SilverlightAudioService(Machine machine, UserControl page, MediaElement m _page.Loaded += (sender, e) => { _media.SetSource(_mediaSource); _media.Play(); }; _mediaSource.Update += OnMediaSourceUpdate; - //_page.Closed += (sender, e) => _media.Stop(); // SL is missing Closed / Unloaded event +#if !WINDOWS_PHONE + _page.Unloaded += (sender, e) => _media.Stop(); +#endif } private void OnMediaSourceUpdate(object sender, WaveMediaStreamSourceUpdateEventArgs e) // audio thread { //if (_count++ % (1000 / SampleLatency) == 0) //{ - // _page.Dispatcher.BeginInvoke(new Action(() => + // _page.Dispatcher.BeginInvoke(() => // { // ((MainPage)_page)._debug.Text += string.Concat(DateTime.Now, " OnMediaSourceUpdate", Environment.NewLine); - // })); + // }); //} Update(e.BufferSize, (source, count) => diff --git a/Virtu/Silverlight/Services/SilverlightKeyboardService.cs b/Virtu/Silverlight/Services/SilverlightKeyboardService.cs index 3c1408b..f3959d6 100644 --- a/Virtu/Silverlight/Services/SilverlightKeyboardService.cs +++ b/Virtu/Silverlight/Services/SilverlightKeyboardService.cs @@ -303,7 +303,7 @@ private int GetAsciiKey(Key key, int platformKeyCode) return shift ? '>' : '.'; } break; - +#if !WINDOWS_PHONE case PlatformID.MacOSX: switch (platformKeyCode) { @@ -341,7 +341,7 @@ private int GetAsciiKey(Key key, int platformKeyCode) return shift ? '>' : '.'; } break; - +#endif case PlatformID.Unix: switch (platformKeyCode) { diff --git a/Virtu/Silverlight/Services/SilverlightVideoService.cs b/Virtu/Silverlight/Services/SilverlightVideoService.cs index 868d116..ba23e68 100644 --- a/Virtu/Silverlight/Services/SilverlightVideoService.cs +++ b/Virtu/Silverlight/Services/SilverlightVideoService.cs @@ -2,57 +2,58 @@ using System.Diagnostics.CodeAnalysis; using System.Windows; using System.Windows.Controls; -using System.Windows.Interop; using System.Windows.Media.Imaging; +#if WINDOWS_PHONE +using Microsoft.Phone.Controls; +#endif namespace Jellyfish.Virtu.Services { public sealed class SilverlightVideoService : VideoService { - public SilverlightVideoService(Machine machine, Image image) : + public SilverlightVideoService(Machine machine, UserControl page, Image image) : base(machine) { + if (page == null) + { + throw new ArgumentNullException("page"); + } if (image == null) { throw new ArgumentNullException("image"); } + _page = page; _image = image; - _image.Source = _bitmap; - SetImageSize(); - Application.Current.Host.Content.Resized += (sender, e) => SetImageSize(); + var content = Application.Current.Host.Content; +#if WINDOWS_PHONE + ((Page)_page).OrientationChanged += (sender, e) => SetImageSize(swapOrientation: (e.Orientation & PageOrientation.Landscape) != 0); +#else + _page.LayoutUpdated += (sender, e) => SetWindowSizeToContent(); + content.FullScreenChanged += (sender, e) => SetImageSize(); +#endif + content.Resized += (sender, e) => SetImageSize(); } - [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow", MessageId = "y*560")] + [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow")] public override void SetPixel(int x, int y, uint color) { _pixels[y * BitmapWidth + x] = (int)color; + _pixels[(y + 1) * BitmapWidth + x] = (_imageScale < 1) ? (int)color : 0x0; _pixelsDirty = true; } public override void Update() // main thread { - if (Application.Current.IsRunningOutOfBrowser && /*_window.IsActive &&*/ (_isFullScreen != IsFullScreen)) +#if !WINDOWS_PHONE + var content = Application.Current.Host.Content; + if (Application.Current.IsRunningOutOfBrowser && (content.IsFullScreen != IsFullScreen)) { - if (IsFullScreen) // SL is missing out of browser window control - { - //_window.SizeToContent = SizeToContent.Manual; - //_window.Topmost = true; - //_window.WindowStyle = WindowStyle.None; - //_window.WindowState = WindowState.Maximized; - } - else - { - //_window.WindowState = WindowState.Normal; - //_window.WindowStyle = WindowStyle.SingleBorderWindow; - //_window.Topmost = false; - //_window.SizeToContent = SizeToContent.WidthAndHeight; - } - _isFullScreen = IsFullScreen; + Application.Current.RootVisual.Dispatcher.BeginInvoke(() => content.IsFullScreen = IsFullScreen); // queue to dispatcher; avoids crash! } - +#endif if (_pixelsDirty) { _pixelsDirty = false; @@ -64,21 +65,45 @@ public override void Update() // main thread } } - private void SetImageSize() + private void SetImageSize(bool swapOrientation = false) { var content = Application.Current.Host.Content; - int uniformScale = Math.Min((int)content.ActualWidth / BitmapWidth, (int)content.ActualHeight / BitmapHeight); - _image.Width = uniformScale * BitmapWidth; - _image.Height = uniformScale * BitmapHeight; + _imageScale = swapOrientation ? Math.Min(content.ActualHeight / BitmapWidth, content.ActualWidth / BitmapHeight) : + Math.Min(content.ActualWidth / BitmapWidth, content.ActualHeight / BitmapHeight); + if (_imageScale > 1) + { + _imageScale = Math.Floor(_imageScale); // integer scale up + } + _image.Width = _imageScale * BitmapWidth; + _image.Height = _imageScale * BitmapHeight; + Machine.Video.DirtyScreen(); } +#if !WINDOWS_PHONE + private void SetWindowSizeToContent() + { + if (Application.Current.IsRunningOutOfBrowser && !_sizedToContent) + { + _sizedToContent = true; + var window = Application.Current.MainWindow; + var size = Application.Current.RootVisual.DesiredSize; + window.Width = size.Width; + window.Height = size.Height; + } + } +#endif + private const int BitmapWidth = 560; private const int BitmapHeight = 384; + private UserControl _page; private Image _image; + private double _imageScale; private WriteableBitmap _bitmap = new WriteableBitmap(BitmapWidth, BitmapHeight); private int[] _pixels = new int[BitmapWidth * BitmapHeight]; private bool _pixelsDirty; - private bool _isFullScreen; +#if !WINDOWS_PHONE + private bool _sizedToContent; +#endif } } diff --git a/Virtu/Video.cs b/Virtu/Video.cs index f5996d8..2aa745b 100644 --- a/Virtu/Video.cs +++ b/Virtu/Video.cs @@ -893,7 +893,7 @@ private void FlushRowEvent() private void FlushScreen() { - Action flushRowMode = FlushRowMode[_memory.VideoMode]; + var flushRowMode = FlushRowMode[_memory.VideoMode]; for (int y = 0; y < Height; y += CellHeight) { diff --git a/Virtu/Wpf/Properties/AppleIcon.ico b/Virtu/Wpf/AppIcon.ico similarity index 100% rename from Virtu/Wpf/Properties/AppleIcon.ico rename to Virtu/Wpf/AppIcon.ico diff --git a/Virtu/Wpf/Jellyfish.Virtu.Wpf.csproj b/Virtu/Wpf/Jellyfish.Virtu.Wpf.csproj index 7e63512..0d8779b 100644 --- a/Virtu/Wpf/Jellyfish.Virtu.Wpf.csproj +++ b/Virtu/Wpf/Jellyfish.Virtu.Wpf.csproj @@ -1,37 +1,37 @@  - + Debug - AnyCPU - 9.0.30729 + x86 + 8.0.30703 2.0 - {D59B29AC-1105-410D-A88D-61E9C98B0C4B} + {C152D47E-BBC1-4C35-8646-465180720A72} WinExe Properties Jellyfish.Virtu Jellyfish.Virtu - v3.5 + v4.0 + Client 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 - false - ..\..\Jellyfish.snk - Properties\AppleIcon.ico + AppIcon.ico - + + x86 true full false bin\ - TRACE;DEBUG;WINDOWS;CODE_ANALYSIS + DEBUG;TRACE;WINDOWS;CODE_ANALYSIS prompt 4 true - - - x86 + AllRules.ruleset + false - + + x86 pdbonly true bin\ @@ -39,31 +39,22 @@ prompt 4 true - - - x86 + AllRules.ruleset + false - + + + - - 3.5 - - + - - 3.5 + + 4.0 - - 3.0 - - - 3.0 - - - 3.0 - + + @@ -114,18 +105,9 @@ GlobalSuppressions.cs - - Services\AudioService.cs - - - Services\GamePortService.cs - Core\Keyboard.cs - - Services\KeyboardService.cs - Core\Machine.cs @@ -135,12 +117,6 @@ Core\MachineEvents.cs - - Services\MachineService.cs - - - Services\MachineServices.cs - Core\MachineSettings.cs @@ -150,15 +126,36 @@ Core\MemoryData.cs - - Properties\SR.Designer.cs + + Properties\Strings.Designer.cs True True - SR.resx + Strings.resx + + + Services\AudioService.cs + + + Services\GamePortService.cs + + + Services\IsolatedStorageService.cs + + + Services\KeyboardService.cs + + + Services\MachineService.cs + + + Services\MachineServices.cs Services\StorageService.cs + + Services\VideoService.cs + Core\Speaker.cs @@ -168,42 +165,35 @@ Core\VideoData.cs - - Services\VideoService.cs - - - Services\XnaGamePortService.cs - - - Code - + + + + + + + + + + + Properties\Strings.resx + ResXFileCodeGenerator + Strings.Designer.cs + + + + + Disks\Default.dsk + Roms\AppleIIe.rom Roms\DiskII.rom - - - - - Properties\SR.resx - ResXFileCodeGenerator - SR.Designer.cs - - - - - - - - {D47A24A9-1590-4E8A-A406-BC66D5891BFA} - Jellyfish.Library.Wpf - @@ -211,9 +201,10 @@ - - Disks\Default.dsk - + + {93900841-7250-4D3A-837E-43EE3FD118DC} + Jellyfish.Library.Wpf + - \ No newline at end of file diff --git a/Virtu/Xna/Content/Jellyfish.Virtu.Xna.Content.contentproj b/Virtu/Xna/Content/Jellyfish.Virtu.Xna.Content.contentproj new file mode 100644 index 0000000..26d3f90 --- /dev/null +++ b/Virtu/Xna/Content/Jellyfish.Virtu.Xna.Content.contentproj @@ -0,0 +1,56 @@ + + + + {C138ADC9-8F2B-414A-930D-12B489A96BBB} + {96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + x86 + Library + Properties + v4.0 + v4.0 + bin\$(Platform)\$(Configuration) + Content + + + Jellyfish.Virtu.Xna.Content + + + AllRules.ruleset + + + + False + + + False + + + False + + + False + + + False + + + False + + + + + Consolas + FontDescriptionImporter + FontDescriptionProcessor + + + + + \ No newline at end of file diff --git a/Virtu/Xna/Jellyfish.Virtu.Xna.Phone.csproj b/Virtu/Xna/Jellyfish.Virtu.Xna.Phone.csproj new file mode 100644 index 0000000..71c7ea9 --- /dev/null +++ b/Virtu/Xna/Jellyfish.Virtu.Xna.Phone.csproj @@ -0,0 +1,240 @@ + + + + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + Windows Phone + Library + Properties + Jellyfish.Virtu + Jellyfish.Virtu + v4.0 + Client + v4.0 + Windows Phone + Reach + 48ae3b16-efe9-4694-85f0-23da456b4bc4 + Game + $(AssemblyName).xap + Properties\AppManifest.xml + Properties\WindowsPhoneManifest.xml + AppIcon.ico + AppThumbnail.png + Jellyfish.Virtu.MainGame + + + true + full + false + bin\Windows Phone\ + DEBUG;TRACE;WINDOWS_PHONE;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + pdbonly + true + bin\Windows Phone\ + TRACE;WINDOWS_PHONE;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + + + Core\Cassette.cs + + + Core\Cpu.cs + + + Core\CpuData.cs + + + Core\Disk525.cs + + + Core\DiskDsk.cs + + + Core\DiskII.cs + + + Core\DiskNib.cs + + + Core\Drive525.cs + + + Core\GamePort.cs + + + GlobalSuppressions.cs + + + Core\Keyboard.cs + + + Core\Machine.cs + + + Core\MachineComponent.cs + + + Core\MachineEvents.cs + + + Core\MachineSettings.cs + + + Core\Memory.cs + + + Core\MemoryData.cs + + + Properties\Strings.Designer.cs + True + True + Strings.resx + + + Services\AudioService.cs + + + Services\GamePortService.cs + + + Services\IsolatedStorageService.cs + + + Services\KeyboardService.cs + + + Services\MachineService.cs + + + Services\MachineServices.cs + + + Services\StorageService.cs + + + Services\VideoService.cs + + + Core\Speaker.cs + + + Core\Video.cs + + + Core\VideoData.cs + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + Properties\Strings.resx + ResXFileCodeGenerator + Strings.Designer.cs + + + + + Disks\Default.dsk + + + Roms\AppleIIe.rom + + + Roms\DiskII.rom + + + + + CustomDictionary.xml + + + + + {46B2BD23-3D45-4268-9979-B9CF136CC982} + Jellyfish.Library.Xna.Phone + + + Jellyfish.Virtu.Xna.Content + Content + + + + + + \ No newline at end of file diff --git a/Virtu/Xna/Jellyfish.Virtu.Xna.Xbox.csproj b/Virtu/Xna/Jellyfish.Virtu.Xna.Xbox.csproj index b473c53..e30eb69 100644 --- a/Virtu/Xna/Jellyfish.Virtu.Xna.Xbox.csproj +++ b/Virtu/Xna/Jellyfish.Virtu.Xna.Xbox.csproj @@ -1,69 +1,100 @@ - + + - {1D3618DE-F050-4350-826E-5E84BC62DEE3} + {1400371E-AC2E-4BC5-8A52-077616F716C4} {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Debug Xbox 360 - WinExe + Exe Properties Jellyfish.Virtu Jellyfish.Virtu - v3.5 - v3.1 + v4.0 + Client + v4.0 Xbox 360 - 5624fafb-e097-4935-a2af-35fe579b07ca - - - Properties\AppleThumbnail.png - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - false - ..\..\Jellyfish.snk + Reach + 48ae3b16-efe9-4694-85f0-23da456b4bc4 + Game + AppIcon.ico + AppThumbnail.png - bin\Xbox\ - prompt - 4 - true - false - x86 true full false - TRACE;DEBUG;XBOX;XBOX360;CODE_ANALYSIS - true - true - - - - - bin\Xbox\ + bin\Xbox 360\ + DEBUG;TRACE;XBOX;XBOX360;CODE_ANALYSIS prompt 4 true false - x86 - pdbonly - true - TRACE;XBOX;XBOX360;CODE_ANALYSIS true true - - + AllRules.ruleset + false + + pdbonly + true + bin\Xbox 360\ + TRACE;XBOX;XBOX360;CODE_ANALYSIS + prompt + 4 + true + false + true + true + AllRules.ruleset + false + + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + Core\Cassette.cs @@ -116,11 +147,11 @@ Core\MemoryData.cs - - Properties\SR.Designer.cs + + Properties\Strings.Designer.cs True True - SR.resx + Strings.resx Services\AudioService.cs @@ -152,73 +183,35 @@ Core\VideoData.cs - - + + - - CustomDictionary.xml - - - + - - bfe4fbb9-2855-4a2b-9067-a82419579a7d - False - + + + PreserveNewest + - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - - - - - Properties\SR.resx + + Properties\Strings.resx ResXFileCodeGenerator - SR.Designer.cs + Strings.Designer.cs + + Disks\Default.dsk + Roms\AppleIIe.rom @@ -227,48 +220,28 @@ - - False - - - False - - - False - - - False - - - False - 3.5 - - - False - - - False - 3.5 - + + CustomDictionary.xml + - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA} + {222412EE-A626-493F-AE72-344657A6840D} Jellyfish.Library.Xna.Xbox - - - - Disks\Default.dsk - + + Jellyfish.Virtu.Xna.Content + Content + - + \ No newline at end of file diff --git a/Virtu/Xna/Jellyfish.Virtu.Xna.csproj b/Virtu/Xna/Jellyfish.Virtu.Xna.csproj index 09df373..90d6336 100644 --- a/Virtu/Xna/Jellyfish.Virtu.Xna.csproj +++ b/Virtu/Xna/Jellyfish.Virtu.Xna.csproj @@ -1,6 +1,7 @@ - + + - {F72C1068-E6F3-4A6C-A404-F88626B43B7C} + {3D0AE444-357F-4986-859F-602CC9BB4EF6} {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} Debug x86 @@ -8,50 +9,36 @@ Properties Jellyfish.Virtu Jellyfish.Virtu - v3.5 - v3.1 + v4.0 + Client + v4.0 Windows - 5624fafb-e097-4935-a2af-35fe579b07ca - Properties\AppleIcon.ico - Properties\AppleThumbnail.png - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - false - ..\..\Jellyfish.snk + Reach + 48ae3b16-efe9-4694-85f0-23da456b4bc4 + Game + AppIcon.ico + AppThumbnail.png true full false - bin\ - TRACE;DEBUG;WINDOWS;CODE_ANALYSIS + bin\x86\ + DEBUG;TRACE;WINDOWS;CODE_ANALYSIS prompt 4 true false x86 - false + true true - - + AllRules.ruleset + false pdbonly true - bin\ + bin\x86\ TRACE;WINDOWS;CODE_ANALYSIS prompt 4 @@ -60,31 +47,54 @@ x86 true true - - + AllRules.ruleset + false - - + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + + + False + False - - 3.0 - + False - + + False + False - - 3.5 - False - - 3.5 False @@ -140,11 +150,11 @@ Core\MemoryData.cs - - Properties\SR.Designer.cs + + Properties\Strings.Designer.cs True True - SR.resx + Strings.resx Services\AudioService.cs @@ -177,65 +187,34 @@ Core\VideoData.cs - - + + - - bfe4fbb9-2855-4a2b-9067-a82419579a7d - False - + - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - false - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - False - Microsoft XNA Framework Redistributable 3.1 - true - + + + PreserveNewest + - - Properties\SR.resx + + Properties\Strings.resx ResXFileCodeGenerator - SR.Designer.cs + Strings.Designer.cs + + Disks\Default.dsk + Roms\AppleIIe.rom @@ -247,27 +226,25 @@ CustomDictionary.xml - - - {E246958B-EAD8-48E9-844B-54718C952869} + {82F56318-A1FD-4078-A42F-06CAB8B97F63} Jellyfish.Library.Xna - - - - Disks\Default.dsk - + + Jellyfish.Virtu.Xna.Content + Content + - + \ No newline at end of file diff --git a/Virtu/Xna/Jellyfish.Virtu.Xna.sln b/Virtu/Xna/Jellyfish.Virtu.Xna.sln index 03a8fb2..11ca4c4 100644 --- a/Virtu/Xna/Jellyfish.Virtu.Xna.sln +++ b/Virtu/Xna/Jellyfish.Virtu.Xna.sln @@ -1,76 +1,132 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna", "Jellyfish.Virtu.Xna.csproj", "{F72C1068-E6F3-4A6C-A404-F88626B43B7C}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "..\..\Library\Xna\Jellyfish.Library.Xna.csproj", "{82F56318-A1FD-4078-A42F-06CAB8B97F63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Xbox", "Jellyfish.Virtu.Xna.Xbox.csproj", "{1D3618DE-F050-4350-826E-5E84BC62DEE3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Phone", "..\..\Library\Xna\Jellyfish.Library.Xna.Phone.csproj", "{46B2BD23-3D45-4268-9979-B9CF136CC982}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna", "..\..\Library\Xna\Jellyfish.Library.Xna.csproj", "{E246958B-EAD8-48E9-844B-54718C952869}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "..\..\Library\Xna\Jellyfish.Library.Xna.Xbox.csproj", "{222412EE-A626-493F-AE72-344657A6840D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Library.Xna.Xbox", "..\..\Library\Xna\Jellyfish.Library.Xna.Xbox.csproj", "{6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna", "Jellyfish.Virtu.Xna.csproj", "{3D0AE444-357F-4986-859F-602CC9BB4EF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Content", "Content\Jellyfish.Virtu.Xna.Content.contentproj", "{C138ADC9-8F2B-414A-930D-12B489A96BBB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Phone", "Jellyfish.Virtu.Xna.Phone.csproj", "{AE4C0489-3A21-4264-BE20-EA6C72B24B2C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jellyfish.Virtu.Xna.Xbox", "Jellyfish.Virtu.Xna.Xbox.csproj", "{1400371E-AC2E-4BC5-8A52-077616F716C4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|Windows Phone = Debug|Windows Phone Debug|x86 = Debug|x86 Debug|Xbox 360 = Debug|Xbox 360 + Release|Any CPU = Release|Any CPU Release|Mixed Platforms = Release|Mixed Platforms + Release|Windows Phone = Release|Windows Phone Release|x86 = Release|x86 Release|Xbox 360 = Release|Xbox 360 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|x86.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|x86.Build.0 = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Mixed Platforms.Build.0 = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|x86.ActiveCfg = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|x86.Build.0 = Release|x86 - {F72C1068-E6F3-4A6C-A404-F88626B43B7C}.Release|Xbox 360.ActiveCfg = Release|x86 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|x86.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {1D3618DE-F050-4350-826E-5E84BC62DEE3}.Release|Xbox 360.Build.0 = Release|Xbox 360 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|x86.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|x86.ActiveCfg = Release|x86 - {BFE4FBB9-2855-4A2B-9067-A82419579A7D}.Release|Xbox 360.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|x86.Build.0 = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Mixed Platforms.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.ActiveCfg = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|x86.Build.0 = Release|x86 - {E246958B-EAD8-48E9-844B-54718C952869}.Release|Xbox 360.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|x86.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Debug|Xbox 360.ActiveCfg = Debug|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|x86.ActiveCfg = Release|x86 - {A96F5631-40E1-40B0-AEE2-6F2E3368E2AE}.Release|Xbox 360.ActiveCfg = Release|x86 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|x86.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.ActiveCfg = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Debug|Xbox 360.Build.0 = Debug|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|x86.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 - {6EE9A3C2-0BD8-480D-AED2-6A5A9EBF7AFA}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Any CPU.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Windows Phone.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.ActiveCfg = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|x86.Build.0 = Debug|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Debug|Xbox 360.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Any CPU.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Mixed Platforms.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Windows Phone.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.ActiveCfg = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|x86.Build.0 = Release|x86 + {82F56318-A1FD-4078-A42F-06CAB8B97F63}.Release|Xbox 360.ActiveCfg = Release|x86 + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Windows Phone.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|x86.ActiveCfg = Debug|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Debug|Xbox 360.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Any CPU.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Windows Phone.Build.0 = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|x86.ActiveCfg = Release|Windows Phone + {46B2BD23-3D45-4268-9979-B9CF136CC982}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Windows Phone.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Debug|Xbox 360.Build.0 = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Any CPU.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|x86.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {222412EE-A626-493F-AE72-344657A6840D}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Any CPU.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Windows Phone.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|x86.ActiveCfg = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|x86.Build.0 = Debug|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Debug|Xbox 360.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Any CPU.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Mixed Platforms.Build.0 = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Windows Phone.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|x86.ActiveCfg = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|x86.Build.0 = Release|x86 + {3D0AE444-357F-4986-859F-602CC9BB4EF6}.Release|Xbox 360.ActiveCfg = Release|x86 + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Windows Phone.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|x86.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Debug|Xbox 360.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Any CPU.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Windows Phone.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|x86.ActiveCfg = Debug|Any CPU + {C138ADC9-8F2B-414A-930D-12B489A96BBB}.Release|Xbox 360.ActiveCfg = Debug|Any CPU + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Any CPU.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Mixed Platforms.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Mixed Platforms.Build.0 = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.Build.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Windows Phone.Deploy.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|x86.ActiveCfg = Debug|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Debug|Xbox 360.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Any CPU.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Mixed Platforms.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Mixed Platforms.Build.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.Build.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Windows Phone.Deploy.0 = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|x86.ActiveCfg = Release|Windows Phone + {AE4C0489-3A21-4264-BE20-EA6C72B24B2C}.Release|Xbox 360.ActiveCfg = Release|Windows Phone + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Any CPU.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Mixed Platforms.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Mixed Platforms.Build.0 = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Windows Phone.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|x86.ActiveCfg = Debug|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.Build.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Debug|Xbox 360.Deploy.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Any CPU.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Mixed Platforms.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Mixed Platforms.Build.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Windows Phone.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|x86.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.ActiveCfg = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.Build.0 = Release|Xbox 360 + {1400371E-AC2E-4BC5-8A52-077616F716C4}.Release|Xbox 360.Deploy.0 = Release|Xbox 360 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Virtu/Xna/MainApp.cs b/Virtu/Xna/MainApp.cs index 7ac1089..176a827 100644 --- a/Virtu/Xna/MainApp.cs +++ b/Virtu/Xna/MainApp.cs @@ -1,5 +1,6 @@ namespace Jellyfish.Virtu { +#if WINDOWS || XBOX static class MainApp { static void Main() @@ -10,4 +11,5 @@ static void Main() } } } +#endif } diff --git a/Virtu/Xna/MainGame.cs b/Virtu/Xna/MainGame.cs index 8f71185..03c69a1 100644 --- a/Virtu/Xna/MainGame.cs +++ b/Virtu/Xna/MainGame.cs @@ -10,9 +10,21 @@ public sealed class MainGame : GameBase public MainGame() : base("Virtu") { - Components.Add(new FrameRateCounter(this) { DrawOrder = 1, FontName = "Consolas" }); +#if WINDOWS_PHONE + GraphicsDeviceManager.IsFullScreen = true; + GraphicsDeviceManager.PreferredBackBufferWidth = 480; // TODO remove; works around known ctp issue + GraphicsDeviceManager.PreferredBackBufferHeight = 800; +#endif + var frameRateCounter = new FrameRateCounter(this); // no initializers; avoids CA2000 + Components.Add(frameRateCounter); + frameRateCounter.DrawOrder = 1; + frameRateCounter.FontName = "Consolas"; +#if WINDOWS_PHONE + _storageService = new IsolatedStorageService(_machine); +#else _storageService = new XnaStorageService(_machine, this); +#endif _keyboardService = new XnaKeyboardService(_machine); _gamePortService = new XnaGamePortService(_machine); _audioService = new XnaAudioService(_machine, this); diff --git a/Virtu/Xna/Properties/AppManifest.xml b/Virtu/Xna/Properties/AppManifest.xml new file mode 100644 index 0000000..8eaa335 --- /dev/null +++ b/Virtu/Xna/Properties/AppManifest.xml @@ -0,0 +1,5 @@ + + + + diff --git a/Virtu/Xna/Properties/AssemblyInfo.cs b/Virtu/Xna/Properties/AssemblyInfo.cs index 6a136e2..ae69a2a 100644 --- a/Virtu/Xna/Properties/AssemblyInfo.cs +++ b/Virtu/Xna/Properties/AssemblyInfo.cs @@ -6,7 +6,9 @@ [assembly: AssemblyTitle("Virtu")] [assembly: AssemblyDescription("Apple IIe Emulator")] -#if XBOX +#if WINDOWS_PHONE +[assembly: AssemblyProduct("Jellyfish.Virtu.Xna.Phone")] +#elif XBOX [assembly: AssemblyProduct("Jellyfish.Virtu.Xna.Xbox")] #else [assembly: AssemblyProduct("Jellyfish.Virtu.Xna")] @@ -15,11 +17,9 @@ [assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] -[assembly: AssemblyVersion("0.8.1.0")] -#if WINDOWS -[assembly: AssemblyFileVersion("0.8.1.0")] -#endif -[assembly: AssemblyInformationalVersion("0.8.1.0")] +[assembly: AssemblyVersion("0.8.2.0")] +[assembly: AssemblyFileVersion("0.8.2.0")] +[assembly: AssemblyInformationalVersion("0.8.2.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/Xna/Properties/WindowsPhoneManifest.xml b/Virtu/Xna/Properties/WindowsPhoneManifest.xml new file mode 100644 index 0000000..2c1c504 --- /dev/null +++ b/Virtu/Xna/Properties/WindowsPhoneManifest.xml @@ -0,0 +1,29 @@ + + + + AppThumbnail.png + + + + + + + + + + + + + + + + + + AppThumbnail.png + 0 + Virtu + + + + + diff --git a/Virtu/Xna/Services/XnaAudioService.cs b/Virtu/Xna/Services/XnaAudioService.cs index a1959f9..2a9568d 100644 --- a/Virtu/Xna/Services/XnaAudioService.cs +++ b/Virtu/Xna/Services/XnaAudioService.cs @@ -39,6 +39,8 @@ protected override void Dispose(bool disposing) _timer.Dispose(); #endif } + + base.Dispose(disposing); } #if WINDOWS diff --git a/Virtu/Xna/Services/XnaKeyboardService.cs b/Virtu/Xna/Services/XnaKeyboardService.cs index 2359af4..42d70fa 100644 --- a/Virtu/Xna/Services/XnaKeyboardService.cs +++ b/Virtu/Xna/Services/XnaKeyboardService.cs @@ -300,7 +300,7 @@ private int GetAsciiKey(Keys key, bool gamePadControl) } private static readonly Keys[] KeyValues = -#if XBOX +#if WINDOWS_PHONE || XBOX (from key in (from field in typeof(Keys).GetFields() // missing Enum.GetValues; use reflection where field.IsLiteral diff --git a/Virtu/Xna/Services/XnaStorageService.cs b/Virtu/Xna/Services/XnaStorageService.cs index 8ee9088..64d57e8 100644 --- a/Virtu/Xna/Services/XnaStorageService.cs +++ b/Virtu/Xna/Services/XnaStorageService.cs @@ -1,7 +1,6 @@ using System; using System.IO; using Jellyfish.Library; -using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Storage; namespace Jellyfish.Virtu.Services @@ -58,6 +57,6 @@ public override void Save(string path, Action writer) } private GameBase _game; - private Lazy _storageDevice = new Lazy(() => Guide.EndShowStorageDeviceSelector(Guide.BeginShowStorageDeviceSelector(null, null))); + private Lazy _storageDevice = new Lazy(() => StorageDevice.EndShowSelector(StorageDevice.BeginShowSelector(null, null))); } } diff --git a/Virtu/Xna/Services/XnaVideoService.cs b/Virtu/Xna/Services/XnaVideoService.cs index a55d371..14d70ed 100644 --- a/Virtu/Xna/Services/XnaVideoService.cs +++ b/Virtu/Xna/Services/XnaVideoService.cs @@ -26,10 +26,12 @@ public XnaVideoService(Machine machine, GameBase game) : _game.GraphicsDeviceService.DeviceReset += (sender, e) => SetTexturePosition(); } - [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow", MessageId = "y*560")] + [SuppressMessage("Microsoft.Usage", "CA2233:OperationsShouldNotOverflow")] public override void SetPixel(int x, int y, uint color) { - _pixels[y * TextureWidth + x] = color; + uint rgbaColor = ((color << 16) & 0xFF0000) | (color & 0x00FF00) | ((color >> 16) & 0x0000FF); // convert from BGRA to RGBA + _pixels[y * TextureWidth + x] = rgbaColor; + _pixels[(y + 1) * TextureWidth + x] = (_textureScale < 1) ? rgbaColor : 0x0; _pixelsDirty = true; } @@ -47,8 +49,7 @@ public override void Update() // main thread _texture.SetData(_pixels); } - _spriteBatch.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SaveStateMode.None); - _graphicsDevice.SamplerStates[0].MagFilter = TextureFilter.Point; + _spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, SamplerState.PointClamp, null, null); _spriteBatch.Draw(_texture, _texturePosition, null, Color.White, 0, Vector2.Zero, _textureScale, SpriteEffects.None, 0); _spriteBatch.End(); } @@ -60,6 +61,8 @@ protected override void Dispose(bool disposing) _spriteBatch.Dispose(); _texture.Dispose(); } + + base.Dispose(disposing); } private void OnGraphicsDeviceManagerPreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e) @@ -67,7 +70,29 @@ private void OnGraphicsDeviceManagerPreparingDeviceSettings(object sender, Prepa var displayMode = e.GraphicsDeviceInformation.Adapter.CurrentDisplayMode; var presentationParameters = e.GraphicsDeviceInformation.PresentationParameters; -#if WINDOWS +#if WINDOWS_PHONE + bool portraitOrientation = (presentationParameters.DisplayOrientation & DisplayOrientation.Portrait) != 0; + if (portraitOrientation) + { + _textureScale = Math.Min((float)displayMode.TitleSafeArea.Width / TextureWidth, (float)displayMode.TitleSafeArea.Height / TextureHeight); + presentationParameters.BackBufferWidth = displayMode.Width; // always use portrait display mode + presentationParameters.BackBufferHeight = displayMode.Height; + } + else + { + _textureScale = Math.Min((float)displayMode.TitleSafeArea.Height / TextureWidth, (float)displayMode.TitleSafeArea.Width / TextureHeight); + presentationParameters.BackBufferWidth = displayMode.Height; // always use landscape display mode + presentationParameters.BackBufferHeight = displayMode.Width; + } + if (_textureScale > 1) + { + _textureScale = (float)Math.Floor(_textureScale); // integer scale up + } +#elif XBOX + _textureScale = Math.Min(displayMode.TitleSafeArea.Width / TextureWidth, displayMode.TitleSafeArea.Height / TextureHeight); + presentationParameters.BackBufferWidth = displayMode.Width; // always use display mode + presentationParameters.BackBufferHeight = displayMode.Height; +#else if (presentationParameters.IsFullScreen) { _textureScale = Math.Min((int)SystemParameters.PrimaryScreenWidth / TextureWidth, (int)SystemParameters.PrimaryScreenHeight / TextureHeight); @@ -77,13 +102,9 @@ private void OnGraphicsDeviceManagerPreparingDeviceSettings(object sender, Prepa else { _textureScale = Math.Min((int)SystemParameters.FullPrimaryScreenWidth / TextureWidth, (int)SystemParameters.FullPrimaryScreenHeight / TextureHeight); - presentationParameters.BackBufferWidth = _textureScale * TextureWidth; - presentationParameters.BackBufferHeight = _textureScale * TextureHeight; + presentationParameters.BackBufferWidth = (int)_textureScale * TextureWidth; + presentationParameters.BackBufferHeight = (int)_textureScale * TextureHeight; } -#else - _textureScale = Math.Min(displayMode.TitleSafeArea.Width / TextureWidth, displayMode.TitleSafeArea.Height / TextureHeight); - presentationParameters.BackBufferWidth = displayMode.Width; // always use display mode - presentationParameters.BackBufferHeight = displayMode.Height; #endif } @@ -91,7 +112,7 @@ private void OnGraphicsDeviceServiceDeviceCreated(object sender, EventArgs e) { _graphicsDevice = _game.GraphicsDevice; _spriteBatch = new SpriteBatch(_graphicsDevice); - _texture = new Texture2D(_graphicsDevice, TextureWidth, TextureHeight, 1, TextureUsage.None, SurfaceFormat.Bgr32); + _texture = new Texture2D(_graphicsDevice, TextureWidth, TextureHeight, false, SurfaceFormat.Color); _pixels = new uint[TextureWidth * TextureHeight]; SetTexturePosition(); } @@ -110,7 +131,7 @@ private void SetTexturePosition() private SpriteBatch _spriteBatch; private Texture2D _texture; private Vector2 _texturePosition; - private int _textureScale; + private float _textureScale; private uint[] _pixels; private bool _pixelsDirty; }