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

Flickering in some games. #76

Closed
Zusion opened this issue Aug 5, 2015 · 34 comments
Closed

Flickering in some games. #76

Zusion opened this issue Aug 5, 2015 · 34 comments
Labels
severity:enhancement Feature requests
Milestone

Comments

@Zusion
Copy link

Zusion commented Aug 5, 2015

Some games such as the one in the example above (Boktai) swap between 2 frames quickly to create a kind of pseudo transparency. I'm assuming this doesn't work as intended due to the difference in speed of the GBA's display compared to the monitors we use. Is it possible to implement some kind of interpolation or something to mimic that effect?

@endrift
Copy link
Member

endrift commented Aug 5, 2015

If you run with sync to video enabled, it'll look fine, but there are plenty of other issues there. As for deblinking, I'm not entirely sure what the best way to do that is without making everything look smudged. I can look into it for a future version.

@endrift endrift added the severity:enhancement Feature requests label Aug 5, 2015
@Zusion
Copy link
Author

Zusion commented Aug 5, 2015

I've tried it with sync to video enabled and it's still the same.

@ShadowOne333
Copy link

I can confirm this issue for the Wii version.
I tried Yoshi's Island (Super Mario Advance 3) with the flickering question clouds and they don't flicker at all.

Either they're completely visible or completely invisible depending on when the flickering start.

Rev used: Oct 10th.

@ShadowOne333
Copy link

Just a heads up.
I tried the nightly for Oct 24th and played Yoshi's Island with it.
The flickering clouds with the question mark now blink/flicker properly!

Seems to have been solved with that build.

@endrift endrift added this to the 0.5.0 milestone Nov 22, 2015
@taisel
Copy link

taisel commented Jan 12, 2016

@ShadowOne333 for 60 fps shadow flicker to not pulse at all would require the host display to be running at 30 fps and not 60 fps. Is the wii version running at 30 fps NTSC instead of 60?

@endrift endrift modified the milestones: 0.6.0, 0.5.0 Aug 8, 2016
@photodiode
Copy link

photodiode commented Dec 21, 2016

I encountered the flickering when I tried to play ZAS
Setting the frame skip to 1 "fixes" it, but then you only get half the background so to speak.

zas2

Just an idea: Make a ghosting filter to emulate slow LCD?

@sczther
Copy link

sczther commented Dec 21, 2016

ZAS is intentionally, it's made for the original DMG, which has the last frame still drawn, so it essentially mixes them both. (That's the famous ghosting, making many action games unpleasant to play.) ZAS uses this quirk to have rich backgrounds, on a DMG, it has both the ships and the background at once. There should be an option like "mix frames" in mGBA to simulate this behavior. If there isn't, then that's the problem.

@photodiode
Copy link

Yes, a "mix the current and last frame" option would be great.

@LordGinger
Copy link

The issue is still present in the latest nightly (0.6-4464-a5f029c).
In other emulators it can be alleviated using a motion blur shader, which helps with interframe blending.

@endrift
Copy link
Member

endrift commented Apr 30, 2017

"Issue"? It's an intended effect on hardware. The only reason this is still open is so I can remember to add an interframe blending option to imitate hardware ghosting.

@endrift endrift modified the milestones: 0.6.0, 0.7.0 Jun 17, 2017
@GrieverV
Copy link

Just noting that Final Fantasy I & II: Dawn of Souls also uses this effect for transparency
Final Fantasy I

@ubergeek77
Copy link

ubergeek77 commented Sep 20, 2018

I know this is an old issue, but I thought I would add something that @endrift and others may find interesting.

When I switched from playing Boktai on my Android phone to playing it on Windows (both using the mGBA core), the flickering became much more noticeable on Windows. I double checked on my phone, and sure enough, the transparency/flickering effect is quite good under Android. I didn't even give the effect much thought.

I don't know any of the specifics, but I remember learning a long time ago that Windows has its own sort of Vsync/framebuffer that it applies to everything running in windowed mode. From personal experience, this effect has been noticeable; I remember having a ton of screen tearing in older games without proper Vsync support, and running them in windowed/borderless windowed solved most of the issues, whereas exclusive fullscreen would bypass this framebuffer, leading to screen tearing. I tried running mGBA in fullscreen, but either it only implements borderless windowed mode, or my having multiple monitors prevented me from trying it in exclusive fullscreen mode. Doing so had no visible affect.

In any case, I think this Windows framebuffer is causing the problems here. Windows erroneously trying to sync the frames to the screen's refresh rate are causing some of the flickering effects in GBA games to be skipped. Using the mGBA setting to sync to video does help somewhat, but the improvement is minimal, and it's nowhere near as seamless as on Android. Again, I don't know the full technical details of this, but from what I've seen, I'd say this is a pretty good guess.

In summary:

  • Using Windows to run mGBA on RetroArch yields issues with transparency/flickering
  • Using Windows to run standalone mGBA yields issues with transparency/flickering
  • Using Android to run mGBA on RetroArch does not yield issues with transparency/flickering (they work perfectly)

I'm not sure about other consoles that can run mGBA through RetroArch, but if I had to guess, this is a Windows-specific issue.

