2019-02-04 23:52:21 +00:00
|
|
|
|
// <copyright file="Ram.cs" company="Adrian Conlon">
|
|
|
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
namespace EightBit
|
2019-02-02 15:12:51 +00:00
|
|
|
|
{
|
|
|
|
|
public class Ram : Rom
|
|
|
|
|
{
|
2019-02-21 19:58:49 +00:00
|
|
|
|
public Ram(int size)
|
2019-02-02 15:12:51 +00:00
|
|
|
|
: base(size)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-21 19:58:49 +00:00
|
|
|
|
public Ram()
|
|
|
|
|
: this(0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-04 23:52:21 +00:00
|
|
|
|
public override sealed ref byte Reference(ushort address) => ref this.Bytes()[address];
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-04 23:52:21 +00:00
|
|
|
|
public new void Poke(ushort address, byte value) => base.Poke(address, value);
|
2019-02-02 15:12:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|