コード例 #1
0
 //////////////////////////////////////////////////////////////////////
 //
 //////////////////////////////////////////////////////////////////////
 public void ReadAt(ushort address, ushort lenght, ref char[] data)
 {
     DebugFunctions.ASSERT((address + lenght < (int)eMemoryMap.eMemoryMap_MemorySize), "ReadAt outside of memory !");
     DebugFunctions.ASSERT((data.Length == lenght), "ReadAt wrong ref array size");
     for (ushort i = 0; i < lenght; i++)
     {
         data[i] = (char)m_MemoryMap[address + i];
     }
 }
コード例 #2
0
 //////////////////////////////////////////////////////////////////////
 //
 //////////////////////////////////////////////////////////////////////
 public byte[] ReadAt(ushort address, ushort lenght)
 {
     DebugFunctions.ASSERT((address + lenght < (int)eMemoryMap.eMemoryMap_MemorySize), "ReadAt outside of memory !");
     byte[] bOut = new byte[lenght];
     for (ushort i = 0; i < lenght; i++)
     {
         bOut[i] = m_MemoryMap[address + i];
     }
     return(bOut);
 }
コード例 #3
0
 private void RegisterInstruction(Z80Instruction inst)
 {
     byte[] opcodes = inst.opCodes;
     if (!inst.isBC)
     {
         for (byte i = 0; i < opcodes.Length; i++)
         {
             DebugFunctions.ASSERT(m_instructions[opcodes[i]] == null, "Overwriting instruction " + String.Format("{0:x2}", opcodes[i]) + " by " + inst.ToString());
             m_instructions[opcodes[i]] = inst;
         }
     }
     else
     {
         for (byte i = 0; i < opcodes.Length; i++)
         {
             DebugFunctions.ASSERT(m_BCInstruction[opcodes[i]] == null, "Overwriting instruction !");
             m_BCInstruction[opcodes[i]] = inst;
         }
     }
 }