public void Awake() { UNES = GetComponent <UNESBehaviour>(); var data = Resources.Load <TextAsset>(RomFile).bytes; UNES.Boot(data); }
public void Init(UNESBehaviour nes) { UnesBehaviour = nes; RenderTexture = nes.RenderTexture; _drawTexture = new Texture2D(UNESBehaviour.GameWidth, UNESBehaviour.GameHeight); _pixelCache = new Color[UNESBehaviour.GameWidth * UNESBehaviour.GameHeight]; _clearTexture = new Texture2D(1, 1); _clearTexture.SetPixel(0, 0, Color.clear); _clearTexture.Apply(); }
public NesController(UNESBehaviour nse) { _nes = nse; _keyMapping = new Dictionary <KeyCode, int> { { Config.A, 7 }, { Config.B, 6 }, { Config.Select, 5 }, { Config.Start, 4 }, { Config.Up, 3 }, { Config.Down, 2 }, { Config.Left, 1 }, { Config.Right, 0 }, }; }