Hacking Possible to Disable the Wii's (De)Flicker Filter?

T0biasCZe

Well-Known Member
Member
Joined
Oct 4, 2019
Messages
220
Trophies
0
Age
18
XP
940
Country
Czech Republic
make a difference because if you are on interlaced video on CRT you want the hack off,
Even on CRT it looks better with the filter off, and it doesn't flicker too much... (Even in 576i 50hz)

Also since there is on the go patching of games on USB, would it be possible to make patcher for physical games?
 

seriffic

Member
Newcomer
Joined
Sep 9, 2020
Messages
17
Trophies
0
Age
26
XP
174
Country
United States
Hello, I tested the deflicker filter toggle on the modded USB Loader GX and it worked wonderfully with RE4, Mario Galaxy, etc. I tested Muramasa and I can't seem to notice a difference. Is the toggle working for Muramasa, is it worth trying to manually hex edit to remove a filter? Or is there even a filter applied to Muramasa in the first place, since it's a 2d sprite-based game? Thanks !
 

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,398
Country
Spain
Maybe Muramasa doesn't use any filter. We know that for example, Nintendo-published games almost never used the default deflicker mode, opting for more subtle ones, while third party games almost always used the strongest mode because it was the default option on the SDK.

Maybe the devs of Muramasa actually cared about visual fidelity and took away the filter. I can check that, I have the game.
 

seriffic

Member
Newcomer
Joined
Sep 9, 2020
Messages
17
Trophies
0
Age
26
XP
174
Country
United States
Thank you, that's good to hear, then at 480p Muramasa is displaying the cleanest possible picture from the Wii on my set. I'm using an MClassic with all my titles so I'm trying to avoid AA on top of the vfilter's "AA".
 

totakeke95

Well-Known Member
Member
Joined
Dec 25, 2020
Messages
146
Trophies
0
XP
869
Country
Spain
I'm playing RE 4 these days and I have the deflckier set to "no (safe)" but it looks too bright on the capcom logo or in home menu, should I change it to "no (experimental)" or "auto" ?

And one more question. In Okami settings has an option to choose between LCD or standard TV, is this setting related to the deflicker filter?
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,832
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,825
Country
Cyprus
You can adjust the deflicker settings and test it out all the various options, just do it in gx rather than modifying the game image a number of times, then keep whichever one you think is best (and report back so others can benefit and/or confirm/compare results if u want)
 

Brand Newman

Well-Known Member
Member
Joined
Apr 29, 2014
Messages
560
Trophies
2
Age
43
Website
twitter.com
XP
3,378
Country
France
And one more question. In Okami settings has an option to choose between LCD or standard TV, is this setting related to the deflicker filter?

That's an interesting question : maybe this doesn't have anything to do with it, but I own both PAL and Japanese versions of the game (Japanese version was released a bit later, has an extended ending and attack mapped to "A" instead of waggling), and Japanese version is blurry as hell.

I've tried to force video dol without any success, and forcing deflicker didn't seem to work either, but maybe that setting actually cancels it? I'll have to make some tests.
 
Last edited by Brand Newman,
  • Like
Reactions: totakeke95

Maidvelia

Member
Newcomer
Joined
Aug 26, 2017
Messages
12
Trophies
0
Age
27
Location
Warren, MI, USA
Website
www.twitch.tv
XP
152
Country
United States
Is there a system-wide deflicker like in Priilloader's hash.ini, but for vWii?

A CBHC mod maybe?

Hey everyone, I'm new here. Just wanted to say that've found this thread yesterday and tried the method on my copy of Twilight Princess for the Wii and I must say that it looks like 1000x better now. Since I haven't found a tool that would patch the main.dol automatically, so I've decided to create one myself. Since I'm new I can't post a direct link to the github right now but my username on there is EnterpriseFreak-v2 and the project is called No-AA-Patcher. I've also attached an image that shows the huge difference patching the video mode makes for Twilight Princess. View attachment 274606

Any reason why I get dll errors (VCRUNTIME140D.dll and ucrtbased.dll) when I run the latest version of this app?
 
Last edited by Maidvelia,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
Is there a system-wide deflicker like in Priilloader's hash.ini, but for vWii?
A CBHC mod maybe?

Priiloader's one isn't system wide, it's only the Wii menus (or maybe that's what you meant?)

vWii is kind of a lost cause imo, it has colour issues that don't seem to be getting fixed any time soon. It would have been so nice to have a Wii U as an "all in one" machine covering 3 generations of Nintendo consoles with clean HDMI output, but that dream is gone for me. I've accepted this now.

