Esempio n. 1
0
        public Window()
        {
            Text            = "ProjectPSX";
            AutoSize        = true;
            AutoSizeMode    = AutoSizeMode.GrowAndShrink;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            KeyUp          += new KeyEventHandler(vramViewerToggle);

            screen.Size              = _640x480;
            screen.Margin            = new Padding(0);
            screen.MouseDoubleClick += new MouseEventHandler(toggleDebug);

            Controls.Add(screen);

            KeyDown += new KeyEventHandler(handleJoyPadDown);
            KeyUp   += new KeyEventHandler(handleJoyPadUp);

            _gamepadKeyMap = new Dictionary <Keys, GamepadInputsEnum>()
            {
                { Keys.Space, GamepadInputsEnum.Space },
                { Keys.Z, GamepadInputsEnum.Z },
                { Keys.C, GamepadInputsEnum.C },
                { Keys.Enter, GamepadInputsEnum.Enter },
                { Keys.Up, GamepadInputsEnum.Up },
                { Keys.Right, GamepadInputsEnum.Right },
                { Keys.Down, GamepadInputsEnum.Down },
                { Keys.Left, GamepadInputsEnum.Left },
                { Keys.D1, GamepadInputsEnum.D1 },
                { Keys.D3, GamepadInputsEnum.D3 },
                { Keys.Q, GamepadInputsEnum.Q },
                { Keys.E, GamepadInputsEnum.E },
                { Keys.W, GamepadInputsEnum.W },
                { Keys.D, GamepadInputsEnum.D },
                { Keys.S, GamepadInputsEnum.S },
                { Keys.A, GamepadInputsEnum.A },
            };

            bufferedWaveProvider.DiscardOnBufferOverflow = true;
            bufferedWaveProvider.BufferDuration          = new TimeSpan(0, 0, 0, 0, 300);
            waveOutEvent.Init(bufferedWaveProvider);

            string diskFilename = GetDiskFilename();

            psx = new ProjectPSX(this, diskFilename);

            var timer = new System.Timers.Timer(1000);

            timer.Elapsed += OnTimedEvent;
            timer.Enabled  = true;

            RunUncapped();
        }
Esempio n. 2
0
        public Window()
        {
            this.Text            = "ProjectPSX";
            this.AutoSize        = true;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            screen.BackgroundImage = buffer.Bitmap;// TESTING
            screen.Size            = new Size(1024, 512);
            screen.Margin          = new Padding(0);

            Controls.Add(screen);

            psx = new ProjectPSX(this);
            psx.POWER_ON();
        }
Esempio n. 3
0
        //private WaveOut waveout = new WaveOut();
        //private BufferedWaveProvider buffer = new BufferedWaveProvider(new WaveFormat());

        public Window()
        {
            Text            = "ProjectPSX";
            AutoSize        = true;
            AutoSizeMode    = AutoSizeMode.GrowAndShrink;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            KeyUp          += new KeyEventHandler(vramViewerToggle);

            screen.BackgroundImage = display.Bitmap;// TESTING
            screen.Size            = _640x480;
            screen.Margin          = new Padding(0);

            Controls.Add(screen);

            string diskFilename = GetDiskFilename();

            psx = new ProjectPSX(this, diskFilename);
            psx.POWER_ON();


            this.getScreen().MouseDoubleClick += new MouseEventHandler(toggleDebug);

            KeyDown += new KeyEventHandler(handleJoyPadDown);
            KeyUp   += new KeyEventHandler(handleJoyPadUp);

            _gamepadKeyMap = new Dictionary <Keys, GamepadInputsEnum>()
            {
                { Keys.Space, GamepadInputsEnum.Space },
                { Keys.Z, GamepadInputsEnum.Z },
                { Keys.C, GamepadInputsEnum.C },
                { Keys.Enter, GamepadInputsEnum.Enter },
                { Keys.Up, GamepadInputsEnum.Up },
                { Keys.Right, GamepadInputsEnum.Right },
                { Keys.Down, GamepadInputsEnum.Down },
                { Keys.Left, GamepadInputsEnum.Left },
                { Keys.D1, GamepadInputsEnum.D1 },
                { Keys.D3, GamepadInputsEnum.D3 },
                { Keys.Q, GamepadInputsEnum.Q },
                { Keys.E, GamepadInputsEnum.E },
                { Keys.W, GamepadInputsEnum.W },
                { Keys.D, GamepadInputsEnum.D },
                { Keys.S, GamepadInputsEnum.S },
                { Keys.A, GamepadInputsEnum.A },
            };

            //buffer.DiscardOnBufferOverflow = true;
            //buffer.BufferDuration = new TimeSpan(0, 0, 0, 0, 150);
        }
