public TestEmulatorForm(Emulator emulator)
        {
            _emulator = emulator;

            // Initialize the component on the UI form
            InitializeComponent();
        }
        /// <summary>
        /// The default constructor.
        /// </summary>
        /// <param name="emulator"></param>
        public SampleEmulatorForm(Emulator emulator)
        {
            _emulator = emulator;

            // Initialize the component on the UI form.
            InitializeComponent();
        }
示例#3
0
        void getNewGames(Emulator emu, List<Game> newGames, HashSet<string> filesToIgnore)
        {
            string romDir = emu.PathToRoms;
            if (string.IsNullOrEmpty(romDir) || !System.IO.Directory.Exists(romDir))
            {
                Logger.LogWarn("Could not locate {0} rom directory '{1}'", emu.Title, romDir);
                return;
            }

            string[] filters = emu.Filter.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            foreach (string filter in filters)
            {
                string[] gamePaths = getFiles(romDir, filter);
                if (gamePaths == null)
                    continue;

                foreach (string path in gamePaths)
                {
                    if (!filesToIgnore.Contains(path))
                    {
                        filesToIgnore.Add(path);
                        newGames.Add(new Game(emu, path));
                    }
                }
            }
        }
 public static void GetPlatformInfo(string platformStr, Emulator emulator)
 {
     IDictionary<string, object> contextVariables = new Dictionary<string, object>();
     contextVariables[KEY_PLATFORM_STRING] = platformStr;
     contextVariables[KEY_EMULATOR] = emulator;
     IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>();
     workflowManager.NavigatePushAsync(Guids.PlatformDetailsState, new NavigationContextConfig() { AdditionalContextVariables = contextVariables });
 }
示例#5
0
 static void Main(string[] args)
 {
     Emulator emul8 = new Emulator();
     MainForm form = new MainForm(emul8);
     form.Show();
     Main game = new Main(form,emul8);
     game.Run();
 }
示例#6
0
 public MainForm(Emulator emul8)
 {
     this.emul8 = emul8;
     regs = new Registers(emul8);
     regs.Hide();
     code = new Code(emul8);
     code.Hide();
     InitializeComponent();
 }
 public Conf_EmuThumbRetriever(Emulator emu, IPlatformImporter platformImporter)
 {
     InitializeComponent();
     this.emu = emu;
     this.platformImporter = platformImporter;
     currentImages = new List<Image>();
     resultsComboBox.DisplayMember = "Name"; 
     resultsComboBox.DropDownClosed += new EventHandler(resultsComboBox_DropDownClosed);            
     clearStatusInfo();
 }
示例#8
0
		public void DefaultEmulatorHasNoImageAndNoScreenOffsetOrSize()
		{
			var defaultEmulator = new Emulator();
			Assert.AreEqual("", defaultEmulator.ImageResourceName);
			Assert.AreEqual(new Point(0, 0), defaultEmulator.ScreenPoint);
			Assert.AreEqual(new Size(0, 0), defaultEmulator.ScreenSize);
			Assert.AreEqual(Orientation.Landscape, defaultEmulator.Orientation);
			Assert.AreEqual("100%", defaultEmulator.Scale);
			Assert.IsTrue(defaultEmulator.IsDefault);
		}
示例#9
0
    public Hardware(Emulator emulator)
    {
      Emulator = emulator;

      ONBOARD_LED = InstallGpioComponent("ONBOARD_LED");
      ONBOARD_SW1 = InstallGpioComponent("ONBOARD_SW1");

      GPIO_PIN_ANALOG = new GpioPort[PortCountAnalog];
      for (int i = 0; i < GPIO_PIN_ANALOG.Length; i++)
        GPIO_PIN_ANALOG[i] = InstallGpioComponent("GPIO_PIN_A" + i);
      GPIO_PIN_DIGITAL = new GpioPort[PortCountDigital];
      for (int i = 0; i < GPIO_PIN_DIGITAL.Length; i++)
        GPIO_PIN_DIGITAL[i] = InstallGpioComponent("GPIO_PIN_D" + i);
    }
示例#10
0
        public Form1(Emulator emulator)
        {
            if (emulator == null)
                throw new ArgumentNullException("emulator");

            InitializeComponent();

            this.ActiveControl = this.com1ToAppTextBox;

            this.emulator = emulator;

            Thread comPortWatcherThread = new Thread(new ThreadStart(ComPortWatchThreadMethod));
            comPortWatcherThread.IsBackground = true;
            comPortWatcherThread.Start();
        }
 public Conf_NewProfile(Emulator emu, EmulatorProfile profile)
 {
     InitializeComponent();
     if (profile == null)
     {
         EmulatorProfile = new EmulatorProfile(false);
         if (!emu.IsPc())
             EmulatorProfile.EmulatorPath = emu.DefaultProfile.EmulatorPath;
     }
     else
     {
         EmulatorProfile = profile;
         this.Text = "Rename Profile";
     }
     profileTitleTextBox.SelectedText = EmulatorProfile.Title;
 }
        public override void UpdatePanel()
        {
            if (parent.NewGame.ParentEmulator == null)
                profileComboBox.Items.Clear();
            else if (currentEmu == null || currentEmu.Id != parent.NewGame.ParentEmulator.Id)
            {
                currentEmu = parent.NewGame.ParentEmulator;
                profileComboBox.Items.Clear();
                foreach (EmulatorProfile profile in parent.NewGame.EmulatorProfiles)
                    profileComboBox.Items.Add(profile);
                if (profileComboBox.Items.Count > 0)
                    profileComboBox.SelectedItem = profileComboBox.Items[0];
            }

            if (string.IsNullOrEmpty(txt_Title.Text))
                txt_Title.Text = parent.NewGame.Title;
        }
        /// <summary>
        /// Constructs a TemperatureEmulatorForm using the specified emulator.
        /// </summary>
        /// <param name="emulator"></param>
        public TemperatureEmulatorForm(Emulator emulator)
        {
            // Set the emulator object.
            _emulator = emulator;

            // Find the emulated SPI temperature component.
            _temperatureDevice =
                (SpiTemperatureComponent)_emulator.FindComponentById(
                "SpiTemperatureDevice");

            // Initialize the component on the UI form.
            InitializeComponent();

            // Initialize the radio buttons and temperature.
            radioButtonCelsius.Checked = false;
            radioButtonFahrenheit.Checked = true;
            SetTemperature(72);
        }
示例#14
0
        public Main(MainForm form, Emulator emul8)
        {
            graphics = new GraphicsDeviceManager(this);
            this.IsFixedTimeStep = true;
            Content.RootDirectory = "Content";

            mainForm = form;
            regForm = form.regs;
            code = form.code;
            this.drawSurface = form.getDrawSurface();

            graphics.PreparingDeviceSettings +=
            new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
            System.Windows.Forms.Control.FromHandle((this.Window.Handle)).VisibleChanged +=
            new EventHandler(Game1_VisibleChanged);

            this.emul8 = emul8;
        }
        private bool checkPath(string path, Emulator emu, out string parsedPath)
        {
            if (emuComboBox.SelectedItem == null)
            {
                parsedPath = null;
                return false;
            }

            if (emu.IsPc())
            {
                if (!path.TryGetExecutablePath(out parsedPath))
                    return false;
            }
            else
            {
                parsedPath = path.Trim();
            }
            return System.IO.File.Exists(parsedPath);
        }
示例#16
0
        public Form1(Emulator emulator)
        {
            _emulator = emulator;

            _motorUpButtonPort = _emulator.FindComponentById("MotorUpButton") as GpioPort;
            _motorDownButtonPort = _emulator.FindComponentById("MotorDownButton") as GpioPort;

            _dataPortClock = _emulator.FindComponentById("DataPortClock") as GpioPort;
            _dataPortLatch = _emulator.FindComponentById("DataPortLatch") as GpioPort;
            _dataPortBankZero = _emulator.FindComponentById("DataPortBankZero") as GpioPort;
            _dataPortBankOne = _emulator.FindComponentById("DataPortBankOne") as GpioPort;

            InitializeComponent();

            _dataPortClock.OnGpioActivity +=new GpioActivity(_dataPortClock_OnGpioActivity);
            _dataPortLatch.OnGpioActivity +=new GpioActivity(_dataPortLatch_OnGpioActivity);
            _dataPortBankZero.OnGpioActivity += new GpioActivity(_dataPortBankZero_OnGpioActivity);
            _dataPortBankOne.OnGpioActivity += new GpioActivity(_dataPortBankOne_OnGpioActivity);
        }
