Example #1
0
        public bool FrameAdvance(IController controller, bool render, bool renderSound)
        {
            _controller  = controller;
            _lagged      = true;
            DriveLightOn = false;
            CheckSpriteLimit();
            PSG.BeginFrame(Cpu.TotalExecutedCycles);

            Cpu.Debug = Tracer.IsEnabled();

            if (SuperGrafx)
            {
                VPC.ExecFrame(render);
            }
            else
            {
                VDC1.ExecFrame(render);
            }

            PSG.EndFrame(Cpu.TotalExecutedCycles);

            if (_lagged)
            {
                _lagCount++;
                _isLag = true;
            }
            else
            {
                _isLag = false;
            }

            Frame++;

            return(true);
        }
Example #2
0
        public void FrameAdvance(bool render, bool renderSound)
        {
            Cpu.Debug = Tracer.Enabled;
            Frame++;
            _isLag = true;
            PSG.BeginFrame(Cpu.TotalExecutedCycles);

            if (Cpu.Debug && Cpu.Logger == null)             // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
            {
                Cpu.Logger = (s) => Tracer.Put(s);
            }

            byte temp_ret1 = ControllerDeck.ReadPort1(Controller, true, true);
            byte temp_ret2 = ControllerDeck.ReadPort2(Controller, true, true);

            bool Int_pending = (!temp_ret1.Bit(4)) | (!temp_ret2.Bit(4));

            VDP.ExecuteFrame(Int_pending);

            PSG.EndFrame(Cpu.TotalExecutedCycles);

            if (_isLag)
            {
                _lagCount++;
            }
        }
Example #3
0
        public void FrameAdvance(bool render, bool rendersound)
        {
            _lagged      = true;
            DriveLightOn = false;
            Frame++;
            CheckSpriteLimit();
            PSG.BeginFrame(Cpu.TotalExecutedCycles);

            Cpu.Debug = Tracer.Enabled;

            if (SuperGrafx)
            {
                VPC.ExecFrame(render);
            }
            else
            {
                VDC1.ExecFrame(render);
            }

            PSG.EndFrame(Cpu.TotalExecutedCycles);

            if (_lagged)
            {
                _lagCount++;
                _isLag = true;
            }
            else
            {
                _isLag = false;
            }
        }
        public void FrameAdvance(IController controller, bool render, bool renderSound)
        {
            _controller = controller;
            _cpu.Debug  = _tracer.Enabled;
            _frame++;
            _isLag = true;
            PSG.BeginFrame(_cpu.TotalExecutedCycles);

            if (_cpu.Debug && _cpu.Logger == null)             // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
            {
                _cpu.Logger = (s) => _tracer.Put(s);
            }

            byte tempRet1 = ControllerDeck.ReadPort1(controller, true, true);
            byte tempRet2 = ControllerDeck.ReadPort2(controller, true, true);

            bool intPending = (!tempRet1.Bit(4)) | (!tempRet2.Bit(4));

            _vdp.ExecuteFrame(intPending);

            PSG.EndFrame(_cpu.TotalExecutedCycles);

            if (_isLag)
            {
                _lagCount++;
            }
        }
Example #5
0
        public bool FrameAdvance(IController controller, bool render, bool rendersound)
        {
            _controller = controller;
            _lagged     = true;
            _frame++;
            PSG.BeginFrame(Cpu.TotalExecutedCycles);

            if (!IsGameGear)
            {
                PSG.StereoPanning = Settings.ForceStereoSeparation ? ForceStereoByte : (byte)0xFF;
            }

            if (Tracer.Enabled)
            {
                Cpu.TraceCallback = s => Tracer.Put(s);
            }
            else
            {
                Cpu.TraceCallback = null;
            }

            if (IsGameGear_C == false)
            {
                Cpu.NonMaskableInterrupt = controller.IsPressed("Pause");
            }
            else if (!IsGameGear && IsGameGear_C)
            {
                Cpu.NonMaskableInterrupt = controller.IsPressed("P1 Start");
            }

            if (IsGame3D && Settings.Fix3D)
            {
                Vdp.ExecFrame((Frame & 1) == 0);
            }
            else
            {
                Vdp.ExecFrame(render);
            }

            PSG.EndFrame(Cpu.TotalExecutedCycles);
            if (_lagged)
            {
                _lagCount++;
                _isLag = true;
            }
            else
            {
                _isLag = false;
            }

            return(true);
        }
