Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public byte[] CoreDump()
 {
     return(northbridge.ReadMemory(0, northbridge.Memory.Length));
     //return memory.Read(0, memory.Length);
 }