示例#17
0
        public static Dictionary<ushort, Opcode> opcodes; // = new Dictionary<ushort, Func<ushort, bool>>();

        #endregion Fields

        #region Constructors

        public Opcodes(Emulator e)
        {
            emu = e;

            opcodes = new Dictionary<ushort, Opcode>()
            {
                {0x00E0, new Opcode(cls,listCls)},
                {0x1000, new Opcode(JP,listJP)},
                {0x00EE, new Opcode(ret,listRet)},
                {0x2000, new Opcode(call,listCall)},
                {0x3000, new Opcode(SEXb,listSEXb)},
                {0x4000, new Opcode(SNEXb,listSNEXb)},
                {0x5000, new Opcode(SEXY,listSEXY)},
                {0x6000, new Opcode(LDXb,listLDXb)},
                {0x7000, new Opcode(ADXb,listADXb)},
                {0x8000, new Opcode(LDXY,listLDXY)},
                {0x8001, new Opcode(ORXY,listORXY)},
                {0x8002, new Opcode(ANDXY,listANDXY)},
                {0x8003, new Opcode(XORXY,listXORXY)},
                {0x8004, new Opcode(ADDXY,listADDXY)},
                {0x8005, new Opcode(SUBXY,listSUBXY)},
                {0x8006, new Opcode(SHRXY,listSHRXY)},
                {0x8007, new Opcode(SUBNXY,listSUBNXY)},
                {0x8008, new Opcode(SHLXY,null)},
                {0x9000, new Opcode(SNEXy,null)},
                {0xA000, new Opcode(LDIa,null)},
                {0xB000, new Opcode(JP0a,null)},
                {0xC000, new Opcode(RNDxb,null)},
                {0xD000, new Opcode(DRWXYN,null)},
                {0xE09E, new Opcode(SKPx,null)},
                {0xE0A1, new Opcode(SKPNx,null)},
                {0xF007, new Opcode(LDxDT,listLDxDT)},
                {0xF00A, new Opcode(LDxk,null)},
                {0xF015, new Opcode(LDDTx,null)},
                {0xF018, new Opcode(LDSTx,null)},
                {0xF01E, new Opcode(ADDIx,null)},
                {0xF029, new Opcode(LDFx,null)},
                {0xF033, new Opcode(decVX,null)},
                {0xF055, new Opcode(LDIx,null)},
                {0xF065, new Opcode(LDxI,null)}
            };
        }
        public EmulatorViewModel(Emulator emulator, EmulatorsMainModel model)
        {
            this.model = model;
            this.emulator = emulator;
            Name = emulator.Title;
            Description = emulator.Description;
            using (ThumbGroup thumbs = new ThumbGroup(emulator))
            {
                FrontCover = thumbs.FrontCoverDefaultPath;
                Fanart = thumbs.FanartDefaultPath;
            }

            Command = new MethodDelegateCommand(() =>
            {
                model.EmulatorSelected(emulator);
            });

            ContextCommand = new MethodDelegateCommand(showContext);

        }
示例#19
0
        public Form1(Emulator emulator)
        {
            if (emulator == null)
                throw new ArgumentNullException("emulator");
            InitializeComponent();

            GpioPort gpioOut0 = (GpioPort)emulator.FindComponentById("GPIOOut0");
            this.gpioOut0CheckBox.Text = "GPIO Output Port at Pin " + (int)gpioOut0.Pin;
            gpioOut0.OnGpioActivity += new GpioActivity(gpioOut0_OnGpioActivity);

            GpioPort gpioOut1 = (GpioPort)emulator.FindComponentById("GPIOOut1");
            this.gpioOut1CheckBox.Text = "GPIO Output Port at Pin " + (int)gpioOut1.Pin;
            gpioOut1.OnGpioActivity += new GpioActivity(gpioOut1_OnGpioActivity);

            this.gpioIn0 = (GpioPort)emulator.FindComponentById("GPIOIn0");
            this.gpioIn0CheckBox.Text = "GPIO Input Port at Pin " + (int)this.gpioIn0.Pin;

            this.gpioIn1 = (GpioPort)emulator.FindComponentById("GPIOIn1");
            this.gpioIn1Button.Text = "GPIO Input Port at Pin " + (int)this.gpioIn1.Pin;
        }
