-
Notifications
You must be signed in to change notification settings - Fork 35
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
FPS setting affects speed of the emulator #86
Comments
This seems strange - on my laptop I get speed 1.0 with fps between 20 and 30 and keyboard responsiveness is fine. BeebEm simply skips rendering video frames to try to keep the speed of the emulated CPU at 1.0 (relative to a real Beeb), so I'm surprised that keypresses take longer to respond. |
One frame a second. Sometimes is stays at 0 frames a second for several seconds. My laptop is: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 2808 Mhz, 4 Core(s), 8 Logical Processor(s) On my system is BeebEm skipping, at times, more then 50 frames when set to Real time so everything stops? I tried the Master 512 co-processor and it works perfectly. GEM desktop (and that brings back memories). Just that prototype ARM co-processor. Strange indeed. preferences.cfg
Note the speed. When locked at 50 FPS the cursor looks like it's having a fit. |
I've had a look at the code. Right now, at this level, it's over my head. I'm a systems geek and applications programmer. I'm not a stranger to assembler and machine code and cut my skills on mnemonics on paper, dry-run, covert to decimal and then poke the program into a ZX81 REM statement what was formatted to be long enough to hold the machine code program, but that was quite a while ago. This is your realm. :-) From there I moved into this: |
Thanks! My laptop is Intel i7-10510 CPU at 1.8GHz, so not dissimilar performance to yours, so I'm surprised we get such different results. The speed adjustment is a part of the code that I've never really looked at before, so I'm not familiar with what it's doing. I'd guess there's a bug somewhere in there, so hopefully we can track it down. I generally only use the Real time option, so I'm not sure what the fixed FPS options mean. |
Ok. Where is the code that manages Speed located? Maybe there may be a slight chance I might just see where the issue lies? |
The menu commands are handled here. If you select one of the Fixed speed options, then The actual speed adjustment is done here. This is called by the CRTC emulation when the emulated Beeb starts a new video frame. |
Initial quick observation. When switching to the ARM7TDMI, just on a broad observation it looks like Query: In this condition why is this if construct mostly false and at time always false for all 50 frames? |
Not sure if this is a bug or by design.
Emulating: Master 128
View: Real Time
Speed is showing at 1.00 and fps is 50.
Emulator at this point is operating fine.
The issue:
I attach the Sprow ARM7TDMI 2nd processor and reset the emulator.
Speed remains at about 1.00, but fps now between 0 to 12 and fluctuating between the two and the emulated session runs so slow that when a key is pressed, can take about 1 to 3 seconds to appear.
When I lock the fps to 50, this changes speed to about 0.92 and the emulated machine becomes usable.
The above is the workaround. I think because the ARM7TDMI operated at 64MHz that locking the speed to 50 fps from real time essentially throttles the emulated co-processor?
When I remove the Co-processor fps remains at 50, but the speed of the emulated Master 128 is now at about 25 times the normal speed until I set speed back to real-time.
I'm curious why the frames per second setting is affecting the speed of the emulated machine. Is this a bug?
The text was updated successfully, but these errors were encountered: