public Chip8(byte[] buffer, IVideoOutput vOutput, IKeypadInput input) { this.videoOutput = vOutput; this.input = input; fontArray.CopyTo(this.memory, FontsStartAddress); buffer.CopyTo(this.memory, ExecutionStartAddress); Instructions[0x0] = Op_00; Instructions[0x1] = Op_1NNN; Instructions[0x2] = Op_2NNN; Instructions[0x3] = Op_3xkk; Instructions[0x4] = Op_4xkk; Instructions[0x5] = Op_5xy0; Instructions[0x6] = Op_6xkk; Instructions[0x7] = Op_7xkk; Instructions[0x8] = Op_8888; Instructions[0x9] = Op_9xy0; Instructions[0xA] = Op_ANNN; Instructions[0xB] = Op_BNNN; Instructions[0xC] = Op_CXKK; Instructions[0xD] = Op_DXYN; Instructions[0xE] = Op_EEEE; Instructions[0xF] = Op_FFFF; Instructions_8XXX[0x0] = Op_8xy0; Instructions_8XXX[0x1] = Op_8xy1; Instructions_8XXX[0x2] = Op_8xy2; Instructions_8XXX[0x3] = Op_8xy3; Instructions_8XXX[0x4] = Op_8xy4; Instructions_8XXX[0x5] = Op_8xy5; Instructions_8XXX[0x6] = Op_8xy6; Instructions_8XXX[0x7] = Op_8xy7; Instructions_8XXX[0xE] = Op_8xyE; }
public Emulator(IVideoOutput video, IAudioOutput audio = null, ISaveMemory saveMemory = null) : base(video, audio, saveMemory) { for (int i = 0; i < pixels.Length; i++) { pixels [i] = 0xFF000000; } Video.SetSize(WIDTH, HEIGHT); }
public Emulator(IVideoOutput video = null, IAudioOutput audio = null, ISaveMemory saveMemory = null) : base(video, audio, saveMemory) { for (int i = 0; i < WIDTH * HEIGHT; i++) { SetPixel(i, 0xFF000000); } Video?.SetSize(WIDTH, HEIGHT); }
// -------------------------------- EMU public Emulator(IVideoOutput video, IAudioOutput audio = null, ISaveMemory saveMemory = null) : base(video, audio, saveMemory) { pressButton.Instance.onClick += onClick; for (int i = 0; i < pixels.Length; i++) { pixels [i] = 0xFF000000; } Video.SetSize(WIDTH, HEIGHT); }
public Animation(AnimationProperties properties, SKColor backgroundColor, IVideoOutput output) { _properties = properties; _backgroundColor = backgroundColor; _output = output; _frame = new Frame(properties.Width, properties.Height); _frameCount = properties.FrameCount; _imageInfo = new SKImageInfo(properties.Width, properties.Height, SKColorType.Bgra8888); }
public Z48Spectrum() { _memory = new Z48Memory(); var registerFile = new RegisterFile(); var lookupTables = new LookupTables(); var cpuStack = new CpuStack(_memory, registerFile); _keyboard = new Keyboard(); _video = new Video(_memory); var outputDevice = (IOutputDevice)_video; var inputDevice = (IInputDevice) _keyboard; _inputOutputDevice = new Z48IO(inputDevice, outputDevice) { Keyboard = inputDevice, Video = outputDevice }; var alu = new Alu(_memory, registerFile, cpuStack, lookupTables); var executionUnit = new ExecutionUnit(_memory, registerFile, cpuStack, alu, _inputOutputDevice, lookupTables); _zilogZ80Cpu = new ZilogZ80Cpu(_memory, _inputOutputDevice, new CpuStack(_memory, registerFile), lookupTables, executionUnit, registerFile); }
public EmulatorBase(IVideoOutput video, IAudioOutput audio = null, ISaveMemory saveMemory = null) { Video = video; Audio = audio; SaveMemory = saveMemory; }