示例#20
0
        public void onFacadeClicked(MediaPortal.GUI.Library.Action.ActionType ButtonPressed)
        {
            ExtendedGUIListItem currentItem = (ExtendedGUIListItem)facade.SelectedListItem;

            //Show games for selected emulator
            if (currentEmulator == null && ButtonPressed != MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU)
            {
                if (ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_ITEM)
                {
                    Executor.launchDocument(currentItem.AssociatedEmulator);
                }
                else
                {
                    currentEmulator = currentItem.AssociatedEmulator;
                    if (currentEmulator.isPc())
                    {
                        fillPCGames();
                    }
                    else
                    {
                        currentFolder = currentEmulator.PathToRoms;
                        fillGames();
                        facade.SelectedListItemIndex = 1;
                        onFacadeAction();
                    }
                }
            }

            //Dive into subdir
            else if (currentItem.AssociatedDirectory != null && ButtonPressed != MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU)
            {
                currentFolder = currentItem.AssociatedDirectory;
                fillGames();
                facade.SelectedListItemIndex = 1;
                onFacadeAction();
            }
            //Execute game
            else if (currentItem.AssociatedGame != null && ButtonPressed != MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU)
            {
                if (ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_NEXT_ITEM)
                {
                    Executor.launchDocument(currentItem.AssociatedGame);
                }
                else
                {
                    if (currentItem.AssociatedGame.ParentEmulator.EnableGoodmerge)
                    {
                        if (ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_MUSIC_PLAY)
                        {
                            currentItem.AssociatedGame.LaunchFile = "";
                            Executor.launchGame(currentItem.AssociatedGame);
                        }
                        else
                        {
                            if (ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_PAUSE)
                            {
                                currentItem.AssociatedGame.LaunchFile = "";
                            }

                            if (currentItem.AssociatedGame.LaunchFile.Trim() != "")
                            {
                                Executor.launchGame(currentItem.AssociatedGame);
                                fillGames();

                                for (int i = 0; i < facade.Count; i++)
                                {
                                    try
                                    {
                                        if (((ExtendedGUIListItem)facade[i]).AssociatedGame.Path == currentItem.AssociatedGame.Path)
                                        {
                                            facade.SelectedListItemIndex = i;
                                            onFacadeAction();
                                        }
                                    }
                                    catch { }
                                }
                            }
                            else
                            {
                                SevenZipCompressor.SetLibraryPath(Options.getStringOption("7zdllpath"));
                                using (SevenZipExtractor tmp = new SevenZipExtractor(currentItem.AssociatedGame.Path))
                                {
                                    string GoodmergeTempPath = "";

                                    if (currentItem.AssociatedGame.ParentEmulator.GoodmergeTempPath.EndsWith("\\"))
                                    {
                                        GoodmergeTempPath = currentItem.AssociatedGame.ParentEmulator.GoodmergeTempPath;
                                    }
                                    else
                                    {
                                        GoodmergeTempPath = currentItem.AssociatedGame.ParentEmulator.GoodmergeTempPath + "\\";
                                    }

                                    if (tmp.ArchiveFileNames.Count == 1)
                                    {
                                        Executor.launchGame(currentItem.AssociatedGame);
                                    }
                                    else
                                    {
                                        setView(0);
                                        facade.Clear();

                                        //prev selected
                                        facade.Add(ThumbsHandler.Instance.createBackDots(currentItem.AssociatedGame.Path));

                                        for (int i = 0; i < tmp.ArchiveFileNames.Count; i++)
                                        {
                                            Game RomListGame = DB.getGame(currentItem.AssociatedGame.Path, currentItem.AssociatedGame.ParentEmulator);
                                            RomListGame.LaunchFile = tmp.ArchiveFileNames[i];
                                            facade.Add(ThumbsHandler.Instance.createGameRomFacadeItem(RomListGame));

                                            Log.Error(new Exception("launch" + RomListGame.LaunchFile));
                                        }

                                        facade.SelectedListItemIndex = 1;
                                        onFacadeAction();
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        Executor.launchGame(currentItem.AssociatedGame);
                    }
                }
            }
            else if ((currentItem.IsBackDots || ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU) && !string.IsNullOrEmpty(currentItem.PrevSelected))
            {
                fillGames();

                for (int i = 0; i < facade.Count; i++)
                {
                    try
                    {
                        if (((ExtendedGUIListItem)facade[i]).AssociatedGame.Path == currentItem.PrevSelected)
                        {
                            facade.SelectedListItemIndex = i;
                            onFacadeAction();
                        }
                    }
                    catch { }
                }
            }
            //Go up one level
            else if ((currentItem.IsBackDots || ButtonPressed == MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU))
            {
                //Go back to all emulators
                if (currentEmulator.isManyEmulators() || currentEmulator.isPc() || currentFolder.Equals(currentEmulator.PathToRoms))
                {
                    currentEmulator     = null;
                    currentFolder       = null;
                    currentSqlTail      = null;
                    currentGameProperty = gameProperty.none;
                    fillEmulators();
                    facade.SelectedListItemIndex = 0;
                    onFacadeAction();
                }
                //Go back to parent directory
                else
                {
                    currentFolder = currentFolder.Remove(currentFolder.LastIndexOf("\\"));
                    fillGames();
                    facade.SelectedListItemIndex = 1;
                }
            }
        }
 public DevicePowerOnCommandHandler(EmulationAppSettings emulationAppSettings, Emulator emulator)
 {
     _emulationAppSettings = emulationAppSettings ?? throw new ArgumentNullException(nameof(emulationAppSettings));
     _emulator             = emulator ?? throw new ArgumentNullException(nameof(emulator));
 }
 public void SetEmulator( Emulator emulator )
 {
     _emulator = emulator;
 }
示例#23
0
 private void LogScopeNotAvailable(string scope)
 {
     Log($"{scope} is not an available scope for {Emulator.Attributes().CoreName}");
 }
示例#24
0
 public Code(Emulator emul8)
 {
     InitializeComponent();
     this.emul8 = emul8;
 }
示例#25
0
 public frmMain(Emulator emulator)
 {
     this.emulator = emulator;
     InitializeComponent();
 }
示例#26
0
        private bool Engage()
        {
            _engaged = false;
            MainForm.PauseOnFrame = null;
            MainForm.PauseEmulator();

            // Nag if inaccurate core, but not if auto-loading or movie is already loaded
            if (!CanAutoload && MovieSession.Movie.NotActive())
            {
                // Nag but allow the user to continue anyway, so ignore the return value
                MainForm.EnsureCoreIsAccurate();
            }

            // Start Scenario 1: A regular movie is active
            if (MovieSession.Movie.IsActive() && !(MovieSession.Movie is ITasMovie))
            {
                var changesString = "Would you like to save the current movie before closing it?";
                if (MovieSession.Movie.Changes)
                {
                    changesString = "The current movie has unsaved changes. Would you like to save before closing it?";
                }
                var result = MessageBox.Show(
                    "TAStudio will create a new project file from the current movie.\n\n" + changesString,
                    "Convert movie",
                    MessageBoxButtons.YesNoCancel,
                    MessageBoxIcon.Question);
                if (result.Equals(DialogResult.Yes))
                {
                    MovieSession.Movie.Save();
                }
                else if (result.Equals(DialogResult.Cancel))
                {
                    return(false);
                }

                ConvertCurrentMovieToTasproj();
                StartNewMovieWrapper(CurrentTasMovie);
                SetUpColumns();
            }

            // Start Scenario 2: A tasproj is already active
            else if (MovieSession.Movie.IsActive() && MovieSession.Movie is ITasMovie)
            {
                bool result = LoadFile(new FileInfo(CurrentTasMovie.Filename), gotoFrame: Emulator.Frame);
                if (!result)
                {
                    TasView.AllColumns.Clear();
                    StartNewTasMovie();
                }
            }

            // Start Scenario 3: No movie, but user wants to autoload their last project
            else if (CanAutoload)
            {
                bool result = LoadFile(new FileInfo(Settings.RecentTas.MostRecent));
                if (!result)
                {
                    TasView.AllColumns.Clear();
                    StartNewTasMovie();
                }
            }

            // Start Scenario 4: No movie, default behavior of engaging tastudio with a new default project
            else
            {
                StartNewTasMovie();
            }

            // Attempts to load failed, abort
            if (Emulator.IsNull())
            {
                Disengage();
                return(false);
            }

            MainForm.AddOnScreenMessage("TAStudio engaged");
            SetTasMovieCallbacks(CurrentTasMovie);
            UpdateWindowTitle();
            MainForm.RelinquishControl(this);
            _originalEndAction = Config.Movies.MovieEndAction;
            MainForm.DisableRewind();
            Config.Movies.MovieEndAction = MovieEndAction.Record;
            MainForm.SetMainformMovieInfo();
            MovieSession.ReadOnly = true;
            SetSplicer();
            SetupBoolPatterns();

            _engaged = true;
            return(true);
        }
示例#27
0
        private bool CheckHotkey(string trigger)
        {
            switch (trigger)
            {
            default:
                return(false);

            // General
            case "Pause":
                TogglePause();
                break;

            case "Toggle Throttle":
                _unthrottled ^= true;
                ThrottleMessage();
                break;

            case "Soft Reset":
                SoftReset();
                break;

            case "Hard Reset":
                HardReset();
                break;

            case "Quick Load":
                LoadQuickSave($"QuickSave{Global.Config.SaveSlot}");
                break;

            case "Quick Save":
                SaveQuickSave($"QuickSave{Global.Config.SaveSlot}");
                break;

            case "Clear Autohold":
                ClearAutohold();
                break;

            case "Screenshot":
                TakeScreenshot();
                break;

            case "Screen Raw to Clipboard":
                // Ctrl+C clash. any tool that has such acc must check this.
                // maybe check if mainform has focus instead?
                if (GlobalWin.Tools.IsLoaded <TAStudio>() && GlobalWin.Tools.Get <TAStudio>().ContainsFocus)
                {
                    break;
                }

                TakeScreenshotToClipboard();
                break;

            case "Screen Client to Clipboard":
                TakeScreenshotClientToClipboard();
                break;

            case "Full Screen":
                ToggleFullscreen();
                break;

            case "Open ROM":
                OpenRom();
                break;

            case "Close ROM":
                CloseRom();
                break;

            case "Load Last ROM":
                LoadRomFromRecent(Global.Config.RecentRoms.MostRecent);
                break;

            case "Flush SaveRAM":
                FlushSaveRAM();
                break;

            case "Display FPS":
                ToggleFps();
                break;

            case "Frame Counter":
                ToggleFrameCounter();
                break;

            case "Lag Counter":
                if (Emulator.CanPollInput())
                {
                    ToggleLagCounter();
                }

                break;

            case "Input Display":
                ToggleInputDisplay();
                break;

            case "Toggle BG Input":
                ToggleBackgroundInput();
                break;

            case "Toggle Menu":
                MainMenuStrip.Visible ^= true;
                break;

            case "Volume Up":
                VolumeUp();
                break;

            case "Volume Down":
                VolumeDown();
                break;

            case "Toggle Sound":
                ToggleSound();
                break;

            case "Exit Program":
                _exitRequestPending = true;
                break;

            case "Record A/V":
                RecordAv();
                break;

            case "Stop A/V":
                StopAv();
                break;

            case "Larger Window":
                IncreaseWindowSize();
                break;

            case "Smaller Window":
                DecreaseWindowSize();
                break;

            case "Increase Speed":
                IncreaseSpeed();
                break;

            case "Decrease Speed":
                DecreaseSpeed();
                break;

            case "Reboot Core":
                RebootCore();
                break;

            case "Toggle Skip Lag Frame":
                Global.Config.SkipLagFrame ^= true;
                GlobalWin.OSD.AddMessage($"Skip Lag Frames toggled {(Global.Config.SkipLagFrame ? "On" : "Off")}");
                break;

            case "Toggle Key Priority":
                ToggleKeyPriority();
                break;

            // Save States
            case "Save State 0":
                SaveQuickSave("QuickSave0");
                Global.Config.SaveSlot = 0;
                UpdateStatusSlots();
                break;

            case "Save State 1":
                SaveQuickSave("QuickSave1");
                Global.Config.SaveSlot = 1;
                UpdateStatusSlots();
                break;

            case "Save State 2":
                SaveQuickSave("QuickSave2");
                Global.Config.SaveSlot = 2;
                UpdateStatusSlots();
                break;

            case "Save State 3":
                SaveQuickSave("QuickSave3");
                Global.Config.SaveSlot = 3;
                UpdateStatusSlots();
                break;

            case "Save State 4":
                SaveQuickSave("QuickSave4");
                Global.Config.SaveSlot = 4;
                UpdateStatusSlots();
                break;

            case "Save State 5":
                SaveQuickSave("QuickSave5");
                Global.Config.SaveSlot = 5;
                UpdateStatusSlots();
                break;

            case "Save State 6":
                SaveQuickSave("QuickSave6");
                Global.Config.SaveSlot = 6;
                UpdateStatusSlots();
                break;

            case "Save State 7":
                SaveQuickSave("QuickSave7");
                Global.Config.SaveSlot = 7;
                UpdateStatusSlots();
                break;

            case "Save State 8":
                SaveQuickSave("QuickSave8");
                Global.Config.SaveSlot = 8;
                UpdateStatusSlots();
                break;

            case "Save State 9":
                SaveQuickSave("QuickSave9");
                Global.Config.SaveSlot = 9;
                UpdateStatusSlots();
                break;

            case "Load State 0":
                LoadQuickSave("QuickSave0");
                Global.Config.SaveSlot = 0;
                UpdateStatusSlots();
                break;

            case "Load State 1":
                LoadQuickSave("QuickSave1");
                Global.Config.SaveSlot = 1;
                UpdateStatusSlots();
                break;

            case "Load State 2":
                LoadQuickSave("QuickSave2");
                Global.Config.SaveSlot = 2;
                UpdateStatusSlots();
                break;

            case "Load State 3":
                LoadQuickSave("QuickSave3");
                Global.Config.SaveSlot = 3;
                UpdateStatusSlots();
                break;

            case "Load State 4":
                LoadQuickSave("QuickSave4");
                Global.Config.SaveSlot = 4;
                UpdateStatusSlots();
                break;

            case "Load State 5":
                LoadQuickSave("QuickSave5");
                Global.Config.SaveSlot = 5;
                UpdateStatusSlots();
                break;

            case "Load State 6":
                LoadQuickSave("QuickSave6");
                Global.Config.SaveSlot = 6;
                UpdateStatusSlots();
                break;

            case "Load State 7":
                LoadQuickSave("QuickSave7");
                Global.Config.SaveSlot = 7;
                UpdateStatusSlots();
                break;

            case "Load State 8":
                LoadQuickSave("QuickSave8");
                Global.Config.SaveSlot = 8;
                UpdateStatusSlots();
                break;

            case "Load State 9":
                LoadQuickSave("QuickSave9");
                Global.Config.SaveSlot = 9;
                UpdateStatusSlots();
                break;

            case "Select State 0":
                SelectSlot(0);
                break;

            case "Select State 1":
                SelectSlot(1);
                break;

            case "Select State 2":
                SelectSlot(2);
                break;

            case "Select State 3":
                SelectSlot(3);
                break;

            case "Select State 4":
                SelectSlot(4);
                break;

            case "Select State 5":
                SelectSlot(5);
                break;

            case "Select State 6":
                SelectSlot(6);
                break;

            case "Select State 7":
                SelectSlot(7);
                break;

            case "Select State 8":
                SelectSlot(8);
                break;

            case "Select State 9":
                SelectSlot(9);
                break;

            case "Save Named State":
                SaveStateAs();
                break;

            case "Load Named State":
                LoadStateAs();
                break;

            case "Previous Slot":
                PreviousSlot();
                break;

            case "Next Slot":
                NextSlot();
                break;

            // Movie
            case "Toggle read-only":
                ToggleReadOnly();
                break;

            case "Play Movie":
                PlayMovieMenuItem_Click(null, null);
                break;

            case "Record Movie":
                RecordMovieMenuItem_Click(null, null);
                break;

            case "Stop Movie":
                StopMovie();
                break;

            case "Play from beginning":
                RestartMovie();
                break;

            case "Save Movie":
                SaveMovie();
                break;

            case "Toggle MultiTrack":
                Global.MovieSession.ToggleMultitrack();
                break;

            case "MT Select All":
                Global.MovieSession.MultiTrack.SelectAll();
                break;

            case "MT Select None":
                Global.MovieSession.MultiTrack.SelectNone();
                break;

            case "MT Increment Player":
                Global.MovieSession.MultiTrack.Increment();
                break;

            case "MT Decrement Player":
                Global.MovieSession.MultiTrack.Decrement();
                break;

            case "Movie Poke":
                ToggleModePokeMode();
                break;

            // Tools
            case "RAM Watch":
                GlobalWin.Tools.LoadRamWatch(true);
                break;

            case "RAM Search":
                GlobalWin.Tools.Load <RamSearch>();
                break;

            case "Hex Editor":
                GlobalWin.Tools.Load <HexEditor>();
                break;

            case "Trace Logger":
                GlobalWin.Tools.Load <TraceLogger>();
                break;

            case "Lua Console":
                OpenLuaConsole();
                break;

            case "Cheats":
                GlobalWin.Tools.Load <Cheats>();
                break;

            case "Toggle All Cheats":
                if (Global.CheatList.Any())
                {
                    string type = " (mixed)";
                    if (Global.CheatList.All(c => c.Enabled))
                    {
                        type = " (off)";
                    }
                    else if (Global.CheatList.All(c => !c.Enabled))
                    {
                        type = " (on)";
                    }

                    Global.CheatList.ToList().ForEach(x => x.Toggle());
                    GlobalWin.OSD.AddMessage($"Cheats toggled{type}");
                }

                break;

            case "TAStudio":
                GlobalWin.Tools.Load <TAStudio>();
                break;

            case "ToolBox":
                GlobalWin.Tools.Load <ToolBox>();
                break;

            case "Virtual Pad":
                GlobalWin.Tools.Load <VirtualpadTool>();
                break;

            // RAM Search
            case "Do Search":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.DoSearch();
                }
                else
                {
                    return(false);
                }

                break;

            case "New Search":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.NewSearch();
                }
                else
                {
                    return(false);
                }

                break;

            case "Previous Compare To":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.NextCompareTo(reverse: true);
                }
                else
                {
                    return(false);
                }

                break;

            case "Next Compare To":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.NextCompareTo();
                }
                else
                {
                    return(false);
                }

                break;

            case "Previous Operator":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.NextOperator(reverse: true);
                }
                else
                {
                    return(false);
                }

                break;

            case "Next Operator":
                if (GlobalWin.Tools.IsLoaded <RamSearch>())
                {
                    GlobalWin.Tools.RamSearch.NextOperator();
                }
                else
                {
                    return(false);
                }

                break;

            // TAStudio
            case "Add Branch":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AddBranchExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Delete Branch":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.RemoveBranchExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Show Cursor":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.SetVisibleIndex();
                    GlobalWin.Tools.TAStudio.RefreshDialog();
                }
                else
                {
                    return(false);
                }

                break;

            case "Toggle Follow Cursor":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.TasPlaybackBox.FollowCursor ^= true;
                }
                else
                {
                    return(false);
                }

                break;

            case "Toggle Auto-Restore":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.TasPlaybackBox.AutoRestore ^= true;
                }
                else
                {
                    return(false);
                }

                break;

            case "Toggle Turbo Seek":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.TasPlaybackBox.TurboSeek ^= true;
                }
                else
                {
                    return(false);
                }

                break;

            case "Clear Frames":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.ClearFramesExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Insert Frame":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.InsertFrameExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Delete Frames":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.DeleteFramesExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Clone Frames":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.CloneFramesExternal();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Increment":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogIncrementByOne();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Decrement":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogDecrementByOne();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Incr. by 10":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogIncrementByTen();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Decr. by 10":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogDecrementByTen();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Maximum":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogMax();
                }
                else
                {
                    return(false);
                }

                break;

            case "Analog Minimum":
                if (GlobalWin.Tools.IsLoaded <TAStudio>())
                {
                    GlobalWin.Tools.TAStudio.AnalogMin();
                }
                else
                {
                    return(false);
                }

                break;

            // SNES
            case "Toggle BG 1":
                SNES_ToggleBg(1);
                break;

            case "Toggle BG 2":
                SNES_ToggleBg(2);
                break;

            case "Toggle BG 3":
                SNES_ToggleBg(3);
                break;

            case "Toggle BG 4":
                SNES_ToggleBg(4);
                break;

            case "Toggle OBJ 1":
                SNES_ToggleObj(1);
                break;

            case "Toggle OBJ 2":
                SNES_ToggleObj(2);
                break;

            case "Toggle OBJ 3":
                SNES_ToggleObj(3);
                break;

            case "Toggle OBJ 4":
                SNES_ToggleObj(4);
                break;

            // GB
            case "GB Toggle BG":
                if (Emulator is Gameboy)
                {
                    var s = ((Gameboy)Emulator).GetSettings();
                    s.DisplayBG ^= true;
                    ((Gameboy)Emulator).PutSettings(s);
                    GlobalWin.OSD.AddMessage($"BG toggled {(s.DisplayBG ? "on" : "off")}");
                }

                break;

            case "GB Toggle Obj":
                if (Emulator is Gameboy)
                {
                    var s = ((Gameboy)Emulator).GetSettings();
                    s.DisplayOBJ ^= true;
                    ((Gameboy)Emulator).PutSettings(s);
                    GlobalWin.OSD.AddMessage($"OBJ toggled {(s.DisplayBG ? "on" : "off")}");
                }

                break;

            // Analog
            case "Y Up Small":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, Global.Config.Analog_SmallChange);
                break;

            case "Y Up Large":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, Global.Config.Analog_LargeChange);
                break;

            case "Y Down Small":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, -Global.Config.Analog_SmallChange);
                break;

            case "Y Down Large":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(null, -Global.Config.Analog_LargeChange);
                break;

            case "X Up Small":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(Global.Config.Analog_SmallChange, null);
                break;

            case "X Up Large":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(Global.Config.Analog_LargeChange, null);
                break;

            case "X Down Small":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(-Global.Config.Analog_SmallChange, null);
                break;

            case "X Down Large":
                GlobalWin.Tools.VirtualPad.BumpAnalogValue(-Global.Config.Analog_LargeChange, null);
                break;
            }

            return(true);
        }
