Sync Issues, Scrolling Background Artifacts at 4K 60Hz

I am setting up a multi-arcade cabinet with a 4K display (60Hz max) and using CRT shaders. It looks great and I am mostly happy.

EDIT: I am using the FBNeo core, because it seems the best way to take advantage of run-ahead latency when playing arcade games.

Weird issue driving me nuts, however, is that in some older side-scrolling games I see background artifacts. It could be tearing, but maybe something else.

For example, I notice it in Black Tiger. Newer games don’t seem to have the issue (like 3 Wonders).

I have tried to eliminate possible causes, and I am pretty sure it has nothing to do with integer (or non) scaling, aspect ratios, video drivers, shaders, triple buffering or audio sync.

My display won’t do higher than 60Hz at 4K, so I can’t test higher rates. I might just try lower resolution at higher rate to see what happens, but haven’t done that yet.

I do notice that if I set my video card to max out at say 50Hz, it seems to alleviate the problem.

Or if I set Vsync to 2 frames, the problem goes away completely… but obviously the playspeed is cut in half.

Anyone have any suggestions? It’s not a deal-breaker, but it is SO close to perfect that little things like that are annoying.

It seems odd the problem is most pronounced in games that should be easier to run… I am wondering if that’s a clue as to the culprit.

THANKS

I think we’re gonna need a pic/screenshot of what’s going on. I can’t really visualize the problem.

Thanks for looking at my problem…

I got a video but I can’t post that here, and none of the frames alone really illustrate the problem. It really is only noticeable in motion.

On second thought I think the problem may actually be the shader… I was using CRT Royale and that produced the effect, then Guest Dr Venom did as well, but when I turned shaders off completely the problem went away.

I then went through all the Slang CRT shaders and found that the problem was not apparent in Frutbunn, CRT-Pi, CRT-Slangtest (Cubic and Lanczos), CRTSim and CRT-NES-Mini. I’m not really a fan of any of those. I am not sure what the common denominator is but I would guess it has to do with scaling in the shaders themselves (not the RA video scaling setting, necessarily).

guest-venom has an afterglow effect on by default where you see a slight trail on things moving on black backgrounds. It’s something that happened on real CRTs and I think it looks neat, but you can turn it off in the shader parameters. But I’m not sure if that’s the problem, since I don’t know if Royale has any effect like that.

No, I like that effect too and I don’t think that’s what it is. It is like a vertical ripple effect as the background scrolls horizontally. It is just distracting, but it doesn’t ruin anything.

Black Tiger has a 256 (I think) horizontal resolution, and I wonder if that might be a commonality (or maybe most games with <320 horizontal resolution have the issue). My theory is a lot of the better CRT shaders are doing some scaling or rounding and in certain cases it produces this visible artifact when the screen is in motion. It could probably be corrected in shader settings if I could just isolate it. I noticed also many shaders NOT in the “CRT” folder also do not produce this effect. Also, the Royale shader variants for 256px displays did not correct the issue.

I’ll try to post the video clip somewhere, and if I can I will post a link to it here.

Also, I forgot last night to try to downscale to 1080p and see if that changed anything. To my eyes there is very little difference anyway, I could live with running a few older games at lower res if it fixes this.

Again, thanks for input.

EDIT

Hmm, yeah, that looks like a non-integer (on the x-axis) issue, but most CRT shaders should be smoothing that out automatically. Is it happening for you with the base royale preset?

I can’t say I’ve tried every Royale version, but I tried most in the CRT folder and Kurozumi (?) and the Sony PVM Royale presets, still had the issue. And like I said, most of the better CRT shaders have the same issue.

Good to hear you are thinking the same thing, might help narrow down a fix.

I see a possible situation. Best try with MAME/FBA too just to eliminate the shader issue. If this happens with vertical games, the emu core uses a special rotation to fit the image. Anyway, more info is needed.

Otherwise integer scaling cropping at 4k is very slim, if it solves the problem then everything should be fine.

OK, I tried Mame2016, Mame2003Plus, and FBAlpha and the issue still persisted.

Also, an interesting observation I made was if I rotated the screen 90 degrees, the ripple effect was still present but still moved horizontally (that is, perpendicular to the scrolling on the rotated screen). Put another way, all the action on the screen rotated but the ripple didn’t.

Then I started to really look closely at some other games and I think it is more widespread than I thought, just less noticeable. 3 Wonders was pretty well impossible to see, but even on Metal Slug 3 it was present. I think it is harder to notice on later games because they have busier background art that obscures it.

Also tried 1080p – if anything it made it worse.

Anyhow, I’m over it. I am happy with it. But if this discussion can help improve/debug shaders I can keep poking around.

EDIT: OK I think I fixed it. The issue was I am running everything on a vertically-oriented display. I noticed all my shmups look great without the ripple, but all these TATE games are running with the screen orientation rotated 90 counterclockwise. So I tried that on my non-TATE games and behold, ripples are gone on horizontal scrolling games too. Anyone who knows shaders better than me probably could have told me this was the problem, I just didn’t realize that detail was so critical.

The reason I have the screen physically oriented vertically is it’s a 43" display, so I can hide it in a cabinet with only a 21" x 21" section of the screen showing. Inside that is a 2160 x 2160 pixel viewport. Within that viewport I can run both horizontal and TATE games on sort of a simulated 25" arcade monitor.

Anyhow, it looks great now. RA is pretty amazing.