mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-02-10 04:30:38 +00:00
43 lines
1008 B
C#
43 lines
1008 B
C#
|
namespace EightBit
|
|||
|
{
|
|||
|
public sealed class Board : EightBit.Bus
|
|||
|
{
|
|||
|
private readonly Ram ram = new Ram(0x10000); // 0000 - FFFF, 64K RAM
|
|||
|
private readonly MemoryMapping mapping;
|
|||
|
|
|||
|
public Board()
|
|||
|
{
|
|||
|
this.CPU = new MC6809(this);
|
|||
|
this.mapping = new MemoryMapping(this.ram, 0x0000, 0xffff, EightBit.AccessLevel.ReadWrite);
|
|||
|
}
|
|||
|
|
|||
|
public MC6809 CPU { get; }
|
|||
|
|
|||
|
public override void Initialize()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public override MemoryMapping Mapping(ushort absolute) => this.mapping;
|
|||
|
|
|||
|
public override void RaisePOWER()
|
|||
|
{
|
|||
|
base.RaisePOWER();
|
|||
|
|
|||
|
this.CPU.RaisePOWER();
|
|||
|
|
|||
|
this.CPU.LowerRESET();
|
|||
|
this.CPU.RaiseINT();
|
|||
|
|
|||
|
this.CPU.RaiseNMI();
|
|||
|
this.CPU.RaiseFIRQ();
|
|||
|
this.CPU.RaiseHALT();
|
|||
|
}
|
|||
|
|
|||
|
public override void LowerPOWER()
|
|||
|
{
|
|||
|
this.CPU.LowerPOWER();
|
|||
|
base.LowerPOWER();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|