示例#28
0
文件: GxROM.cs 项目: ls9512/UNES
 public GxROM(Emulator emulator) : base(emulator)
 {
 }
示例#29
0
 public MemoryDomain VerifyMemoryDomain(string domain) => DomainList[FixDomainNameCase(domain)] ?? throw new ApiError($"{Emulator.Attributes().CoreName} does not have memory domain \"{domain}\"");
示例#30
0
        public void TestLineRemoveDuration()
        {
            var romLoader = new RomLoader();
            var rom       = romLoader.Load("Roms/tetris.gb");

            var emulator = new Emulator();

            emulator.Load(rom);

            emulator.Execute(125);
            emulator.Hit(Button.Start);
            emulator.Hit(Button.Start);
            emulator.Hit(Button.Start);

            // I
            emulator.Hit(Button.Right);
            emulator.Hit(Button.Right);
            emulator.Hit(Button.Right);
            emulator.Press(Button.Down);
            emulator.Execute(3 * 17);
            emulator.Release(Button.Down);
            emulator.Execute(2);


            // S
            emulator.Hit(Button.Right);
            emulator.Press(Button.Down);
            emulator.Execute(3 * 17);
            emulator.Release(Button.Down);
            emulator.Execute(2);

            // O
            emulator.Hit(Button.Left);
            emulator.Hit(Button.Left);
            emulator.Hit(Button.Left);
            emulator.Hit(Button.Left);
            emulator.Press(Button.Down);
            emulator.Execute(3 * 17);
            emulator.Release(Button.Down);
            emulator.Execute(2);

            // T
            emulator.Hit(Button.Right);
            emulator.Hit(Button.Right);
            emulator.Hit(Button.Right);
            emulator.Press(Button.Down);
            emulator.Execute(3 * 17);
            emulator.Release(Button.Down);
            emulator.Execute(2);

            // J
            emulator.Hit(Button.A);
            emulator.Hit(Button.Left);
            emulator.Press(Button.Down);
            emulator.Execute(3 * 15);
            emulator.Release(Button.Down);

            emulator.Show();
            emulator.Execute(93);
            emulator.Show();
        }
