예제 #1
0
        public void FrameAdvance(IController controller, bool render, bool rendersound = true)
        {
            Frame++;
            if (controller.IsPressed("Power"))
            {
                LibmGBA.BizReset(_core);

                // BizReset caused memorydomain pointers to change.
                WireMemoryDomainPointers();
            }

            IsLagFrame = LibmGBA.BizAdvance(
                _core,
                VBANext.GetButtons(controller),
                _videobuff,
                ref _nsamp,
                _soundbuff,
                RTCTime(),
                (short)controller.GetFloat("Tilt X"),
                (short)controller.GetFloat("Tilt Y"),
                (short)controller.GetFloat("Tilt Z"),
                (byte)(255 - controller.GetFloat("Light Sensor")));

            if (IsLagFrame)
            {
                LagCount++;
            }

            // this should be called in hblank on the appropriate line, but until we implement that, just do it here
            _scanlinecb?.Invoke();
        }
예제 #2
0
        public void FrameAdvance(bool render, bool rendersound = true)
        {
            Frame++;
            if (Controller["Power"])
            {
                LibmGBA.BizReset(core);
            }

            IsLagFrame = LibmGBA.BizAdvance(core, VBANext.GetButtons(Controller), videobuff, ref nsamp, soundbuff,
                                            RTCTime(),
                                            (short)Controller.GetFloat("Tilt X"),
                                            (short)Controller.GetFloat("Tilt Y"),
                                            (short)Controller.GetFloat("Tilt Z"),
                                            (byte)(255 - Controller.GetFloat("Light Sensor")));

            if (IsLagFrame)
            {
                LagCount++;
            }
            // this should be called in hblank on the appropriate line, but until we implement that, just do it here
            if (_scanlinecb != null)
            {
                _scanlinecb();
            }
        }