Not sure if this was a really good idea, but integrated StyleCop rules into the builds. Corrected all except documentation problems.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-02-04 23:52:21 +00:00
parent 30aa1b70bf
commit 224000c4c7
53 changed files with 2430 additions and 1575 deletions

View File

@@ -1,4 +1,8 @@
namespace EightBit
// <copyright file="LittleEndianProcessor.cs" company="Adrian Conlon">
// Copyright (c) Adrian Conlon. All rights reserved.
// </copyright>
namespace EightBit
{
public abstract class LittleEndianProcessor : Processor
{
@@ -9,63 +13,63 @@
public override ushort PeekWord(ushort address)
{
var low = Bus.Peek(address);
var high = Bus.Peek(++address);
return MakeWord(low, high);
var low = this.Bus.Peek(address);
var high = this.Bus.Peek(++address);
return Chip.MakeWord(low, high);
}
public override void PokeWord(ushort address, ushort value)
{
Bus.Poke(address, LowByte(value));
Bus.Poke(++address, HighByte(value));
this.Bus.Poke(address, Chip.LowByte(value));
this.Bus.Poke(++address, Chip.HighByte(value));
}
protected override ushort FetchWord()
{
var low = FetchByte();
var high = FetchByte();
return MakeWord(low, high);
var low = this.FetchByte();
var high = this.FetchByte();
return Chip.MakeWord(low, high);
}
protected override ushort GetWord()
{
var low = BusRead();
++Bus.Address;
var high = BusRead();
return MakeWord(low, high);
var low = this.BusRead();
++this.Bus.Address;
var high = this.BusRead();
return Chip.MakeWord(low, high);
}
protected override ushort GetWordPaged(byte page, byte offset)
{
var low = BusRead(offset, page);
var high = BusRead((byte)(offset + 1), page);
return MakeWord(low, high);
var low = this.BusRead(offset, page);
var high = this.BusRead((byte)(offset + 1), page);
return Chip.MakeWord(low, high);
}
protected override ushort PopWord()
{
var low = Pop();
var high = Pop();
return MakeWord(low, high);
var low = this.Pop();
var high = this.Pop();
return Chip.MakeWord(low, high);
}
protected override void PushWord(ushort value)
{
Push(HighByte(value));
Push(LowByte(value));
this.Push(Chip.HighByte(value));
this.Push(Chip.LowByte(value));
}
protected override void SetWord(ushort value)
{
BusWrite(LowByte(value));
++Bus.Address;
BusWrite(HighByte(value));
this.BusWrite(Chip.LowByte(value));
++this.Bus.Address;
this.BusWrite(Chip.HighByte(value));
}
protected override void SetWordPaged(byte page, byte offset, ushort value)
{
BusWrite(offset, page, LowByte(value));
BusWrite((byte)(offset + 1), page, HighByte(value));
this.BusWrite(offset, page, Chip.LowByte(value));
this.BusWrite((byte)(offset + 1), page, Chip.HighByte(value));
}
}
}