示例#31
0
        static void Main(string[] args)
        {
            Console.WriteLine(">> Loading configuration options...");
            if (!Config.Load(args))
            {
                return;
            }

            if (Config.NoCmsg && Config.NoSmsg)
            {
                Logger.WriteConsoleLine("Please give me something to do.");
                Config.ShowHelp();
                return;
            }

            Logger.CreateOutputStream(Config.OutputFile);

            Console.WriteLine(">> Opening Wow client...");
            ClientStream = new BinaryReader(File.OpenRead(Config.Executable));
            if (!BaseStream.CanRead)
            {
                return;
            }

            ClientBytes = File.ReadAllBytes(Config.Executable);
            Disasm      = new UnmanagedBuffer(ClientBytes);
            Env         = Emulator.Create(BaseStream);

            if (!Config.NoSmsg)
            {
                Console.WriteLine(">> Discovering JAM groups...");
                foreach (var pattern in ClientGroupPatterns) // Load jam groups...
                {
                    var offsets = ClientBytes.FindPattern(pattern, 0xFF);
                    if (offsets.Count == 0)
                    {
                        Console.WriteLine(@"Could not find group name "" {0}""", System.Text.Encoding.ASCII.GetString(pattern.Skip(1).ToArray()));
                        return;
                    }
                    else
                    {
                        Console.WriteLine(@"Found JAM Group "" {0}""", System.Text.Encoding.ASCII.GetString(pattern.Skip(1).ToArray()));
                        Dispatchers.Add(new JamDispatch((int)(offsets[0] + 1)));
                    }
                }
            }

            if (!Config.NoGhNames && !Opcodes.TryPopulate())
            {
                return;
            }

            if (!Config.NoSmsg)
            {
                SMSG.Dump();
            }

            if (!Config.NoCmsg)
            {
                CMSG.Dump(Config.SpecificOpcodeValue);
            }
        }
示例#32
0
 private void LogNotImplemented()
 {
     Log($"Error: {Emulator.Attributes().CoreName} does not yet implement input polling callbacks");
 }
示例#33
0
 // Mapper for games requiring MMC1A
 public Mapper155(Emulator emulator) : base(emulator, ChipType.MMC1A)
 {
 }
        public static void Run(Options options, Action <ObjectCreator.Context> beforeRun = null)
        {
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => CrashHandler.HandleCrash((Exception)e.ExceptionObject);

            if (options.Version)
            {
                Console.Out.WriteLine(EmulationManager.Instance.VersionString);
                return;
            }

            if (options.KeepTemporaryFiles)
            {
                EmulationManager.DisableEmulationFilesCleanup = true;
            }

            if (!options.HideLog)
            {
                Logger.AddBackend(ConsoleBackend.Instance, "console");
                if (options.Plain)
                {
                    //This is set in Program.cs already, but we leave it here in case CommandLineInterface is reused,
                    //to prevent hard to trace bugs
                    ConsoleBackend.Instance.PlainMode = true;
                }
            }
            else
            {
                Logger.AddBackend(new DummyLoggerBackend(), "dummy");
            }

            Logger.AddBackend(new MemoryBackend(), "memory");
            Emulator.ShowAnalyzers = !options.HideAnalyzers;
            XwtProvider xwt = null;

            if (options.PidFile != null)
            {
                var pid = Process.GetCurrentProcess().Id;
                File.WriteAllText(options.PidFile, pid.ToString());
            }

            if (!options.DisableXwt || options.RobotDebug)
            {
                xwt = XwtProvider.Create(new WindowedUserInterfaceProvider());
            }

            if (xwt == null && options.RobotFrameworkRemoteServerPort == -1 && !options.Console)
            {
                if (options.Port == -1)
                {
                    options.Port = 1234;
                }

                if (!options.DisableXwt)
                {
                    Logger.Log(LogLevel.Warning, "Couldn't start UI - falling back to telnet mode");
                }
            }

            using (var context = ObjectCreator.Instance.OpenContext())
            {
                var monitor = new Antmicro.Renode.UserInterface.Monitor();
                context.RegisterSurrogate(typeof(Antmicro.Renode.UserInterface.Monitor), monitor);

                // we must initialize plugins AFTER registering monitor surrogate
                // as some plugins might need it for construction
                TypeManager.Instance.PluginManager.Init("CLI");

                EmulationManager.Instance.ProgressMonitor.Handler = new CLIProgressMonitor();

                var uartAnalyzerType  = (xwt == null || options.RobotDebug) ? typeof(LoggingUartAnalyzer) : typeof(ConsoleWindowBackendAnalyzer);
                var videoAnalyzerType = (xwt == null || options.RobotDebug) ? typeof(DummyVideoAnalyzer) : typeof(VideoAnalyzer);

                EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(UARTBackend), uartAnalyzerType);
                EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(VideoBackend), videoAnalyzerType);
                EmulationManager.Instance.EmulationChanged += () =>
                {
                    EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(UARTBackend), uartAnalyzerType);
                    EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(VideoBackend), videoAnalyzerType);
                };

                var shell = PrepareShell(options, monitor);
                new System.Threading.Thread(x => shell.Start(true))
                {
                    IsBackground = true,
                    Name         = "Shell thread"
                }.Start();

                Emulator.BeforeExit += () =>
                {
                    Emulator.DisposeAll();
                    xwt?.Dispose();
                    xwt = null;
                };

                if (beforeRun != null)
                {
                    beforeRun(context);
                }

                if (options.RobotDebug)
                {
                    ConsoleWindowBackendAnalyzer terminal = null;

                    Emulator.EnableGUI += () =>
                    {
                        Logger.AddBackend(ConsoleBackend.Instance, "console", true);
                        terminal = new ConsoleWindowBackendAnalyzer(true);
                        terminal.Show();
                        shell.Terminal           = new NavigableTerminalEmulator(terminal.IO);
                        shell.Terminal.PlainMode = options.Plain;

                        new System.Threading.Thread(x => shell.Start(true))
                        {
                            IsBackground = true,
                            Name         = "Shell thread"
                        }.Start();
                    };

                    Emulator.DisableGUI += () =>
                    {
                        if (options.HideLog)
                        {
                            Logger.RemoveBackend(ConsoleBackend.Instance);
                        }
                        terminal?.Hide();
                        terminal = null;
                    };
                }

                Emulator.WaitForExit();
            }
        }
