summaryrefslogtreecommitdiff
path: root/src/Noddybox.Emulation.EightBit/ICpu.cs
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2012-01-01 14:21:26 +0000
committerIan C <ianc@noddybox.co.uk>2012-01-01 14:21:26 +0000
commit2b8d49726e448e22b5055da5ba4395d043030984 (patch)
tree84df14c05d10d11e293fb74d50364664124b844e /src/Noddybox.Emulation.EightBit/ICpu.cs
parent4a14a990665f766e349b9027dbf980bc39f395f6 (diff)
Moved sources to help in compilation for other platforms and isolated phone projects.
Diffstat (limited to 'src/Noddybox.Emulation.EightBit/ICpu.cs')
-rw-r--r--src/Noddybox.Emulation.EightBit/ICpu.cs57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/Noddybox.Emulation.EightBit/ICpu.cs b/src/Noddybox.Emulation.EightBit/ICpu.cs
new file mode 100644
index 0000000..dc2f811
--- /dev/null
+++ b/src/Noddybox.Emulation.EightBit/ICpu.cs
@@ -0,0 +1,57 @@
+//
+// 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.EightBit
+{
+ /// <summary>
+ /// Defines an 8-bit CPU.
+ /// </summary>
+ public interface ICpu
+ {
+ /// <summary>
+ /// Initialise the CPU to give it access to memory and devices.
+ /// </summary>
+ /// <param name="memory">The memory to access.</param>
+ /// <param name="device">The devices to access.</param>
+ /// <param name="clock">The clock to use.</param>
+ void Initialise(IMemory memory, IDevice device, Clock clock);
+
+ /// <summary>
+ /// Resets the CPU to its initial state.
+ /// </summary>
+ void Reset();
+
+ /// <summary>
+ /// Runs the next instruction.
+ /// </summary>
+ void Step();
+
+ /// <summary>
+ /// Runs the CPU until the next frame flyback.
+ /// </summary>
+ void Run();
+
+ /// <summary>
+ /// Generates a maskable interrupt to the CPU.
+ /// </summary>
+ /// <param name="value">Optional value from an interrupting device. May be ignored depending on the CPU type.</param>
+ void MaskableInterrupt(byte value);
+
+ /// <summary>
+ /// Generates a non-maskable interrupt to the CPU.
+ /// </summary>
+ /// <param name="value">Optional value from an interrupting device. May be ignored depending on the CPU type.</param>
+ void NonMaskableInterrupt(byte value);
+ }
+}