/// <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); } }
/// <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); } }
/// <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); } }
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; }
public static void RegWrite(int register, int value) { RegisterFile.Write(register, value); }
public static void Store(int address, int value) { DataMemory.Write(address, value); }