Closed Gianmarco72 closed 1 year ago
I just had a look at it. The following video has been recorded with vAmiga's screen recorder. Everything is fluent:
However, I can confirm the flickering in normal operation mode. I am almost sure it's simply related to the 50Hz (PAL) /60Hz (TFT) discrepancy. Because the frame skips are so visible, the game seems to be excellent candidate for testing VSYNC mode (which I plan to implement in the near future).
vAmiga will get a real VSYNC mode in the next release. It's not exposed to the GUI yet, but it can be enabled in RetroShell:
After enabling, vAmiga switches to PULSED
mode which means that the emulator thread waits for an external pulse before a new frame is computed. Pulses are sent by the GUI in the Metal drawing routine. Because the TFT refreshes at 60Hz, the Amiga's clock frequency increases to somewhat over 8MHz.
With VSYNC mode enabled, Double Dragon II runs smoothly. No more flickering.
I still need to take care of audio. When run in VSYNC mode, the sample frequency has to be adjusted accordingly.
Now, the audio unit is compatible with VSYNC mode, too.
I am still unsure where to integrate the VSYNC option in the GUI. One possible place would be the Chipset panel, because VSYNC has a big impact on the clock frequency. Another possible place would be the Video panel. I am wondering where most users would search for this option... š¤
Personally, my first intuition would be to search in the Video panel.
I definitely wouldn't expect the chipset panel to contain settings for my Macintosh display.
Personally, my first intuition would be to search in the Video panel.
I agree too. I would expect to find it in the video panel section.
Because the TFT refreshes at 60Hz, the Amiga's clock frequency increases to somewhat over 8MHz.
My flat screens support 50 Hz. When I used a PC, UAE switched to 50 Hz when in full screen. And for windowed mode, I can live with a display set permanently at 50 Hz.
Thanks a lot for the feedback! Now I think it's clear that the option needs to be part of the Video panel:
There is a new handy debug option, too: Now, the audio buffer fill level can be observed in the status bar.
I just got aware of the fact that later Macs can run in 50Hz mode:
Together with the new VSYNC option this is great news. It means that vAmiga can run at native speed with perfect frame timing (it already does so on my dev machine).
@mithrendal: If iPads can run in 50Hz mode, too, this could also be a great option for the Web port.
vAmiga switches to PULSED mode which means that the emulator thread waits for an external pulse before a new frame is computed.
vAmigaWeb has a pulsed
mode from the beginning on ... same as vc64web ... i.e. the HTML5 requestAnimationFrame event callback triggers the execution and display of one amiga frame.
In case that the display has a higher refresh rate than 50Hz (typically 60Hz) some emulation frames will be skipped ... resulting in a 50 Hz emulation but in a not so smooth motion on amiga games ... if smooth motion has a higher priority than emulation speed to the user the vsync
switch would help to get it execute an amiga frame on each display frame right ?
I will look into it...
PS: what is the difference between NTSC and VSYNC on a 60Hz display ? Is the difference only the resolution of emulated screen ? What about the sound speed ? I bet the NTSC plays at a higher speed than the VSYNC at 60, right?
what is the difference between NTSC and VSYNC on a 60Hz display ?
In PERIODIC mode, frame computation is triggered by a 60 Hz timer which runs side by side with the 60 Hz Metal drawing routine. In PULSED mode, frame computation is triggered by the Metal drawing routine itself. Hence, PULSED mode is more robust in this case as it cannot get out of sync with the drawing routine.
I bet the NTSC plays at a higher speed than the VSYNC at 60, right?
No. Independent of the current mode (PULSED PAL, PERIODIC PAL, PULSED NTSC, PERIODIC NTSC), the Muxer always aims at producing 44100 sound samples per second.
Fixed in v2.2b1
During the opening credits, the text flickers when scrolling upwards. I'm not sure if the issue is only on my iMac 21.5'' Intel i5 (2017), macOS 12.5. On UAE it seems to be perfect. I also remember that on my old A500 (with Kickstart 1.2) the scroll was smooth. Maybe there are some dropped frames?
vAmiga 2.1