public PictureProcessingUnit(MemoryModule memory) { Texture = new Texture2D(64, 128, TextureFormat.R8, false, true); Texture.filterMode = FilterMode.Point; this.memory = memory; Flip(); }
protected PicoEmulator() { InitializeLuaEngine(); memory = new MemoryModule(); memory.InitializeStates(); ppu = new PictureProcessingUnit(memory); apu = new AudioProcessingUnit(memory, 48000); buttons = new bool[(int)Buttons.UNDEFINED]; lastButtons = new bool[(int)Buttons.UNDEFINED]; // Random seed random = new System.Random(); // Register APIs RegisterAPIs(); }
public AudioProcessingUnit(MemoryModule memory, double sampleRate = 48000) { this.memory = memory; channelSfxPointers = new int[4] { -1, -1, -1, -1 }; channelSfxTime = new double[4] { 0, 0, 0, 0 }; channelSfxOffset = new int[4] { 0, 0, 0, 0 }; channelSfxNote = new AudioNote[4]; channelSfxNoteLength = new double[4] { 0, 0, 0, 0 }; this.sampleDelta = 1 / sampleRate; }