/// <summary> /// Initializes a new instance of the <see cref="C8Engine"/> class. /// Engine constructor with an injected machine state /// </summary> /// <param name="machineState"> /// An injected machine state /// </param> /// <param name="pluginService"> /// The plugin Service. /// </param> /// <param name="configurationService"> /// The configuration Service. /// </param> /// <param name="romService"> /// The rom Service. /// </param> /// <param name="opcodeMapService"> /// The opcode Map Service. /// </param> public C8Engine( IMachineState machineState, IPluginService pluginService, IConfigurationService configurationService, IRomService romService, IOpcodeMapService opcodeMapService) { // Injects the machine state this.machineState = machineState; // Inject the plugin service this.PluginService = pluginService; // Inject the configuration service this.ConfigurationService = configurationService; // Inject the ROM Service this.RomService = romService; // Inject the opcode map service this.OpcodeMapService = opcodeMapService; // Gets the instruction map this.instructionMap = this.OpcodeMapService.GetInstructionMap(); // Loads the user saved configuration this.LoadSavedEngineSettings(); // Loads the plugins this.LoadPlugins(); }
/// <summary> /// Initializes a new instance of the <see cref="ExecutionEngine"/> class. /// </summary> /// <param name="opcodeMapService"> /// The opcode map service. /// </param> public ExecutionEngine(IOpcodeMapService opcodeMapService) { this.OpcodeMapService = opcodeMapService; this.instructionMap = this.OpcodeMapService.GetInstructionMap(); }