mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-09-27 02:16:55 +00:00
Whoops: missed bus read/write clock ticks in the 6502 emulator.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -68,6 +68,8 @@ namespace EightBit
|
||||
|
||||
public ref PinLevel HALT() => ref this.haltLine;
|
||||
|
||||
public IntelOpCodeDecoded GetDecodedOpCode(byte opCode) => this.decodedOpCodes[opCode];
|
||||
|
||||
public override void RaisePOWER()
|
||||
{
|
||||
base.RaisePOWER();
|
||||
@@ -212,7 +214,5 @@ namespace EightBit
|
||||
++this.PC();
|
||||
this.RaiseHALT();
|
||||
}
|
||||
|
||||
protected IntelOpCodeDecoded GetDecodedOpCode(byte opCode) => this.decodedOpCodes[opCode];
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ namespace EightBit
|
||||
|
||||
public override int Size => this.bytes.Length;
|
||||
|
||||
public static int Load(FileStream file, ref byte[] output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1)
|
||||
public static int Load(Stream file, ref byte[] output, int writeOffset = 0, int readOffset = 0, int limit = -1, int maximumSize = -1)
|
||||
{
|
||||
var size = (int)file.Length;
|
||||
|
||||
|
@@ -533,6 +533,18 @@ namespace EightBit
|
||||
this.OpCode = 0x00; // BRK
|
||||
}
|
||||
|
||||
protected override sealed void BusWrite()
|
||||
{
|
||||
this.Tick();
|
||||
base.BusWrite();
|
||||
}
|
||||
|
||||
protected override sealed byte BusRead()
|
||||
{
|
||||
this.Tick();
|
||||
return base.BusRead();
|
||||
}
|
||||
|
||||
private static byte SetFlag(byte f, StatusBits flag) => SetFlag(f, (byte)flag);
|
||||
|
||||
private static byte SetFlag(byte f, StatusBits flag, int condition) => SetFlag(f, (byte)flag, condition);
|
||||
|
Reference in New Issue
Block a user