Emulator refresh rates

edited February 2015 in Emulators
Okay, I'm going to ask a really lame, beginner question ;)

Zx Spectrum refreshes screen 50 times per second.

I'm running emulator on PC which says that it refreshes screen 75 times per second. Other values are possible too, I guess.

So how do emulators exactly work? If they assumed one Zx frame=one PC frame they would run faster than Spectrum, am I right?

I guess it doesn't happen so what? Do they refresh screen only during some PC frames and skip some frames? That would mean that screen refresh sometimes take 1 PC frame and sometimes 2 frames? Does this work this way? Does it cause some jerkiness?

If I'm talking nonsense please correct me. I just had to ask it after all these years :)
Post edited by Ralf on

Comments

  • edited February 2015
    You're correct. They update the display once every 50th of a second which won't necessarily sync with the refresh of a PC display so you might notice slight effects occasionally. It's not usually noticeable though, especially with Spectrum games which were rarely updating the display at 50fps anyway.
  • edited February 2015
    Usually I only notice the 50/60hz mismatch on text scrolling. If you run your PC through a HDTV rather than a monitor tho you can set your PC to run at 50hz like I have done.
  • edited February 2015
    So here goes my another question - do exist any emulators that synchronize to PC screen refresh and run everything maybe 20% faster or so but refresh the screen correctly?

    I agree, if games has a framerate 10 fps or so it all doesn't really matter.

    But I was was recently experimenting with fast scrolling on Spectrum(examining existing games and trying to make my own scrolling engine. I mean framerates like 50 fps or 25 fps.

    Is it just me or Spectrum scrolling in emulators generally looks rather badly?

    Pixels seem to become "blurry" sometimes it seems to run a little bit faster, sometimes slower etc. I wonder, are these emulator artifacts, my illusions or just real Spectrum works this way with scrolling too.
  • edited February 2015
    Just use a display that support 50hz ie a HDTV. For some reason monitors that support 50hz are few and far between. The blurry pixel thing is probably just the shortcomings of modern LCD displays. Nothing beats old CRT for perfect (instant) pixel response.
  • edited February 2015
    Most PC LCD monitors supports 50hz refresh rate, I am using my monitor @50hz about two months. You just need to add a new 50hz screen mode on nvidia control panel or ati catalyst. after that, check sync vblank on specemu, then it works perfectly. Flicking effects blend colours better and scroller looks fluid.
  • edited February 2015
    Arda wrote: »
    Most PC LCD monitors supports 50hz refresh rate, I am using my monitor @50hz about two months. You just need to add a new 50hz screen mode on nvidia control panel or ati catalyst. after that, check sync vblank on specemu, then it works perfectly. Flicking effects blend colours better and scroller looks fluid.

    Maybe I'm just unlucky then as the last three that i've owned have not. Maybe not having a decent graphics card had something to do with it.
  • edited February 2015
    Another tip is to make sure your emulator is in fullscreen mode, not windowed. Windowed mode often adds a lot of refresh latency.
  • edited February 2015
    Ralf wrote: »
    So here goes my another question - do exist any emulators that synchronize to PC screen refresh and run everything maybe 20% faster or so but refresh the screen correctly?

    Yes. Try Unreal Speccy Portable. Turn off "true speed" option in menu.

    https://bitbucket.org/djdron/unrealspeccyp/downloads
  • edited February 2015
    There are two ways to emulate 50 Hz on PC:

    1. Just skip some frames, for example if display working on 75 Hz, then show 2 frames and skip 1 frame from 3. But scrolls will be not smooth on 60 Hz

    2. Frame resampling with interpolation - pixel color is combined from two frames, weight of each frame depends on time difference with 50 Hz frame rate
  • edited February 2015
    Frame resampling with interpolation - pixel color is combined from two frames, weight of each frame depends on time difference with 50 Hz frame rate

    So this may be a source of blur during smooth scroll too?

    The interesting thing in most emulators is that while I see the blur in action, when I pause the emulator and try to get the screenshot, there are always clear sharp pixels. So I can't even prove to you that I see blur :)
  • edited February 2015
    It'll be processing the Speccy's ULA rendering of the screen at 50fps, but the result will be held in a cache until the PC monitor is next ready to refresh, then the whole image will be dumped to the PC screen. So you see the full Speccy screen as a TV would have displayed that frame, just a fraction of a frame behind.

    Many are able to blend one frame with the last one, which will blur scrolling but mainly reduce the flicker of 'Gigascreen' and other 25fps alternating-screen / attribute effects. But this is generally best turned off when not viewing such graphics.
    Joefish
    - IONIAN-GAMES.com -
  • edited February 2015
    Zero doesn't use any frame interpolation or resampling. It just dumps the speccy display every 20ms (or more accurately, is synched with the sound which does roughly the same thing) to the directx buffer. It then lets DirectX do it's thing while it tries to process the next frame's worth of emulation. DirectX, of course, controls *when* to actually update the display depending on the refresh rate of the monitor, VSync, etc.

    I'm not sure why you would be seeing a blurred scroll. Have you perchance enabled pixel smoothing (or whatever the equivalent option might be in another emulator) that does cause the display to be a little less sharp to mimic a TV screen? During scroll that might be a bit more obvious I suppose but I could be barking up the wrong tree...
  • edited February 2015
    Ralf wrote: »
    Is it just me or Spectrum scrolling in emulators generally looks rather badly?

    That's why I so much prefer the smooth scrolling in ZXDS. The single clock source for everything allows the sound, display and emulation all synced perfectly.

    Patrik
  • edited February 2015
    Maybe I'm just unlucky then as the last three that i've owned have not. Maybe not having a decent graphics card had something to do with it.

    Possibly, the trick needs a 50hz capable graphics card. Monitors usually switch to 50hz automatically.
  • edited February 2015
    Actually I'd have to mention that I have switched my computer recently. As I'm not much into modern gaming, I didn't care to have any "cool" graphics card installed, just using standard integrated graphic board.

    It enables me to do what I do - browse the web and play old games. But maybe it has some impact on emulator performance too:-?
  • edited February 2015
    Arda wrote: »
    Possibly, the trick needs a 50hz capable graphics card. Monitors usually switch to 50hz automatically.

    When I use my laptop built in display the only refresh rate available to me in 60hz. Same as the monitor downstairs.

    If I hook my laptop up to both the HDTVs in the house a range of refresh rates are available including 50hz. So I'd say that a safer bet for 50hz is to go with a small 1080p HDTV rather than a monitor.
Sign In or Register to comment.