Esempio n. 4
0
        public Window()
        {
            Text            = "ProjectPSX";
            AutoSize        = true;
            AutoSizeMode    = AutoSizeMode.GrowAndShrink;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            KeyUp          += new KeyEventHandler(vramViewerToggle);

            screen.BackgroundImage = display.Bitmap;// TESTING
            screen.Size            = _640x480;
            screen.Margin          = new Padding(0);

            Controls.Add(screen);

            psx = new ProjectPSX(this);
            psx.POWER_ON();
        }
Esempio n. 5
0
        public Window()
        {
            Text            = "ProjectPSX";
            AutoSize        = true;
            AutoSizeMode    = AutoSizeMode.GrowAndShrink;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            KeyUp          += new KeyEventHandler(vramViewerToggle);

            screen.BackgroundImage   = display.Bitmap;// TESTING
            screen.Size              = _640x480;
            screen.Margin            = new Padding(0);
            screen.MouseDoubleClick += new MouseEventHandler(toggleDebug);

            Controls.Add(screen);

            KeyDown += new KeyEventHandler(handleJoyPadDown);
            KeyUp   += new KeyEventHandler(handleJoyPadUp);

            _gamepadKeyMap = new Dictionary <Keys, GamepadInputsEnum>()
            {
                { Keys.Space, GamepadInputsEnum.Space },
                { Keys.Z, GamepadInputsEnum.Z },
                { Keys.C, GamepadInputsEnum.C },
                { Keys.Enter, GamepadInputsEnum.Enter },
                { Keys.Up, GamepadInputsEnum.Up },
                { Keys.Right, GamepadInputsEnum.Right },
                { Keys.Down, GamepadInputsEnum.Down },
                { Keys.Left, GamepadInputsEnum.Left },
                { Keys.D1, GamepadInputsEnum.D1 },
                { Keys.D3, GamepadInputsEnum.D3 },
                { Keys.Q, GamepadInputsEnum.Q },
                { Keys.E, GamepadInputsEnum.E },
                { Keys.W, GamepadInputsEnum.W },
                { Keys.D, GamepadInputsEnum.D },
                { Keys.S, GamepadInputsEnum.S },
                { Keys.A, GamepadInputsEnum.A },
            };

            buffer.DiscardOnBufferOverflow = true;
            buffer.BufferDuration          = new TimeSpan(0, 0, 0, 0, 300);

            string diskFilename = GetDiskFilename();

            psx                      = new ProjectPSX(this, diskFilename);
            Globals.GTEFile          = System.IO.File.Open("gte_out.obj", System.IO.FileMode.Open, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
            Globals.GPUVerticesFile  = System.IO.File.Open("gpu_vertex.obj", System.IO.FileMode.Open, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
            Globals.GPUTexcoordsFile = System.IO.File.Open("gpu_texcoords.obj", System.IO.FileMode.Open, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);


            Console.WriteLine("Welcome to ProjectPSXtract.");
            Console.WriteLine("Functions and keys:");
            Console.WriteLine("Emulation speed - F5");
            Console.WriteLine("Count of frames to trace - F6");
            Console.WriteLine("Trace GTE - F7");
            Console.WriteLine("Trace GPU - F8");
            Console.WriteLine("Suspend/resume emulation - F9");

            var timer = new System.Timers.Timer(1000);

            timer.Elapsed += OnTimedEvent;
            timer.Enabled  = true;

            RunUncapped();
        }