From bcf9a06fedbfc3978fe18a065fcc755bad2196ba Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 1 Jul 2012 14:35:59 +0000 Subject: Updates --- src/Noddybox.Emulation.EightBit/ICpu.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/Noddybox.Emulation.EightBit') diff --git a/src/Noddybox.Emulation.EightBit/ICpu.cs b/src/Noddybox.Emulation.EightBit/ICpu.cs index 9d1909c..1ee7781 100644 --- a/src/Noddybox.Emulation.EightBit/ICpu.cs +++ b/src/Noddybox.Emulation.EightBit/ICpu.cs @@ -19,6 +19,15 @@ using System; namespace Noddybox.Emulation.EightBit { + /// + /// Defines a delegate that will be called after an instruction. + /// + /// The CPU being used. All state will be upto date prior to invoking + /// the callback. + /// True if the CPU should continue executing, or false if not. Users should simply + /// return Clock.VBL if they need no other than clock control. + public delegate bool CpuCallback(object sender); + /// /// Defines an 8-bit CPU. /// @@ -47,6 +56,15 @@ namespace Noddybox.Emulation.EightBit /// void Run(); + /// + /// Runs the CPU until the callback tells it to stop. + /// + /// A delegate that is called after every completed instruction + /// cycle and tells the CPU when to stop running. Note that at least one instruction + /// is always executed as the callback is made after the cycle has completed. + /// + void Run(CpuCallback callback); + /// /// Generates a maskable interrupt to the CPU. /// -- cgit v1.2.3