mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-12-02 05:17:43 +00:00
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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user