diff options
Diffstat (limited to 'Noddybox.Emulation.EightBit')
5 files changed, 182 insertions, 0 deletions
diff --git a/Noddybox.Emulation.EightBit/IDevice.cs b/Noddybox.Emulation.EightBit/IDevice.cs new file mode 100644 index 0000000..108adf9 --- /dev/null +++ b/Noddybox.Emulation.EightBit/IDevice.cs @@ -0,0 +1,34 @@ +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>
+ /// Provides an interface for devices for 8-bit processers which used special commands to access
+ /// devices rather than using memory-mapped IO, for example the Z80.
+ /// </summary>
+ public interface IDevice
+ {
+ /// <summary>
+ /// Read from a device.
+ /// </summary>
+ /// <param name="device">The address of the device.</param>
+ /// <returns>The byte returned from the device.</returns>
+ byte Read(UInt16 device);
+
+ /// <summary>
+ /// Write to a device.
+ /// </summary>
+ /// <param name="device">The address of the device.</param>
+ /// <param name="value">The value to write to the device.</param>
+ void Write(UInt16 device, byte value);
+ }
+}
diff --git a/Noddybox.Emulation.EightBit/IMemory.cs b/Noddybox.Emulation.EightBit/IMemory.cs new file mode 100644 index 0000000..5131eb0 --- /dev/null +++ b/Noddybox.Emulation.EightBit/IMemory.cs @@ -0,0 +1,33 @@ +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 interface for memory.
+ /// </summary>
+ public interface IMemory
+ {
+ /// <summary>
+ /// Reads a byte at a given address.
+ /// </summary>
+ /// <param name="address">The address to read.</param>
+ /// <returns>The value at that address.</returns>
+ byte Read(UInt16 address);
+
+ /// <summary>
+ /// Writes a byte at a given address.
+ /// </summary>
+ /// <param name="address">The address to write to.</param>
+ /// <param name="value">The value to write.</param>
+ void Write(UInt16 address, byte value);
+ }
+}
diff --git a/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj b/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj new file mode 100644 index 0000000..316b00b --- /dev/null +++ b/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>10.0.20506</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{ADC7A871-4DED-4A92-A447-2D784AB60FAF}</ProjectGuid>
+ <ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Noddybox.Emulation.EightBit</RootNamespace>
+ <AssemblyName>Noddybox.Emulation.EightBit</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <TargetFrameworkProfile>WindowsPhone71</TargetFrameworkProfile>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Net" />
+ <Reference Include="mscorlib.extensions" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="IDevice.cs" />
+ <Compile Include="IMemory.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
+ <Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj.user b/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj.user new file mode 100644 index 0000000..cba5519 --- /dev/null +++ b/Noddybox.Emulation.EightBit/Noddybox.Emulation.EightBit.csproj.user @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{C089C8C0-30E0-4E22-80C0-CE093F111A43}">
+ <SilverlightMobileCSProjectFlavor>
+ <FullDeploy>True</FullDeploy>
+ </SilverlightMobileCSProjectFlavor>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project>
\ No newline at end of file diff --git a/Noddybox.Emulation.EightBit/Properties/AssemblyInfo.cs b/Noddybox.Emulation.EightBit/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a0de499 --- /dev/null +++ b/Noddybox.Emulation.EightBit/Properties/AssemblyInfo.cs @@ -0,0 +1,37 @@ +using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Noddybox.Emulation.EightBit")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Noddybox.Emulation.EightBit")]
+[assembly: AssemblyCopyright("Copyright © 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c8c4f2cb-4b04-48a5-9add-a89b3995e00f")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguageAttribute("en-US")]
|