I would recommend using an original Wii console with the Mayflash HDMI converter - its AV output quality is solid, and I tried a few others. Your display will have to upscale the 480p to 1080/4k, so the resulting image quality will be somewhat dependent on the video processor in your display. Or you could pair it with a mCable classic to have the mCable upscale to 1080p with its antialiasing and sharpening filters. I'm super curious to try one of these out myself. Actually I want one simply because according to this poster, mCable correctly converts 480p Rec.601 colours to Rec.709 colours for its 1080p output, which allows me to sidestep an issue where my TV's video processor incorrectly decodes 480p with Rec.709 coefficients, causing eg. Mario's hat to look duller and orange tinted. This always discouraged me from playing Wii, so if mCable can make a nice output with correct colours and good upscaling, this could be my preferred way to play Wii games (currently using Dolphin).
 

bobrocks95

Well-Known Member
Member
Joined
May 9, 2007
Messages
105
Trophies
1
XP
495
Country
United States
Priiloader's one isn't system wide, it's only the Wii menus (or maybe that's what you meant?)

vWii is kind of a lost cause imo, it has colour issues that don't seem to be getting fixed any time soon. It would have been so nice to have a Wii U as an "all in one" machine covering 3 generations of Nintendo consoles with clean HDMI output, but that dream is gone for me. I've accepted this now.

I would recommend using an original Wii console with the Mayflash HDMI converter - its AV output quality is solid, and I tried a few others. Your display will have to upscale the 480p to 1080/4k, so the resulting image quality will be somewhat dependent on the video processor in your display. Or you could pair it with a mCable classic to have the mCable upscale to 1080p with its antialiasing and sharpening filters. I'm super curious to try one of these out myself. Actually I want one simply because according to this poster, mCable correctly converts 480p Rec.601 colours to Rec.709 colours for its 1080p output, which allows me to sidestep an issue where my TV's video processor incorrectly decodes 480p with Rec.709 coefficients, causing eg. Mario's hat to look duller and orange tinted. This always discouraged me from playing Wii, so if mCable can make a nice output with correct colours and good upscaling, this could be my preferred way to play Wii games (currently using Dolphin).

I'm not interested in vWii, but ideally at some point in the future I hope someone can modify the system to globally disable the flicker filter just so you can have a stock system experience with real discs without having to boot into USBLoaderGX and fiddle with the menus.

Since it looks like USBLoaderGX does on-the-fly .dol patching based on the strings you all found, I have no idea if that's feasible or not though. I'd imagine when a game calls GXSetCopyFilter it ultimately sends commands straight to hardware registers or something quite low-level like that.
 

enarky

owls?
Member
Joined
Jul 31, 2003
Messages
1,240
Trophies
2
XP
2,341
Country
Afghanistan
Were there any new developments on dither patching since this post from @NoobletCheese? Tried it on Twilight Princess this morning and it seems to disable dither quite fine on the first glance, but from what I understand that's not an ideal method to disable dithering?

