Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to add a limit to the speed function? #339

Closed
jrmoore opened this issue Jan 1, 2019 · 6 comments
Closed

Would it be possible to add a limit to the speed function? #339

jrmoore opened this issue Jan 1, 2019 · 6 comments

Comments

@jrmoore
Copy link

jrmoore commented Jan 1, 2019

This is a feature request rather than a bug report, I think the provided form for bug reports doesn't apply but let me know if you need to know anything else.

I downloaded the current 64-bit build for Windows after many years of not playing and I'm glad for new cross-OS UI, but since I'm now playing in a vastly more powerful machine than before and I'm sure compiler optimizations have also got better with the years, the emulation speed is nuts when in speed mode.

Normally it runs fine at 100% @ 60 FPS even with pixel filters enabled, but it jumps to 3000+% while in turbo mode. I looked if there was a way to limit it to a certain % but I couldn't see any option anywhere.

Would it be possible to implement it? If so, please consider it for a future release.

PS. Thanks for the awesome work guys & gals! Revisiting my youth has never been better ^_^

@rkitover
Copy link
Collaborator

rkitover commented Jan 2, 2019

Hi, go to:

Options -> General

you will see a Throttle setting, you can set it to any speed where 100% is normal speed.

HTH

@rkitover
Copy link
Collaborator

rkitover commented Jan 2, 2019

Ok I understand you'd like to be able to set a custom throttle for the turbo button, I think we can do this easily.

rkitover added a commit that referenced this issue Feb 3, 2019
Add Speedup / Turbo configuration panel which allows setting the
throttle or number of frames to skip for when the speed key is pressed
or turbo is enabled (which just presses the speed key.)

Throttle and frame-skip are mutually exclusive, throttle must be 0 (no
throttle) when number of frames to skip is non-zero. The dialog controls
handle this.

This is implemented in the core in GBA.cpp, GB.cpp and ConfigManager.

Two new options are added both in ConfigManager and in the wx options,
speedup_throttle and speedup_frame_skip, the defaults are:

```
speedup_throttle   = 0 (no throttle)
speedup_frame_skip = 9
```

this was the original behavior.

Add support for unsigned ints to wx/opts.cpp for these and for throttle,
this requires a new validator wxUIntValidator to use them in spin
controls.

Clean up appearance of the throttle spin control in the General dialog.

Maximum throttle and speedup_throttle is 600, values much over 500 will
not behave differently from 0 on modern hardware.

Maximum frame skip is 30 at the moment.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
@rkitover
Copy link
Collaborator

rkitover commented Feb 3, 2019

Ok it was not as easy as I thought, but I implemented it in master. Maybe @ZachBacon will push a new nightly for you to try soon.

@rkitover rkitover added the fixed label Feb 3, 2019
@rkitover
Copy link
Collaborator

rkitover commented Feb 3, 2019

@jrmoore please try this binary and see if the new Speedup / Turbo configuration suits your needs:

visualboyadvance-m.zip

rkitover added a commit that referenced this issue Feb 3, 2019
Conditionally compile out the code for the feature implemented in
16dd5d4 (which is the throttle and frame skip configuration for the
speedup button) for libretro, and use the old behavior of skipping 9
frames.

Affects GBA.cpp and GB.cpp .

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
@rkitover
Copy link
Collaborator

rkitover commented Feb 11, 2019

Note for anyone trying this, for speedup throttle to work DISPLAY FILTER MUST BE OFF. Otherwise the game speed will not increase. I'm going to try to fix this.

@retro-wertz and you too.

@rkitover
Copy link
Collaborator

rkitover commented Apr 4, 2019

moving related discussion to #404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants