protected void ReadMemory() { if (Parent == null) { throw new Exception("Not connected to VM. Parent is null."); } if (Northbridge == null) { throw new Exception("Not connected to northbridge."); } uint16_t address = registers.Read <uint16_t>(Register.MAR); uint16_t length = registers.Read <uint16_t>(Register.MLR); try { byte[] value = Northbridge.ReadMemory(address.Value, length.Value); registers.Write(Register.MDR, value); } catch (IndexOutOfRangeException) { SetFlag(CPUFlags.MemoryError); } }
public byte[] CoreDump() { return(northbridge.ReadMemory(0, northbridge.Memory.Length)); //return memory.Read(0, memory.Length); }