示例#35
0
        public void onFacadeAction()
        {
            Game     item = null;
            Emulator emu  = null;

            if (facade.Count > 0)
            {
                item = ((ExtendedGUIListItem)facade.SelectedListItem).AssociatedGame;
                emu  = ((ExtendedGUIListItem)facade.SelectedListItem).AssociatedEmulator;
            }

            if (item != null)
            {
                GUIPropertyManager.SetProperty("#emulator_title", item.ParentEmulator.ToString());
                GUIPropertyManager.SetProperty("#game_grade", item.Grade.ToString());

                GUIPropertyManager.SetProperty("#fanartpath", ThumbsHandler.Instance.createGameArt(item, "Fanart", true));
                GUIPropertyManager.SetProperty("#backcoverpath", ThumbsHandler.Instance.createGameArt(item, "BoxBack", true));
                GUIPropertyManager.SetProperty("#titlescreenpath", ThumbsHandler.Instance.createGameArt(item, "TitleScreenshot", true));
                GUIPropertyManager.SetProperty("#ingamescreenpath", ThumbsHandler.Instance.createGameArt(item, "IngameScreenshot", true));

                displayStars(item.Grade);
                if (item.Description.Length > 0)
                {
                    displayDescriptionBackground(true);
                    displayDescription(item.Description);
                    GUIPropertyManager.SetProperty("#game_description", item.Description);
                }
                else
                {
                    displayDescriptionBackground(false);
                    displayDescription("");
                    GUIPropertyManager.SetProperty("#game_description", "");
                }

                if (item.Yearmade > 0)
                {
                    displayYear(item.Yearmade);
                    GUIPropertyManager.SetProperty("#game_yearmade", "" + item.Yearmade);
                }
                else
                {
                    displayYear(0);
                    GUIPropertyManager.SetProperty("#game_yearmade", "");
                }

                displayGenre(item.Genre);
                GUIPropertyManager.SetProperty("#game_genre", item.Genre);

                displayCompany(item.Company);
                GUIPropertyManager.SetProperty("#game_company", item.Company);

                if (item.Latestplay.Year > 2000)
                {
                    displayLatestPlay(item.Latestplay);
                    GUIPropertyManager.SetProperty("#game_latestplay", (item.Latestplay.CompareTo(DateTime.MinValue) == 0) ? Translator.getString(TranslatorString.never) : item.Latestplay.ToShortDateString());
                }
                else
                {
                    displayLatestPlay(DateTime.MinValue);
                    GUIPropertyManager.SetProperty("#game_latestplay", "");
                }

                if (item.Playcount > 0)
                {
                    displayPlayCount(item.Playcount);
                    GUIPropertyManager.SetProperty("#game_playcount", "" + item.Playcount);
                }
                else
                {
                    displayPlayCount(0);
                    GUIPropertyManager.SetProperty("#game_playcount", "");
                }
            }
            else if (emu != null)
            {
                GUIPropertyManager.SetProperty("#emulator_title", " ");
                GUIPropertyManager.SetProperty("#game_grade", emu.Grade.ToString());
                GUIPropertyManager.SetProperty("#fanartpath", ThumbsHandler.Instance.createEmulatorArt(emu, "fanart"));
                GUIPropertyManager.SetProperty("#backcoverpath", "");
                GUIPropertyManager.SetProperty("#titlescreenpath", "");
                GUIPropertyManager.SetProperty("#ingamescreenpath", "");
                GUIPropertyManager.SetProperty("#game_yearmade", "");

                displayStars(emu.Grade);

                displayDescriptionBackground(true);

                displayDescription(emu.Description);
                if (emu.Yearmade > 0)
                {
                    displayYear(emu.Yearmade);
                    GUIPropertyManager.SetProperty("#game_yearmade", emu.Yearmade.ToString());
                }
                //displayGenre(item.Genre);
                displayCompany(emu.Company);


                //AJP
                GUIPropertyManager.SetProperty("#game_description", emu.Description);

                GUIPropertyManager.SetProperty("#game_genre", "");
                GUIPropertyManager.SetProperty("#game_company", emu.Company);
            }
            else
            {
                GUIPropertyManager.SetProperty("#emulator_title", " ");


                displayStars(0);
                displayDescription("");
                displayDescriptionBackground(false);
                displayYear(0);
                displayGenre("");
                displayCompany("");
                displayLatestPlay(DateTime.MinValue);
                displayPlayCount(0);


                //AJP
                GUIPropertyManager.SetProperty("#game_description", "");
                GUIPropertyManager.SetProperty("#game_yearmade", "");
                GUIPropertyManager.SetProperty("#game_genre", "");
                GUIPropertyManager.SetProperty("#game_company", "");
                GUIPropertyManager.SetProperty("#game_latestplay", "");
                GUIPropertyManager.SetProperty("#game_playcount", "");
                GUIPropertyManager.SetProperty("#game_grade", "0");
            }

            if (facade.Count > 0)
            {
#if MP11
                if (facade.View == GUIFacadeControl.ViewMode.Filmstrip)
#else
                if (facade.CurrentLayout == GUIFacadeControl.Layout.Filmstrip)
#endif
                {
                    ThumbsHandler.Instance.setFilmstripImage(facade);
                }
            }
        }
示例#36
0
        public void fillSomeGames(String sqlTail, gameProperty secondLabel)
        {
            if (currentEmulator == null)
            {
                currentEmulator = new Emulator(EmulatorType.manyemulators);
            }
            currentSqlTail      = sqlTail;
            currentGameProperty = secondLabel;
            setView(0);
            facade.Clear();
            facade.Add(ThumbsHandler.Instance.createBackDots(""));

            List <GUIListItem> firstPart  = new List <GUIListItem>();
            List <GUIListItem> secondPart = new List <GUIListItem>();

            foreach (Game game in DB.getSomeGames(sqlTail))
            {
                ExtendedGUIListItem item = ThumbsHandler.Instance.createGameFacadeItem(game);
                switch (secondLabel)
                {
                case gameProperty.grade: { item.Label2 = "(" + game.Grade + "/10)"; break; }

                case gameProperty.latestplay: { item.Label2 = "(" + game.Latestplay.ToShortDateString() + ")"; break; }

                case gameProperty.playcount: { item.Label2 = "(" + game.Playcount + ")"; break; }

                case gameProperty.year: { item.Label2 = "(" + game.Yearmade + ")"; break; }

                case gameProperty.genre: { item.Label2 = "(" + game.Genre + ")"; break; }

                case gameProperty.company: { item.Label2 = "(" + game.Company + ")"; break; }
                }
                if (item.Label2.Equals("(0)") || item.Label2.Equals("(0/10)") || item.Label2.Equals("(" + DateTime.MinValue.ToShortDateString() + ")") || item.Label2.Equals("()"))
                {
                    item.Label2 = "n/a";
                }
                if (Options.getBoolOption("hidelabeldecorations"))
                {
                    item.Label2 = item.Label2.Replace("(", "").Replace(")", "");
                }
                if (currentEmulator.isManyEmulators() || (!currentEmulator.isManyEmulators() && game.ParentEmulator.UID == currentEmulator.UID))
                {
                    if (!item.Label2.Equals("n/a"))
                    {
                        firstPart.Add(item);
                    }
                    else
                    {
                        secondPart.Add(item);
                    }
                }
            }

            //Put all the ones with empty Label2 in the end
            foreach (GUIListItem item in firstPart)
            {
                facade.Add(item);
            }
            foreach (GUIListItem item in secondPart)
            {
                facade.Add(item);
            }
        }
示例#37
0
        public bool SwitchProcess(Process newProcess, Emulator emulator)
        {
            IEmuRamIO newIo = newProcess != null ? _ioCreationTable[emulator.IOType](newProcess, emulator, Config.RamSize) : null;

            return(SwitchIO(newIo, newProcess));
        }
示例#38
0
 public static byte GetHLMemoryValue(this Emulator emulator)
 {
     return(emulator[emulator.Get16BitValue(Register.H, Register.L)]);
 }
 internal ConfigurationEngine( Emulator emulator )
 {
     _emulator = emulator;
     _typesLookup = new Dictionary<String, String>();
     _defaultAssembly = GetType().Assembly;
 }
 void upgradeProfiles(Emulator parent)
 {
     SQLData profileData = sqlClient.Execute("select * from EmulatorProfiles where emulator_id=" + parent.Id);
     foreach (SQLDataRow sqlRow in profileData.Rows)
         parent.EmulatorProfiles.Add(createProfile(sqlRow));
 }
示例#41
0
        public static void Run(Options options, Action <ObjectCreator.Context> beforeRun = null)
        {
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => CrashHandler.HandleCrash((Exception)e.ExceptionObject);
            Emulator.ShowAnalyzers = !options.HideAnalyzers;
            XwtProvider xwt = null;

            try
            {
                if (!options.DisableXwt)
                {
                    xwt = new XwtProvider(new WindowedUserInterfaceProvider());
                }
                using (var context = ObjectCreator.Instance.OpenContext())
                {
                    var monitor = new Antmicro.Renode.UserInterface.Monitor();
                    context.RegisterSurrogate(typeof(Antmicro.Renode.UserInterface.Monitor), monitor);

                    // we must initialize plugins AFTER registering monitor surrogate
                    // as some plugins might need it for construction
                    TypeManager.Instance.PluginManager.Init("CLI");

                    if (!options.HideLog)
                    {
                        Logger.AddBackend(ConsoleBackend.Instance, "console");
                    }

                    EmulationManager.Instance.ProgressMonitor.Handler = new CLIProgressMonitor();

                    if (options.Port == -1)
                    {
                        EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(UARTBackend), typeof(ConsoleWindowBackendAnalyzer));
                        EmulationManager.Instance.EmulationChanged += () =>
                        {
                            EmulationManager.Instance.CurrentEmulation.BackendManager.SetPreferredAnalyzer(typeof(UARTBackend), typeof(ConsoleWindowBackendAnalyzer));
                        };
                    }

                    var shell = PrepareShell(options, monitor);
                    new System.Threading.Thread(x => shell.Start(true))
                    {
                        IsBackground = true,
                        Name         = "Shell thread"
                    }.Start();

                    Emulator.BeforeExit += () =>
                    {
                        Emulator.DisposeAll();
                    };

                    if (beforeRun != null)
                    {
                        beforeRun(context);
                    }

                    Emulator.WaitForExit();
                }
            }
            finally
            {
                if (xwt != null)
                {
                    xwt.Dispose();
                }
            }
        }