I should note that this may/may not have been an issue in the past for non-Windows systems (this is a 3-year-old issue, after all), however this is my experiences using the latest version of mGBA available through RetroArch and mgba.io. As of this writing, that's the 9-20-2018 nightly build on Windows, and version 0.7-WIP on Android through RetroArch (which is probably the same build, or extremely similar).

@coolanybody
Copy link

This also happens with Friends of Mineral Town
bad text

@endrift
Copy link
Member

endrift commented May 27, 2019

Interframe blending for Qt and SDL versions added in 47bf26f. Wii, Vita, 3DS and Switch implementations forthcoming. Still deciding how I'm going to handle RA.

@CharlesCorrin
Copy link

A wonderful feature. I tested in Golden Sun and Final Fantasy I & II - Dawn of Souls. Works great.

Except... I think I found a bug. Turn on the interframe blending. Then run your mouse cursor over the screen. It seems to interfere with the blending when you do. This is in software and OpenGL video modes both.

@endrift
Copy link
Member

endrift commented May 30, 2019

Implemented now everywhere except RA and OpenEmu.

@benderscruffy
Copy link

benderscruffy commented Jun 1, 2019

everytime i tick Interframe blending the screen goes black but music plays (every game) in opengl
it doesnt do it in software
i have an AMD Radeon HD 7450

@CharlesCorrin
Copy link

If it helps, my video card is the Nvidia Geforce 750 Ti and I'm working with Windows 10 Home 64-bit Version 1809.

@endrift
Copy link
Member

endrift commented Jun 7, 2019

@CharlesCorrin what version of the drivers do you have? I can't reproduce on my (newer) Nvidia card on Windows.

@CharlesCorrin
Copy link

CharlesCorrin commented Jun 7, 2019

Nvidia driver version 26.21.14.3086 , dated May 22 2019. The newest one at this time. I usually get the newest drivers fast. Could the driver be buggy?

Oh, and I should describe the alleged bug better. It looks like the frames aren't blending while the mouse cursor is moving across the program window. But when the cursor is still, mGBA blends properly. Test game is Final Fantasy I & II - Dawn of Souls.

EDIT: Made a new discovery: With "Sync to video" enabled, the bug is gone completely.

@endrift
Copy link
Member

endrift commented Jun 7, 2019

I encountered driver bugs with an earlier version, but I doubt that's what's going on here. I might need to find a way to log this stuff.

@CharlesCorrin
Copy link

After the success with 09ccf54 for the other issue, I decided I should test this. The bug I reported in this topic is fixed too. :3 Though I don't know why it is.

benderscruffy, how's the one you reported? Fixed or no?

@benderscruffy
Copy link

no it is worse now
any game using opengl is black screen with music playing with or without Interframe blending ticked
i can only use software (Qt) now

@endrift
Copy link
Member

endrift commented Jul 4, 2019

OpenGL force 1.x should be fixed now, as is interframe blending on 1.x.

@endrift
Copy link
Member

endrift commented Sep 22, 2019

This is fixed now in everything except the libretro core, but it's a frontend feature so Retroarch should implement it instead of the cores.

@endrift endrift closed this as completed Sep 22, 2019
@tnelling
Copy link

mgbaAW2

Not sure if this is the exact same issue, but I ran into this with Advance Wars 2 dialogue. The issue persists whether or not I have interframe blending or sync to video enabled (in the gif both are enabled).

@endrift
Copy link
Member

endrift commented Jun 16, 2020

That is issue #1790, not this one. Do you have an AMD GPU?

@tnelling
Copy link

I'm not sure why it would be #1790, since I'm not holding the turbo key (or doing anything turbo related).

I have an NVIDIA GeForce.

@Liger0
Copy link

Liger0 commented Jun 16, 2020

I'm not sure why it would be #1790, since I'm not holding the turbo key (or doing anything turbo related).

I have an NVIDIA GeForce.

I actually have had it without using turbo hold key, but it seems to be more reproduce-able with the turbo.

@tnelling
Copy link

For what it's worth, after I created this, I noticed that it was only happening with dialogue at the top of the screen. The dialogue at the bottom didn't seem to have the issue. Though I can't say with absolute certainty that it never did.

@cjlaborde
Copy link

mgbaAW2

Not sure if this is the exact same issue, but I ran into this with Advance Wars 2 dialogue. The issue persists whether or not I have interframe blending or sync to video enabled (in the gif both are enabled).

I have same issue with advanced wars
flickering3

@endrift
Copy link
Member

endrift commented Jul 23, 2020

Again, that's #1790, not this.

@mgba-emu mgba-emu locked as resolved and limited conversation to collaborators Jul 23, 2020
@endrift
Copy link
Member

endrift commented Jul 23, 2020

Actually, looking at these GIFs again, that might be a separate bug that just affects Advance Wars. It's 100% not this bug, but it may not be that bug either.

@endrift
Copy link
Member

endrift commented Jul 23, 2020

Relevant Advance Wars bug was filed as #1823.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity:enhancement Feature requests
Projects
None yet
Development

No branches or pull requests