summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WindowsPhone/Noddybox.Emulation/Noddybox.Emulation.csproj4
-rw-r--r--native/Noddybox.Emulation.EightBit.Z80.Test/TestMachine.cs10
-rw-r--r--native/Noddybox.Emulation/Noddybox.Emulation.csproj18
-rw-r--r--src/Noddybox.Emulation/EmulationStateSettings.cs (renamed from WindowsPhone/Noddybox.Emulation/EmulationStateSettings.cs)9
4 files changed, 27 insertions, 14 deletions
diff --git a/WindowsPhone/Noddybox.Emulation/Noddybox.Emulation.csproj b/WindowsPhone/Noddybox.Emulation/Noddybox.Emulation.csproj
index b3cccab..365d263 100644
--- a/WindowsPhone/Noddybox.Emulation/Noddybox.Emulation.csproj
+++ b/WindowsPhone/Noddybox.Emulation/Noddybox.Emulation.csproj
@@ -64,13 +64,15 @@
<Compile Include="..\..\src\Noddybox.Emulation\EmulationStateSaveManager.cs">
<Link>EmulationStateSaveManager.cs</Link>
</Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\EmulationStateSettings.cs">
+ <Link>EmulationStateSettings.cs</Link>
+ </Compile>
<Compile Include="..\..\src\Noddybox.Emulation\IEmulationState.cs">
<Link>IEmulationState.cs</Link>
</Compile>
<Compile Include="..\..\src\Noddybox.Emulation\ReadOnlyArray.cs">
<Link>ReadOnlyArray.cs</Link>
</Compile>
- <Compile Include="EmulationStateSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
diff --git a/native/Noddybox.Emulation.EightBit.Z80.Test/TestMachine.cs b/native/Noddybox.Emulation.EightBit.Z80.Test/TestMachine.cs
index 8483050..709c574 100644
--- a/native/Noddybox.Emulation.EightBit.Z80.Test/TestMachine.cs
+++ b/native/Noddybox.Emulation.EightBit.Z80.Test/TestMachine.cs
@@ -29,7 +29,7 @@ namespace Noddybox.Emulation.EightBit.Z80.Test
private readonly byte[] mem = new byte[0x10000];
private readonly Z80Cpu z80 = new Z80Cpu();
private readonly Z80Disassembler disassembler = new Z80Disassembler();
- private readonly Clock clock = new Clock(uint.MaxValue, uint.MaxValue);
+ private readonly Clock clock = new Clock();
private void Output(ConsoleColor pen, ConsoleColor paper, string format, params object[] p)
{
@@ -118,6 +118,8 @@ namespace Noddybox.Emulation.EightBit.Z80.Test
int cyclesToRun = Convert.ToInt32(line.Dequeue().reg.ToString("X"));
+ clock.CycleCount = 0;
+
while(input.Count > 0)
{
line = Decode(input.Dequeue());
@@ -146,7 +148,7 @@ namespace Noddybox.Emulation.EightBit.Z80.Test
Debugger.Break();
}
- while (clock.Ticks < cyclesToRun)
+ while (clock.CycleCount < cyclesToRun)
{
z80.Step();
}
@@ -299,9 +301,9 @@ namespace Noddybox.Emulation.EightBit.Z80.Test
int cyclesToTest = Convert.ToInt32(line.Dequeue().reg.ToString("X"));
- if (cyclesToTest != clock.Ticks)
+ if (cyclesToTest != clock.CycleCount)
{
- Output(ConsoleColor.Red, ConsoleColor.Black, "Expected {0} cycles, got {1}", cyclesToTest, clock.Ticks);
+ Output(ConsoleColor.Red, ConsoleColor.Black, "Expected {0} cycles, got {1}", cyclesToTest, clock.CycleCount);
ok = false;
}
diff --git a/native/Noddybox.Emulation/Noddybox.Emulation.csproj b/native/Noddybox.Emulation/Noddybox.Emulation.csproj
index 4776878..eb12195 100644
--- a/native/Noddybox.Emulation/Noddybox.Emulation.csproj
+++ b/native/Noddybox.Emulation/Noddybox.Emulation.csproj
@@ -43,6 +43,24 @@
<Compile Include="..\..\src\Noddybox.Emulation\Clock.cs">
<Link>Clock.cs</Link>
</Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\ClockEventArgs.cs">
+ <Link>ClockEventArgs.cs</Link>
+ </Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\EmulationStateException.cs">
+ <Link>EmulationStateException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\EmulationStateLoadManager.cs">
+ <Link>EmulationStateLoadManager.cs</Link>
+ </Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\EmulationStateSaveManager.cs">
+ <Link>EmulationStateSaveManager.cs</Link>
+ </Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\EmulationStateSettings.cs">
+ <Link>EmulationStateSettings.cs</Link>
+ </Compile>
+ <Compile Include="..\..\src\Noddybox.Emulation\IEmulationState.cs">
+ <Link>IEmulationState.cs</Link>
+ </Compile>
<Compile Include="..\..\src\Noddybox.Emulation\ReadOnlyArray.cs">
<Link>ReadOnlyArray.cs</Link>
</Compile>
diff --git a/WindowsPhone/Noddybox.Emulation/EmulationStateSettings.cs b/src/Noddybox.Emulation/EmulationStateSettings.cs
index 7b239c9..68c4f15 100644
--- a/WindowsPhone/Noddybox.Emulation/EmulationStateSettings.cs
+++ b/src/Noddybox.Emulation/EmulationStateSettings.cs
@@ -16,15 +16,6 @@
// Copyright (c) 2012 Ian Cowburn
//
using System;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
namespace Noddybox.Emulation
{