示例#42
0
 private void LogMemoryExecuteCallbacksNotImplemented()
 {
     Log($"{Emulator.Attributes().CoreName} does not implement memory execute callbacks");
 }
示例#43
0
        public Form1(Emulator emulator)
        {
            _emulator = emulator;

            InitializeComponent();
        }
示例#44
0
        private static Shell PrepareShell(Options options, Monitor monitor)
        {
            Shell shell = null;

            if (options.Port >= 0)
            {
                var io = new IOProvider {
                    Backend = new SocketIOSource(options.Port)
                };
                shell = ShellProvider.GenerateShell(io, monitor, true, false);
            }
            else
            {
                ConsoleWindowBackendAnalyzer terminal = null;
                IOProvider io;
                if (options.HideMonitor)
                {
                    io = new IOProvider {
                        Backend = new DummyIOSource()
                    };
                }
                else
                {
                    terminal = new ConsoleWindowBackendAnalyzer();
                    io       = terminal.IO;
                }

                // forcing vcursor is necessary, because calibrating will never end if the window is not shown
                shell            = ShellProvider.GenerateShell(io, monitor, forceVCursor: options.HideMonitor);
                monitor.Quitted += shell.Stop;

                if (terminal != null)
                {
                    try
                    {
                        terminal.Quitted += Emulator.Exit;
                        terminal.Show();
                    }
                    catch (InvalidOperationException ex)
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.Error.WriteLine(ex.Message);
                        Emulator.Exit();
                    }
                }
            }
            shell.Quitted += Emulator.Exit;

            monitor.Interaction     = shell.Writer;
            monitor.MachineChanged += emu => shell.SetPrompt(emu != null ? new Prompt(string.Format("({0}) ", emu), ConsoleColor.DarkYellow) : null);

            if (options.Execute != null)
            {
                shell.Started += s => s.InjectInput(string.Format("{0}\n", options.Execute));
            }
            else if (!string.IsNullOrEmpty(options.ScriptPath))
            {
                shell.Started += s => s.InjectInput(string.Format("i {0}{1}\n", Path.IsPathRooted(options.ScriptPath) ? "@" : "$CWD/", options.ScriptPath));
            }

            return(shell);
        }
示例#45
0
		public void SpecificEmulatorIsNotDefault()
		{
			var emulator = new Emulator("ImageName", new Point(), new Size(), Orientation.Portrait,
				"100%");
			Assert.IsFalse(emulator.IsDefault);
		}
示例#46
0
 /// <summary>
 /// Additional OS-specific error handler.
 /// </summary>
 /// <param name="emulator">The instance of Emulator that encountered the error.</param>
 /// <param name="message">The error message.</param>
 /// <param name="exitCode">The process exit code returned from the emulator.</param>
 /// <param name="exception">The exception that was raised.</param>
 static partial void OSErrorHandler(Emulator emulator, string message, int exitCode, Exception exception);
        void upgradeEmulators(SQLData emulatorData)
        {
            emuLookup[-1] = createPC();

            int currentEmulator = 2;
            int totalEmulators = emulatorData.Rows.Count + 1;
            foreach (SQLDataRow sqlRow in emulatorData.Rows)
            {
                setProgress("{0}/{1} - Parsing Emulators", currentEmulator, totalEmulators);
                currentEmulator++;
                currentItem++;

                Emulator emu = new Emulator();
                emu.Id = int.Parse(sqlRow.fields[0]);
                emu.Title = decode(sqlRow.fields[1]);
                emu.PathToRoms = decode(sqlRow.fields[2]);
                emu.Filter = decode(sqlRow.fields[3]);
                emu.Position = int.Parse(sqlRow.fields[4]);
                emu.View = int.Parse(sqlRow.fields[5]);
                emu.Platform = decode(sqlRow.fields[6]);
                emu.Developer = decode(sqlRow.fields[7]);
                emu.Year = int.Parse(sqlRow.fields[8]);
                emu.Description = decode(sqlRow.fields[9]);
                emu.Grade = int.Parse(sqlRow.fields[10]);
                emu.VideoPreview = decode(sqlRow.fields[11]);
                int lAspect = int.Parse(sqlRow.fields[12]);
                if (lAspect != 0)
                    emu.CaseAspect = lAspect / 100.00;

                upgradeProfiles(emu);
                foreach (EmulatorProfile profile in emu.EmulatorProfiles)
                {
                    if (profile.IsDefault)
                    {
                        emu.DefaultProfile = profile;
                        break;
                    }
                }

                emuLookup[(int)emu.Id] = emu;
            }
        }
示例#48
0
 protected abstract void Handle(Instruction i, Emulator emulator);
 internal AsyncContinuation(Emulator emulator, Delegate method, params object[] args)
     : base(emulator)
 {
     _evtCompleted = new ManualResetEvent(false);
     _method = method;
     _args = args;                
 }
        /// <summary>
        /// Gets the multi browser emulator web driver.
        /// </summary>
        /// <param name="testSettings">The test settings.</param>
        /// <param name="emulator">The emulator.</param>
        /// <param name="orientation">The device orientation.</param>
        /// <param name="testOutputHelper">The test output helper.</param>
        /// <returns></returns>
        public static ITestWebDriver InitializeMultiBrowserEmulatorDriver(TestSettings testSettings, Emulator emulator, DeviceOrientation orientation, ITestOutputHelper testOutputHelper)
        {
            ScreenShotCounter = 0;
            TestOutputHelper = testOutputHelper;
            testSettings.BrowserName = emulator + " " + orientation;
            testSettings = ValidateSavePaths(testSettings);
            //string driverLocation = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
            //                        "\\MultiBrowser\\Drivers\\ChromeDrivers\\2.20\\chromedriver.exe";
            string driverLocation = Path.Combine(AssemblyDirectory, "chromedriver.exe");
            driverLocation = ValidateDriverPresentOrUnblocked(WebDriverType.ChromeDriver, driverLocation);

            var driverService = ChromeDriverService.CreateDefaultService(Path.GetDirectoryName(driverLocation),
                Path.GetFileName(driverLocation));
            ValidateDriverPresentOrUnblocked(WebDriverType.ChromeDriver, driverLocation);

            var currentInstallPath = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\MultiBrowser", false) ??
                                     Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432node\MultiBrowser",
                                         false);
            string installPathValue = null;
            if (currentInstallPath != null)
            {
                installPathValue = (string) currentInstallPath.GetValue("Path");
            }
            if (installPathValue != null)
            {
                if (!installPathValue.EndsWith("\\"))
                {
                    installPathValue = installPathValue + "\\";
                }
            }

#if DEBUG
            installPathValue = @"C:\Projects\MobileEmulator\bin\Debug\x64\";
#endif
            var options = new ChromeOptions
            {
                LeaveBrowserRunning = false,
                BinaryLocation =
                    Path.Combine(installPathValue ?? @"C:\Program Files (x86)\MultiBrowser", "MultiBrowser Emulator.exe")
            };

            var emulatorSettings = MultiBrowser.GetMultiBrowserEmulators(emulator);
            if (orientation == DeviceOrientation.Portrait)
            {
                var mobileEmulationSettings = new ChromeMobileEmulationDeviceSettings
                {
                    UserAgent = emulatorSettings.DeviceUserAgent,
                    Width = emulatorSettings.DeviceWidth,
                    Height = emulatorSettings.DeviceHeight,
                    EnableTouchEvents = true,
                    PixelRatio = emulatorSettings.DevicePixelRatio
                };
                options.EnableMobileEmulation(mobileEmulationSettings);
                //options.AddAdditionalCapability("mobileEmulation", new
                //{
                //    deviceMetrics = new
                //    {
                //        width = emulatorSettings.DeviceWidth,
                //        height = emulatorSettings.DeviceHeight,
                //        pixelRatio = emulatorSettings.DevicePixelRatio
                //    },
                //    userAgent = emulatorSettings.DeviceUserAgent
                //});
            }
            else
            {
                var mobileEmulationSettings = new ChromeMobileEmulationDeviceSettings
                {
                    UserAgent = emulatorSettings.DeviceUserAgent,
                    Width = emulatorSettings.DeviceHeight,
                    Height = emulatorSettings.DeviceWidth,
                    EnableTouchEvents = true,
                    PixelRatio = emulatorSettings.DevicePixelRatio
                };
                options.EnableMobileEmulation(mobileEmulationSettings);
                

                //options.AddAdditionalCapability("mobileEmulation", new
                //{
                //    deviceMetrics = new
                //    {
                //        width = emulatorSettings.DeviceHeight,
                //        height = emulatorSettings.DeviceWidth,
                //        pixelRatio = emulatorSettings.DevicePixelRatio
                //    },
                //    userAgent = emulatorSettings.DeviceUserAgent
                //});
            }
