public async Task Initialize() { string rawOpcodes; try { rawOpcodes = await http.GetStringAsync( new Uri("https://cdn.jsdelivr.net/gh/karashiiro/FFXIVOpcodes@latest/opcodes.min.json")); } catch (Exception e) { if (e is HttpRequestException || e is WebException) { await Console.Error.WriteLineAsync(e.Message); rawOpcodes = await http.GetStringAsync( new Uri("https://raw.githubusercontent.com/karashiiro/FFXIVOpcodes/master/opcodes.min.json")); } else { throw; } } OpcodeLists = JsonConvert.DeserializeObject <OpcodeList[]>(rawOpcodes); ActiveOpcodeList = OpcodeLists.FirstOrDefault(l => l.Region == Region.ToString()); }
public CPU(MemoryManager newMemory) { this.Memory = newMemory; this.clockSpeed = 14000000; this.clockCyles = 0; this.operations = new Operations(this); operations.SimulatorCommand += Operations_SimulatorCommand; this.opcodes = new OpcodeList(this.operations, this); this.Flags.Emulation = true; }