예제 #1
0
파일: Player.cs 프로젝트: uwx/NFSScript
 /// <summary>
 /// Changes the in-game auto-drive function state.
 /// </summary>
 /// <remarks>
 /// Requires any kind of directional input in-game in order to apply the change.
 /// </remarks>
 public static void ChangeAutoDrive(bool enableAutoDrive)
 {
     if (enableAutoDrive)
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_AUTODRIVE, 1);
     }
     else
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_AUTODRIVE, 0);
     }
 }
예제 #2
0
파일: Player.cs 프로젝트: uwx/NFSScript
 /// <summary>
 /// Changes car collision state.
 /// </summary>
 public static void ChangeCarCollision(bool enableCarCollision)
 {
     if (enableCarCollision)
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_CAR_COLLISION, 0x74);
     }
     else
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_CAR_COLLISION, 0xEB);
     }
 }
예제 #3
0
파일: Player.cs 프로젝트: uwx/NFSScript
 /// <summary>
 /// Changes wall collision state.
 /// </summary>
 public static void ChangeWallCollision(bool enableWallCollision)
 {
     if (enableWallCollision)
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_WALL_COLLISION, 0x84);
     }
     else
     {
         GenericMemory.Write <byte>(PlayerAddrs.NON_STATIC_WALL_COLLISION, 0x38);
     }
 }
예제 #4
0
파일: CPU.cs 프로젝트: Gabrola/MipSim
        public CPU()
        {
            _registerFile = new GenericMemory(16);
            _dataMemory = new GenericMemory(16);
            _pc = new ProgramCounter();
            _instructions = new InstructionMemory();
            _stack = new ProcedureStack();

            IsReady = false;

            ClockCycle = 0;
            _instructionExecution = 0;
            _isStalled = false;

            _instructionQueue = new Queue<Instruction>();
            _awaitingRegisters = new HashSet<int>();
            _forwardedRegisters = new Dictionary<int, int>();
            ExecutionRecords = new List<ExecutionRecordList>();
            Predictor = new BTB();

            _registerFile.Write(0, 0);

            Instance = this;
        }
예제 #5
0
 public static void RegWrite(int register, int value)
 {
     RegisterFile.Write(register, value);
 }
예제 #6
0
 public static void Store(int address, int value)
 {
     DataMemory.Write(address, value);
 }