From f96332b0913a8a365db73a1af3443c0e225a23d8 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 29 Dec 2011 00:17:13 +0000 Subject: Development check-in. --- Noddybox.Emulation.EightBit/IMemory.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Noddybox.Emulation.EightBit/IMemory.cs') 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 { /// - /// 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. /// public interface IMemory { @@ -20,14 +24,14 @@ namespace Noddybox.Emulation.EightBit /// Reads a byte at a given address. /// /// The address to read. - /// The value at that address. - byte Read(ushort address); + /// The value at that address in the lower 8-bits. + int Read(int address); /// /// Writes a byte at a given address. /// /// The address to write to. - /// The value to write. - void Write(ushort address, byte value); + /// The value to write. Only the lower 8-bits are taken. + void Write(int address, int value); } } -- cgit v1.2.3