Пример #1
0
 public virtual void save(bool insideInterrupt, CpuState cpu, IAction afterInterruptAction, IAction afterHandlerAction)
 {
     this.insideInterrupt      = insideInterrupt;
     savedCpu                  = new CpuState(cpu);
     this.afterInterruptAction = afterInterruptAction;
     this.afterHandlerAction   = afterHandlerAction;
 }
Пример #2
0
        public virtual int sceFpu_B9EEFCEA(CpuState cpu, int ctc1Bits)
        {
            int result = getCfc1_31(cpu);

            setCtc1_31(cpu, ctc1Bits);

            return(result);
        }
Пример #3
0
 public virtual void updateRegisters(CpuState cpu)
 {
     for (int i = 0; i < 8; ++i)
     {
         for (int j = 0; j < 4; ++j)
         {
             for (int k = 0; k < 4; ++k)
             {
                 registers[i][k][j].Text          = (new float?(cpu.getVprFloat(i, j, k))).ToString();
                 registers[i][k][j].CaretPosition = 0;
             }
         }
     }
 }
Пример #4
0
        public override void copyArgumentsToCpu(CpuState cpu)
        {
            Memory mem            = Memory.Instance;
            int    internalMemory = sceKernelVTimerInfo.InternalMemory;

            if (internalMemory != 0)
            {
                mem.write64(internalMemory, sceKernelVTimerInfo.schedule);
                mem.write64(internalMemory + 8, sceKernelVTimerInfo.CurrentTime);
                setArgument(1, internalMemory);
                setArgument(2, internalMemory + 8);
            }
            else
            {
                setArgument(1, 0);
                setArgument(2, 0);
            }

            base.copyArgumentsToCpu(cpu);
        }
Пример #5
0
        public virtual bool restore(CpuState cpu)
        {
            cpu.copy(savedCpu);

            return(insideInterrupt);
        }
Пример #6
0
 public virtual int Kprintf(CpuState cpu, PspString formatString)
 {
     return(Modules.SysMemUserForUserModule.hleKernelPrintf(cpu, formatString, kprintf));
 }
Пример #7
0
 public virtual int sceFpu_6CF7A73F(CpuState cpu)
 {
     return(getCfc1_31(cpu));
 }
Пример #8
0
 private void setCtc1_31(CpuState cpu, int ctc1Bits)
 {
     cpu.fcr31.rm = ctc1Bits & 3;
     cpu.fcr31.fs = ((ctc1Bits >> 24) & 1) != 0;
     cpu.fcr31.c  = ((ctc1Bits >> 23) & 1) != 0;
 }
Пример #9
0
        //public static Logger log = Modules.getLogger("sceFpu");

        private int getCfc1_31(CpuState cpu)
        {
            return((cpu.fcr31.fs ? (1 << 24) : 0) | (cpu.fcr31.c ? (1 << 23) : 0) | (cpu.fcr31.rm & 3));
        }