public Chip8CPU(Chip8Memory memory) { Memory = memory; V = new byte[REGISTER_COUNT]; ProgramCounter = START_PROGRAM_COUNTER_LOCATION; Index = 0; Stack = new UInt16[STACK_SIZE]; StackPointer = 0; DelayTimer = new Timer(); SoundTimer = new Timer(); }
public Chip8Emulator(IKeyboardInput keyboardInput, ISound audioPlayer) { DisplayModel = new DisplayModel(); Memory = new Chip8Memory(); CPU = new Chip8CPU(Memory); random = new Random(); KeyboardInput = keyboardInput; SoundPlayer = audioPlayer; }