Exemplo n.º 1
0
        public Video_SlimDX(TVFORMAT TvFormat, Control Surface)
        {
            if (Surface == null)
            {
                return;
            }
            _Surface = Surface;
            switch (TvFormat)
            {
            case TVFORMAT.NTSC:
                _ScanLines      = 224;
                _FirstLinesTCut = 8;
                break;

            case TVFORMAT.PAL:
                _ScanLines      = 240;
                _FirstLinesTCut = 0;
                break;
            }
            VideoModeSettings sett = new VideoModeSettings();

            sett.Reload();
            ApplaySettings(sett);
            //InitializeDirect3D();
        }
Exemplo n.º 2
0
        public Video_HiRes(TVFORMAT TvFormat, Control Surface, string pPath, int chrPages, PPU pp)
        {
            if (Surface == null)
            {
                return;
            }
            _Surface = Surface;
            oppu     = pp;
            switch (TvFormat)
            {
            case TVFORMAT.NTSC:
                _ScanLines      = 224;
                _FirstLinesTCut = 8;
                break;

            case TVFORMAT.PAL:
                _ScanLines      = 240;
                _FirstLinesTCut = 0;
                break;
            }
            VideoModeSettings sett = new VideoModeSettings();

            sett.Reload();

            if (pPath != "")
            {
                ReadHiResPack(Path.GetDirectoryName(pPath) + Path.DirectorySeparatorChar + Path.GetFileNameWithoutExtension(pPath), chrPages);
            }
            tilePalette = new int[3];
            tileRow     = new int[8];
            MyNesDEBUGGER.WriteLine(this, "Video device " + @"""" + "Hi Res" + @"""" + " Ok !!", DebugStatus.Cool);
        }
 public Frm_SlimDXOptions(Video_SlimDX SLIM)
 {
     _SLIM = SLIM;
     InitializeComponent();
     sett.Reload();
     comboBox1.Items.Clear();
     for (int i = 0; i < _SLIM.d3d.Adapters[0].GetDisplayModes(SlimDX.Direct3D9.Format.X8R8G8B8).Count; i++)
     {
         comboBox1.Items.Add(_SLIM.d3d.Adapters[0].GetDisplayModes(SlimDX.Direct3D9.Format.X8R8G8B8)[i].Width + " x " + _SLIM.d3d.Adapters[0].GetDisplayModes(SlimDX.Direct3D9.Format.X8R8G8B8)[i].Height + " " + _SLIM.d3d.Adapters[0].GetDisplayModes(SlimDX.Direct3D9.Format.X8R8G8B8)[i].RefreshRate + " Hz");
     }
     try
     {
         comboBox1.SelectedIndex = sett.SlimDX_ResMode;
     }
     catch
     {
         comboBox1.SelectedIndex = 0;
     }
 }