Is there an emulator that can do fullscreen without tearing?

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

User avatar
BMF54123
Posts: 410
Joined: Mon Aug 28, 2006 2:52 am
Contact:

Re: Is there an emulator that can do fullscreen without tear

Post by BMF54123 »

koitsu wrote:- FCEUX: I've never gotten this thing to do windowed sync correctly. There is always some form of intermittent
tearing no matter what combination of options I use (including "Wait for VBlank" instead of "lazy wait"). I
mainly use FCEUX for debugging/RE'ing, but for me I use it like a combo of Nestopia and Nintendulator.
- FCEUX: Tearing actually goes away if I set DirectDraw: Create Surface in RAM, however for whatever reason
that starts causing audio-related problems (difficult to explain, sounds like clicks or buffer/timing problems).
Adjusting audio-related settings doesn't relieve the problem. Also, in this mode occasionally the emulator will
randomly drop to like 30-40fps (with audio stuttering crazily) for 4-5 full seconds then fix itself.
- FCEUX: Oddly enough, if I set DirectDraw: Hardware acceleration, the audio-related problems I mentioned
above happen, tearing + slowdown issue happens, *and* (as expected) I get bilinear filtering/blurry results.
- FCEUX: So I hope this explains why I pick the options I do. Oh, and don't go blaming my audio card (Audigy SE)
because the same problem happened with an on-board Realtek ALC887. My gut feeling is that there's just some
major desync between the video and audio layers when certain options are checked so someone should probably
revamp that code. Issue is 100% reproducible.
FCEUX drives me absolutely BONKERS because it has persistent audio stuttering issues no matter which audio/video settings I choose. It's fine much of the time, but every now and then the audio will get noticeably stuttery and "garbled" for a few seconds and then go back to normal. It's like dragging fingernails down a chalkboard every time it happens. What's really odd is that the problem only manifests itself when it's outputting audio through my Sound Blaster X-Fi (and previously, my Audigy 2) - if I switch to the on-board SoundMAX, the problem goes away. The stuttering also occurs whether or not I disable desktop composition in the application's Compatibility tab (Windows 7's DWM forces its own Vsync on all programs when this is on).

Vsync also completely fails to work, but I have never, ever been able to make it work properly on any computer or OS. Someone really needs to overhaul the ancient audio/video code instead of constantly poking the UI and TAS-specific junk.

Relevant system specs:

AMD Phenom II X2 555 BE (3.2 GHz)
AMD Radeon HD 6770
Sound Blaster X-Fi Titanium PCI-E (or Analog Devices SoundMAX AD1988B, integrated)
Windows 7
nIghtorius
Posts: 48
Joined: Tue Apr 29, 2014 1:31 pm

Re: Is there an emulator that can do fullscreen without tear

Post by nIghtorius »

Could you try my emulator ( how it vsync's )

Still working on the compatibility and stuff. But should run a considerable amount of games.

My emulator utilizes Direct2D for vsyncing.. Best results is offcourse obtained when the displayrefresh is set at 60Hz or multiple of it. (120/180/240hz/etc)
Attachments
pnes-beta2.7z
phibiaNES public beta - 2
(707.04 KiB) Downloaded 180 times
User avatar
koitsu
Posts: 4203
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Is there an emulator that can do fullscreen without tear

Post by koitsu »

nIghtorius wrote:Could you try my emulator ( how it vsync's )

Still working on the compatibility and stuff. But should run a considerable amount of games.

My emulator utilizes Direct2D for vsyncing.. Best results is offcourse obtained when the displayrefresh is set at 60Hz or multiple of it. (120/180/240hz/etc)
Since I run XP, Direct2D isn't available for me, only GDI is.

The emulator (maybe only in GDI mode?) takes up about 100% of one CPU core, so I see ~14-15% CPU at all times. FPS count in the emulator is 59-61 (usually 60) as it should be. As discussed previously with other emulators (ex. Fusion) that might be normal based on what your algorithm is. Does it tear? Occasionally, but not too often (maybe every 20 seconds of play, where the tearing gradually appears from the bottom and works its way up, then goes away).

It might be worth Emailing Steve Snake (author of Fusion) and ask exactly how he does his main loop + Vsync method. I'm betting he'd have some insights into doing audio/video synchronisation as well, which leads me to...

I did find other anomalies/oddities, but I'll post those in the other thread since they don't pertain to Vsync.
Post Reply