예제 #1
0
        public void Restart()
        {
            if (Global.Emulator is Gameboy)
            {
                _gb   = Global.Emulator as Gameboy;
                _cgb  = _gb.IsCGBMode();
                _lcdc = 0;
                if (!_gb.GetGPUMemoryAreas(out _vram, out _bgpal, out _sppal, out _oam))
                {
                    _gb = null;
                    if (Visible)
                    {
                        Close();
                    }
                }
                tilespal = _bgpal;

                if (_cgb)
                {
                    label4.Enabled = true;
                }
                else
                {
                    label4.Enabled = false;
                }
                bmpViewBG.Clear();
                bmpViewWin.Clear();
                bmpViewTiles1.Clear();
                bmpViewTiles2.Clear();
                bmpViewBGPal.Clear();
                bmpViewSPPal.Clear();
                bmpViewOAM.Clear();
                bmpViewDetails.Clear();
                bmpViewMemory.Clear();
                cbscanline_emu = -4;                 // force refresh
            }
            else
            {
                _gb = null;
                if (Visible)
                {
                    Close();
                }
            }
        }
예제 #2
0
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Config config, IGameInfo game, IMovieSession movieSession, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs(mainForm.DialogController);
            dlg.gbPrefControl1.PutSettings(config, game, movieSession, s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode() && (!gb.IsCGBDMGMode() || ss.EnableBIOS);
            if (mainForm.ShowDialogAsChild(dlg).IsOk())
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }
예제 #3
0
파일: GBPrefs.cs 프로젝트: zcatt/BizHawk
        public static void DoGBPrefsDialog(IMainFormForConfig mainForm, Gameboy gb)
        {
            var s  = gb.GetSettings();
            var ss = gb.GetSyncSettings();

            using var dlg = new GBPrefs();
            dlg.gbPrefControl1.PutSettings(s, ss);
            dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode();
            if (mainForm.ShowDialogAsChild(dlg) == DialogResult.OK)
            {
                dlg.gbPrefControl1.GetSettings(out s, out ss);
                gb.PutSettings(s);
                if (dlg.gbPrefControl1.SyncSettingsChanged)
                {
                    mainForm.PutCoreSyncSettings(ss);
                }
            }
        }