EDIT: Twilight Princess. Not Tears of the Kingdom. m(
 

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
Were there any new developments on dither patching since this post from @NoobletCheese? Tried it on Twilight Princess this morning and it seems to disable dither quite fine on the first glance, but from what I understand that's not an ideal method to disable dithering?

EDIT: Twilight Princess. Not Tears of the Kingdom. m(

I'm not sure it's possible to get a better result - the game seems to render in a smaller palette of 6 bits per RGB channel instead of 8, and the dithering hides it. So if you turn dithering off, it just reveals the game's small palette which means colour banding instead of smooth gradients.

The compromise was to leave dithering on and patch the vfilter to the lowest setting you can tolerate which blurs the dither pattern to hide it. I believe ULGX has low, medium & high presets for the vfilter, so try the low or medium one.

I'm still not sure how Wii is creating the dither pattern if it's only rendering 6 bits internally. Normally you'd need to render at a higher bit depth like 8 bits and then dither down to 6 bits. The dither pattern is based on the 8 bit values, so without those 8 bit values I'm not sure how Wii is doing it. The SDK says Wii uses 4x4 Bayer Dithering, which looks like this:

JdySy0.png


The top row is derived from the bottom row which is higher bit depth, so if that is the case then maybe Wii really does render 8 bits internally in which case why is it reducing it to 6 bits? Why not just output the 8 bits?

With Dolphin we can force 6 bit dithered games like Skyward Sword to 8 bits and there is no dither pattern at all, but it seems to introduce banding despite the tooltip saying it should reduce banding.

kKXw40.png


https://i2.lensdump.com/i/kKbrdK.png
https://i.lensdump.com/i/kKb04H.png

The above banding isn't as severe as disabling dithering by patching GXSetDither, so I'm not sure what's going on.

I did try patching the pixel format to 8 bit (GX_PF_RGB8_Z24) in the game's dol and it worked in Resident Evil 4 but then effects like water, fog, lighting etc. were not being rendered properly. Dolphin doesn't have this issue either so I'm not sure what's going on, maybe someone knowledgeable like @Extrems could comment?
Post automatically merged:

kKcynm.png

kKc55i.png

kKcaTo.png


So it looks like the game perhaps does render 8 bits internally, then for some reason dithers it down to 6 bits.

Otherwise I can't explain how Dolphin is able to render a smooth 8 bit undithered gradient, nor how the 6 bit dithered mode is able to produce a smooth gradient if it doesn't have 8 bit source values to construct the dither pattern from.

Well here's another scene where contrary to the above screenshots, Dolphin's force 8 bit mode results in severe banding:

a.png

b.png
 
Last edited by NoobletCheese,
  • Like
Reactions: enarky and JuanMena

enarky

owls?
Member
Joined
Jul 31, 2003
Messages
1,240
Trophies
2
XP
2,341
Country
Afghanistan
Thanks a lot, @NoobletCheese, for the very comprehensive answer to my question and the detailed example images with explanation. That must've taken quite some time to put together. Highly appreciated, thank you very much.

The way I see it right now I'd rather live with the banding effects than with the constant dither in every scene. I think I'll stay with the deflicker filter set to constantly off, I don't like the soft image it produces, even on low settings. But I didn't have a lot of time to play Twilight Princess with dither disabled yet, maybe I'll change my opinion later.

If the Wii indeed internally renders images in 8-bit and dithers it down for a 6-bit output somehwere in the chain then I'm curious if that's another issue that could be circumvented with a HDMI mod - meaning if that dithering happens again later in the chain like the LPF that causes the need for the 480p fix or if that happens earlier and output is identical for both, HDMI and component in this case.
 
  • Like
Reactions: NoobletCheese

Extrems

GameCube Wizard
Member
Joined
Jan 17, 2013
Messages
429
Trophies
1
Location
Quebec, Canada
Website
www.extremscorner.org
XP
2,980
Country
Canada
The dithering occurs at the end of pixel processing where the result is written to the embedded framebuffer.

The embedded framebuffer has 4 formats: R8G8B8Z24 (default), R6G6B6A6Z24 (necessary for many kinds of effects), R5G6B5Z16 with 3×MSAA (rare), and YCbCr 4:2:0 (practically unused).

All of these are then converted to YCbCr 4:2:2 for the external framebuffer.
 

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
At Skyward Sword's file select screen it appears the game is calling GXSetPixelFmt 6 times per frame, half the time with RGBA6_Z24 (reg3=1) and the other half with RGB8_Z24 (reg3=0). Seems to imply some elements are being rendered at 6 bits and others at 8 bits.

Binary for GXSetPixelFmt @ 803c1730:
Code:
8122FDD83CC080565467103A38C606D88109022C7C06382E7D0543785005077E50851EB890A9022C7C082840418200383CA0CC0138000061980580003803FFFE7C0400348009022C9005800080090254508025AC90090254800905FC60000004900905FC7C06382E28000004408200303803FFFC8089022450044D6C3C60CC01380000425004C00E908902243800006198038000800902249003800038000000B00900024E800020

If I patch all calls to GXSetPixelFmt to 8 bits it breaks the depth of field effect. If I patch only some calls to 8 bit, the scene appears ok.

But it depends on the scene being rendered - at the file select screen I have to patch only the very last call before frame is presented, but at the opening cinematic I have to patch all calls. Seems dithering and vfilter must be patched out as well for this to work.

So I think it will be possible to patch to 8 bit, it's just a matter of knowing which calls to patch. I tried looking at the value of GXSetPixelFmt's 2nd parameter (z_fmt) as an indicator of when to patch 8 bits, but couldn't glean any logic to it.

I looked at Dolphin's source code and couldn't figure out how it works either. If anyone want to investigate that here are some relevant strings to search: bForceTrueColor, GFX_ENHANCE_FORCE_TRUE_COLOR, RGBA6_Z24.

It's weird because the dithering pattern is barely visible in Dolphin, but on a Wii console on a TV it's more pronounced. Maybe it's the TV sharpener enhancing the dithering pattern, plus the larger screen size, and the downconversion to YCbCr 4:2:2. Those Dolphin screenshots I posted with 6 bit dithering don't look at all objectionable to me.
Post automatically merged:

Possibly the reason why people are having issues with dithering is due to the dither pattern being scaled to a non-integer. eg. 480p to 960p would be an 2x integer scale so the dither pattern is preserved - perfectly if nearest neighbour scaling is used (which I used for those screenshots). But 480p to 1080p is a 2.25x scale which might create some moire or interference patterns. I get this on Dolphin on my TV as well at certain resolutions or window sizes. Ideally dithering should be done at native resolution 1:1 pixel mapping. Even if you don't have visible moire or interference patterns the luminance of the dithered tone will still be wrong due to scaling of the dither pattern.
 
Last edited by NoobletCheese,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
This Dolphin developer blog also reports dithering can be necessary for textures to appear smooth:

https://dolphin-emu.org/blog/2016/1...report-october-2016/#last-months-contributors

But the reasoning they give is slightly different - "the textures were designed for RGBA6 and dithering".

In my experience you can add dithering noise on top of a posterized 6-bit texture and it will smooth it out somewhat, but the strength of the dithering needs to be so high that the image would get very noisey - a lot more noisey that the screenshots are showing. I think it's more likely the texture is 8-bits and GX is dithering it down to 6-bits. In this case only the intermediate tones would receive dithering noise at a contrast strength of +/- 6-bit step.

Another issue is if Dolphin renders higher resolution, the dither pattern becomes higher resolution too. So if you're rendering 2x (960p) in Dolphin and scaling to 1080p for the display, the dither pattern is getting a 1.125 scale and this can create some moire or asymmetrical patterns in the dithering.

Summary:

- if we use Dolphin's method of forcing 8-bit colour, we must tolerate banding/posterization on many textures
- if we disable dithering, we must tolerate banding/posterization on everything
- if we enable dithering, we have to be careful how we scale the video output to avoid corrupting the dither pattern
- if we enable dithering + vfilter, this will blur the dither pattern and make it less visible, but image is overall softer

The last option is more tolerable in Dolphin when rendering at a high resolution like 960p or 1440p. In this case the vfilter operates at the higher resolution too and doesn't soften the image very much, but still gets the added benefit of blending the [high resolution] dither pattern. But this requires manual patching, eg. Skyward Sword has vfilter off by default, so we'd have to patch the dol or make a cheat code just to force it on.
 
Last edited by NoobletCheese,
  • Like
Reactions: Brand Newman

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • sombrerosonic @ sombrerosonic:
    Rez how else am I suppose to make my horny AI who wants people to love it?
  • SylverReZ @ SylverReZ:
    Real women are better, AI isn't worth the trouble.
  • AncientBoi @ AncientBoi:
    Mine would be easy. All it has to do is bob it's head :D:evil::blush:
    +1
  • SylverReZ @ SylverReZ:
    Psi can make an AI babe lol.
    +1
  • K3Nv2 @ K3Nv2:
    I knew I should've bought the 50ft ethernet cord over the 25 lesson learned size matters
    +2
  • Bunjolio @ Bunjolio:
    vffvb gferwbgereg
  • AncientBoi @ AncientBoi:
    :O [☎️ Bunjolio's mother that he's swearing]
  • Bunjolio @ Bunjolio:
    she*
    +2
  • K3Nv2 @ K3Nv2:
    Fuck
    +1
  • J @ Just_Ragnar:
    What are mlc.bin files and are they important or can i delete them off my wii u sd card
  • AncientBoi @ AncientBoi:
    My apologies there little Miss @Bunjolio :mellow::blush::)
  • AncientBoi @ AncientBoi:
    Butt I'm still telling her :P
  • K3Nv2 @ K3Nv2:
    Never gonna give you upNever gonna let you downNever gonna run around and desert youNever gonna make you cryNever gonna say goodbyeNever gonna tell a lie and hurt you
  • AncientBoi @ AncientBoi:
    I don't recognise the song. Which one is it?
  • K3Nv2 @ K3Nv2:
    Sigma
  • SylverReZ @ SylverReZ:
    @Bunjolio, Sometimes people make mistakes, if you correct them then they'll remember.
  • SylverReZ @ SylverReZ:
    Try not to easily get offended if somebody calls you by different pronouns by mistake.
  • K3Nv2 @ K3Nv2:
    What I can't just call someone a dick or a vagina
  • AncientBoi @ AncientBoi:
    ... [looks up vagina] 🤓 🔎 📖 ] :O:ohnoes::ohnoes::ohnoes: 🤢🤮
  • K3Nv2 @ K3Nv2:
    Good thing I have a vagina
  • Materia_tofu @ Materia_tofu:
    Evil SylverReZ: "GuldRez"
    Materia_tofu @ Materia_tofu: Evil SylverReZ: "GuldRez"