public bool ScanForM2Emulator()
        {
            if (M2EmulatorProcess != null)
            {
                M2EmulatorProcess.CloseProcess();
            }
            M2EmulatorProcess = new ProcessManipulation();
            var procs = Process.GetProcessesByName("emulator.exe");

            if (procs.Length == 0)
            {
                procs = Process.GetProcessesByName("emulator_multicpu.exe");
                if (procs.Length == 0)
                {
                    return(false);
                }
            }

            M2EmulatorProcess.OpenProcess(ProcessManipulation.ProcessAccess.PROCESS_WM_READ, procs[0]);
            M2EmulatorProcess.ReadUInt32(0x005AA888, out uint val);

            ulong address   = 0x0057285B;
            ulong addressVR = 0x00574CF0;

            /*
             * // Daytona USA (Saturn Ads)
             * DWORD address = 0x0057285B; //v1.1 M2Emu TXaddressVR =0x005AA888;
             * DWORD addressVR =0x005AA888;
             *
             */
            return(true);
        }
 public virtual bool ScanForKnownGameEmulator()
 {
     if (GameProcess != null)
     {
         GameProcess.CloseProcess();
     }
     GameProcess = new ProcessManipulation();
     return(true);
 }
        public override bool ScanForKnownGameEmulator()
        {
            if (GameProcess != null)
            {
                GameProcess.CloseProcess();
            }
            GameProcess = new ProcessManipulation();

            List <Tuple <string, string> > namesAndTitle = new List <Tuple <string, string> >();

            var cs = BFFManager.CurrentControlSet;

            namesAndTitle.Add(new Tuple <string, string>(cs.ProcessDescriptor.ProcessName, cs.ProcessDescriptor.MainWindowTitle));

            // Scan processes and main windows title
            var found = ProcessAnalyzer.ScanProcessesForKnownNamesAndTitle(namesAndTitle, true, false);

            // Store detected profile
            if (found.Count == 0)
            {
                return(false);
            }
            // Pick first
            var    proc     = found[0].Item1;
            string gamename = proc.MainWindowTitle;

            Log("Found " + proc.ProcessName + " main window " + gamename + " matched with current control set " + cs.UniqueName, LogLevels.IMPORTANT);

            // Known game?
            if (!DetectGameFromMainWindowTitle(gamename))
            {
                Log("Failed to match a known Raw output windows name for " + gamename, LogLevels.IMPORTANT);
                return(false);
            }

            GameProcess.OpenProcess(ProcessManipulation.ProcessAccess.PROCESS_WM_READ, proc);

            FillAddressFromGame();

            return(true);
        }