#if DEBUG
            options.BinaryLocation = @"C:\Projects\MobileEmulator\bin\Debug\x64\MultiBrowser Emulator.exe";
#endif
            string authServerWhitelist = "auth-server-whitelist=" + testSettings.TestUri.Authority.Replace("www", "*");
            string startUrl = "startUrl=" + testSettings.TestUri.AbsoluteUri;
            string selectedEmulator = "emulator=" + emulatorSettings.EmulatorArgument;

            var argsToPass = new[]
            {
                "test-type", "start-maximized", "no-default-browser-check", "allow-no-sandbox-job",
                "disable-component-update", "disable-translate", "disable-hang-monitor", authServerWhitelist, startUrl,
                selectedEmulator
            };
            options.AddArguments(argsToPass);
            var driver = new ChromeDriver(driverService, options, testSettings.TimeoutTimeSpan);
            if (testSettings.DeleteAllCookies)
            {
                driver.Manage().Cookies.DeleteAllCookies();
            }
            driver.Manage().Timeouts().ImplicitlyWait(testSettings.TimeoutTimeSpan);
            var extendedWebDriver = new TestWebDriver(driver, testSettings, TestOutputHelper);
            TestWebDriver = extendedWebDriver;
            return extendedWebDriver;
        }
示例#51
0
 public Registers(Emulator emul8)
 {
     InitializeComponent();
     this.emul8 = emul8;
 }
        public void RunMultiBrowserEmulatorTests(Emulator emulator, DeviceOrientation orientation)
        {
            _testSettings.TestType = TestType.EmulatorBrowser;
            _testSettings.DriverType = WebDriverType.ChromeDriver;
            _testSettings.TestDirectory = _testSettings.TestDirectory + "\\Emulator Browsers\\";
            _driver = WebDriverManager.InitializeMultiBrowserEmulatorDriver(_testSettings, emulator, orientation, _testOutputHelper);
            if (_driver == null)
            {
                throw new NullReferenceException("_driver cannot be null");
            }

            PerformTest();

            _driver.Close();
        }
示例#53
0
        public void TestEmulator()
        {
            Emulator e = new Emulator();

            Assert.IsTrue(e.IsRunning);
        }
示例#54
0
        public bool StartNewMovie(IMovie movie, bool record)
        {
            // SuuperW: Check changes. adelikat: this could break bk2 movies
            // TODO: Clean up the saving process
            if (movie.IsActive && (movie.Changes || !(movie is TasMovie)))
            {
                movie.Save();
            }

            try
            {
                Global.MovieSession.QueueNewMovie(movie, record, Emulator);
            }
            catch (MoviePlatformMismatchException ex)
            {
                MessageBox.Show(new Form()
                {
                    TopMost = true
                }, ex.Message, "Movie/Platform Mismatch", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(false);
            }

            RebootCore();

            if (Global.MovieSession.PreviousNES_InQuickNES.HasValue)
            {
                Global.Config.NES_InQuickNES = Global.MovieSession.PreviousNES_InQuickNES.Value;
                Global.MovieSession.PreviousNES_InQuickNES = null;
            }

            if (Global.MovieSession.PreviousSNES_InSnes9x.HasValue)
            {
                Global.Config.SNES_InSnes9x = Global.MovieSession.PreviousSNES_InSnes9x.Value;
                Global.MovieSession.PreviousSNES_InSnes9x = null;
            }

            if (Global.MovieSession.PreviousGBA_UsemGBA.HasValue)
            {
                Global.Config.GBA_UsemGBA = Global.MovieSession.PreviousGBA_UsemGBA.Value;
                Global.MovieSession.PreviousGBA_UsemGBA = null;
            }

            Global.Config.RecentMovies.Add(movie.Filename);

            if (Emulator.HasSavestates() && movie.StartsFromSavestate)
            {
                if (movie.TextSavestate != null)
                {
                    Emulator.AsStatable().LoadStateText(new StringReader(movie.TextSavestate));
                }
                else
                {
                    Emulator.AsStatable().LoadStateBinary(new BinaryReader(new MemoryStream(movie.BinarySavestate, false)));
                }

                if (movie.SavestateFramebuffer != null && Emulator.HasVideoProvider())
                {
                    var b1  = movie.SavestateFramebuffer;
                    var b2  = Emulator.AsVideoProvider().GetVideoBuffer();
                    int len = Math.Min(b1.Length, b2.Length);
                    for (int i = 0; i < len; i++)
                    {
                        b2[i] = b1[i];
                    }
                }

                Emulator.ResetCounters();
            }
            else if (Emulator.HasSaveRam() && movie.StartsFromSaveRam)
            {
                Emulator.AsSaveRam().StoreSaveRam(movie.SaveRam);
            }

            Global.MovieSession.RunQueuedMovie(record);

            SetMainformMovieInfo();

            GlobalWin.Tools.Restart <VirtualpadTool>();


            if (Global.MovieSession.Movie.Hash != Global.Game.Hash)
            {
                GlobalWin.OSD.AddMessage("Warning: Movie hash does not match the ROM");
            }

            if (Emulator is NullEmulator)
            {
                return(false);
            }

            return(true);
        }
示例#55
0
        private bool Engage()
        {
            MainForm.PauseOnFrame = null;
            MainForm.PauseEmulator();

            // Nag if inaccurate core, but not if auto-loading
            if (!CanAutoload)
            {
                // Nag but allow the user to continue anyway, so ignore the return value
                EmuHawkUtil.EnsureCoreIsAccurate(Emulator);
            }

            // Start Scenario 1: A regular movie is active
            if (MovieSession.Movie.IsActive() && !(MovieSession.Movie is ITasMovie))
            {
                var result = MessageBox.Show("In order to use Tastudio, a new project must be created from the current movie\nThe current movie will be saved and closed, and a new project file will be created\nProceed?", "Convert movie", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
                if (result.IsOk())
                {
                    ConvertCurrentMovieToTasproj();
                    StartNewMovieWrapper(CurrentTasMovie);
                    SetUpColumns();
                }
                else
                {
                    return(false);
                }
            }

            // Start Scenario 2: A tasproj is already active
            else if (MovieSession.Movie.IsActive() && MovieSession.Movie is ITasMovie)
            {
                bool result = LoadFile(new FileInfo(CurrentTasMovie.Filename), gotoFrame: Emulator.Frame);
                if (!result)
                {
                    TasView.AllColumns.Clear();
                    StartNewTasMovie();
                }
            }

            // Start Scenario 3: No movie, but user wants to autoload their last project
            else if (CanAutoload)
            {
                bool result = LoadFile(new FileInfo(Settings.RecentTas.MostRecent));
                if (!result)
                {
                    TasView.AllColumns.Clear();
                    StartNewTasMovie();
                }
            }

            // Start Scenario 4: No movie, default behavior of engaging tastudio with a new default project
            else
            {
                StartNewTasMovie();
            }

            // Attempts to load failed, abort
            if (Emulator.IsNull())
            {
                Disengage();
                return(false);
            }

            MainForm.AddOnScreenMessage("TAStudio engaged");
            SetTasMovieCallbacks(CurrentTasMovie);
            SetTextProperty();
            MainForm.RelinquishControl(this);
            _originalEndAction = Config.MovieEndAction;
            MainForm.ClearRewindData();
            Config.MovieEndAction = MovieEndAction.Record;
            MainForm.SetMainformMovieInfo();
            MovieSession.ReadOnly = true;
            SetSplicer();
            SetupBoolPatterns();

            return(true);
        }
示例#56
0
 public AxROM(Emulator emulator) : base(emulator)
 {
     _emulator.Cartridge.MirroringMode = _mirroringModes[0];
 }
示例#57
0
 public EmulationStoppedNotification(Emulator emulator)
 {
     Emulator = emulator;
 }
示例#58
0
 public ImportableGame(IGame game, Emulator emulator, EmulatorProfile emulatorProfile)
 {
     Game            = game;
     Emulator        = emulator;
     EmulatorProfile = emulatorProfile;
 }
示例#59
0
 private void LoadCheats(string filename, string archive = null)
 {
     CheatList.Load(Emulator.AsMemoryDomains(), filename, false);
     Tools.Load <Cheats>();
 }
示例#60
0
 public void FixtureSetup()
 {
     Emulator.Start();
     _repository.Init();
 }