summaryrefslogtreecommitdiff
path: root/Noddybox.Emulation.EightBit/IMemory.cs
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2011-12-29 00:17:13 +0000
committerIan C <ianc@noddybox.co.uk>2011-12-29 00:17:13 +0000
commitf96332b0913a8a365db73a1af3443c0e225a23d8 (patch)
treed530b3eb68f9a5619c0c7c8a15878759b343f025 /Noddybox.Emulation.EightBit/IMemory.cs
parent2e3102879b2d3059f4ce0efc1a0ecd4bc3142a99 (diff)
Development check-in.
Diffstat (limited to 'Noddybox.Emulation.EightBit/IMemory.cs')
-rw-r--r--Noddybox.Emulation.EightBit/IMemory.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/Noddybox.Emulation.EightBit/IMemory.cs b/Noddybox.Emulation.EightBit/IMemory.cs
index 2c842a5..ee41500 100644
--- a/Noddybox.Emulation.EightBit/IMemory.cs
+++ b/Noddybox.Emulation.EightBit/IMemory.cs
@@ -1,4 +1,7 @@
-using System;
+//
+// Copyright (c) 2012 Ian Cowburn
+//
+using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
@@ -12,7 +15,8 @@ using System.Windows.Shapes;
namespace Noddybox.Emulation.EightBit
{
/// <summary>
- /// Defines an interface for memory.
+ /// Defines an interface for memory. Note that ints are used rather than smaller unsigned types due to the pain of
+ /// doing boolean operations on anything else in C# without copious casting.
/// </summary>
public interface IMemory
{
@@ -20,14 +24,14 @@ namespace Noddybox.Emulation.EightBit
/// 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(ushort address);
+ /// <returns>The value at that address in the lower 8-bits.</returns>
+ int Read(int 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(ushort address, byte value);
+ /// <param name="value">The value to write. Only the lower 8-bits are taken.</param>
+ void Write(int address, int value);
}
}