Esempio n. 1
0
        protected internal override void memcpy(int destination, int source, int Length, bool checkOverlap)
        {
            if (Length <= 0)
            {
                return;
            }

            destination &= addressMask;
            source      &= addressMask;
            Modules.sceDisplayModule.write(destination);

            if (!checkOverlap || source >= destination || !areOverlapping(destination, source, Length))
            {
                NativeMemoryUtils.memcpy(memory, destination, memory, source, Length);
            }
            else
            {
                // Source and destination are overlapping and source < destination,
                // copy from the tail.
                for (int i = Length - 1; i >= 0; i--)
                {
                    int b = NativeMemoryUtils.read8(memory, source + i);
                    NativeMemoryUtils.write8(memory, destination + i, b);
                }
            }
        }
Esempio n. 2
0
 public override int read8(int address)
 {
     address &= addressMask;
     return(NativeMemoryUtils.read8(memory, address));
 }
Esempio n. 3
0
 public override int read8(int address)
 {
     address &= addressMask;
     return(NativeMemoryUtils.read8(memory[address >> pageShift], address & pageMask));
 }