Example #6
0
        public void FrameAdvance(IController controller, bool render, bool rendersound)
        {
            _controller = controller;
            _lagged     = true;
            _frame++;
            PSG.BeginFrame(Cpu.TotalExecutedCycles);
            Cpu.Debug = Tracer.Enabled;
            if (!IsGameGear)
            {
                PSG.StereoPanning = Settings.ForceStereoSeparation ? ForceStereoByte : (byte)0xFF;
            }

            if (Cpu.Debug && Cpu.Logger == null)             // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
            {
                Cpu.Logger = s => Tracer.Put(s);
            }

            if (IsGameGear == false)
            {
                Cpu.NonMaskableInterrupt = controller.IsPressed("Pause");
            }

            if (IsGame3D && Settings.Fix3D)
            {
                Vdp.ExecFrame((Frame & 1) == 0);
            }
            else
            {
                Vdp.ExecFrame(render);
            }

            PSG.EndFrame(Cpu.TotalExecutedCycles);
            if (_lagged)
            {
                _lagCount++;
                _isLag = true;
            }
            else
            {
                _isLag = false;
            }
        }
Example #7
0
        public void FrameAdvance(bool render, bool renderSound)
        {
            Cpu.Debug = Tracer.Enabled;
            Frame++;
            _isLag = true;
            PSG.BeginFrame(Cpu.TotalExecutedCycles);

            if (Cpu.Debug && Cpu.Logger == null)             // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
            {
                Cpu.Logger = (s) => Tracer.Put(s);
            }

            VDP.ExecuteFrame();
            PSG.EndFrame(Cpu.TotalExecutedCycles);

            if (_isLag)
            {
                _lagCount++;
            }
        }
Example #8
0
        public void FrameAdvance(IController controller, bool render, bool renderSound)
        {
            _controller = controller;

            // NOTE: Need to research differences between reset and power cycle
            if (_controller.IsPressed("Power"))
            {
                HardReset();
            }

            if (_controller.IsPressed("Reset"))
            {
                SoftReset();
            }

            _frame++;
            _isLag = true;
            PSG.BeginFrame(_cpu.TotalExecutedCycles);

            if (_tracer.Enabled)
            {
                _cpu.TraceCallback = s => _tracer.Put(s);
            }
            else
            {
                _cpu.TraceCallback = null;
            }
            byte tempRet1 = ControllerDeck.ReadPort1(controller, true, true);
            byte tempRet2 = ControllerDeck.ReadPort2(controller, true, true);

            bool intPending = (!tempRet1.Bit(4)) | (!tempRet2.Bit(4));

            _vdp.ExecuteFrame(intPending);

            PSG.EndFrame(_cpu.TotalExecutedCycles);

            if (_isLag)
            {
                _lagCount++;
            }
        }
Example #9
0
        public void FrameAdvance(IController controller, bool render, bool renderSound)
        {
            _controller = controller;

            // NOTE: Need to research differences between reset and power cycle
            if (_controller.IsPressed("Power"))
            {
                HardReset();
            }

            if (_controller.IsPressed("Reset"))
            {
                SoftReset();
            }

            _cpu.Debug = _tracer.Enabled;
            _frame++;
            _isLag = true;
            PSG.BeginFrame(_cpu.TotalExecutedCycles);

            if (_cpu.Debug && _cpu.Logger == null)             // TODO, lets not do this on each frame. But lets refactor CoreComm/CoreComm first
            {
                _cpu.Logger = (s) => _tracer.Put(s);
            }

            byte tempRet1 = ControllerDeck.ReadPort1(controller, true, true);
            byte tempRet2 = ControllerDeck.ReadPort2(controller, true, true);

            bool intPending = (!tempRet1.Bit(4)) | (!tempRet2.Bit(4));

            _vdp.ExecuteFrame(intPending);

            PSG.EndFrame(_cpu.TotalExecutedCycles);

            if (_isLag)
            {
                _lagCount++;
            }
        }