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

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
Huh, sorry but i'm unable to load the custom dol in USBLoaderGX, the "alternate dol" option says "not required". This is the wrong option or what's going on?

You need to set it to 'load from SD/USB' and then in ULGX global settings Paths set DOL path to where your modded dols are.

There is an upcoming version of ULGX Enhanced version which does the patching automatically.
 

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
Alright... Someone already tried with the No More Heroes games? I guess they used a strong df cuz' they're really blurry.

It appears to be using the strongest filter 08 08 0A 0C 0A 08 08 -- a 50% blend with pixel above and below.

Replace 99 49 80 00 90 E9 80 00 99 49 80 00 91 09 80 00 41 82 00 40
With 99 49 80 00 90 E9 80 00 99 49 80 00 91 09 80 00 48 00 00 40

That should work for pretty much all games, but in the current test build of ULGX there are 2 patching options, the above one (which disables GXSetCopyFilter) and another option to only patch GXRenderModeObj->vfilters + rogue vfilters (ones that are floating around loosely inside the dol, such as found in Donkey Kong Country Returns and Sonic Colours).
 
Last edited by NoobletCheese,

SaulFabre

I like Yoshis and the Wii/Wii U scene.
Member
Joined
Feb 6, 2019
Messages
3,173
Trophies
1
Age
25
Location
Ecuador
Website
saulfabreg-wiivc.blogspot.com
XP
7,755
Country
Ecuador
Hey guys, just managed to increase brightness of the Spain (PAL) release of the Nintendo 64 game "Pokémon Snap" to make it similar to original N64 game.

I used the guidelines from this quote from @NoobletCheese:

@SaulFabre these are the vfilter offsets for Paper Mario PAL, so you can try modifying all of them to 00001520150000

ZZDugK.png


But again, this will cause clipping and also hue/saturation shifts like the clouds in Pokemon Snap.

You can avoid this and still get a brightness boost by increasing the peak brightness on your display instead.



Now I am confused about something... the function we're editing to disable the epilepsy filter is PowerPC 32-bit code, but N64 games aren't written in this code. I can only think of 2 explanations:

a) the epilepsy filter is written specifically for Wii console, or
b) Nintendo precompiled the N64 ROMs into PowerPC code

I seem to recall the original console had the filter too, so I'm leaning towards (b), but does anyone know the answer?

And these are the results:

poksnapSPAINdark.PNG poksnapSPAINnodark.PNG

Greetings ;)
 
  • Like
Reactions: iGom and Zorg07

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,384
Country
Spain
Pretty much every third party game uses the 08 08 0A 0C 0A 08 08 filter for 480p video format, and a chunk of second and first party games too.

This is why knowing how to disable it was so important to us.

The only games that use less aggressive filters are some internally developed Nintendo games, and the few 2d games with flat visuals like Wario Land or Rhythm Heaven, these last ones did not use any filter.
 
Last edited by Maeson,
  • Like
Reactions: SaulFabre and XFlak

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,384
Country
Spain
MM10 Normal 1.jpg MM10 Cheat 1.jpg
MM10 Normal 2.jpg MM10 Cheat 2.jpg

I got to create a Gecko Code that let us fix the width of Mega Man 10, so now we can play 9 and 10 correctly, combined with the 480p modification and removing the VFilter! It looks so much better now...

Here's the code:

Code:
WRXE
Mega Man 10

Game width1 640 to 512 4:3 [SuperrSonic & Maeson]
2046bb24 028001e0
0446bb24 020001e0
e0000000 80008000

Game width2 640 to 512 4:3 [SuperrSonic & Maeson]
2050d680 028001e0
0450d680 020001e0
e0000000 80008000

It is a variation of SuperrSonic's code for MM10. It took a bit to find the right spot, but it was worth it!
The first code is for 4:3, and it works great on real hardware.

Funny thing is, both 4:3 and 16:9 grab the data from the same place, but each require a different code to be made. My Wii is set to 4:3 so I haven't tried it yet. Just in case, here's a preliminar 16:9 code that might work:

Code:
WRXE
Mega Man 10

Game width1 492 to 512 16:9 [SuperrSonic & Maeson]
2046bb24 028001e0
0446bb24 029a01e0
e0000000 80008000

Game width2 492 to 512 16:9 [SuperrSonic & Maeson]
2050d680 028001e0
0450d680 029a01e0
e0000000 80008000

Here's SS' code for MM9, before it gets buried on the USB Loader GX thread:

Code:
WR9E
Mega Man 9

Game width1 640 to 512
203016b0 028001e0
043016b0 020001e0
e0000000 80008000

Game width2 640 to 512
2039b264 028001e0
0439b264 020001e0
e0000000 80008000
//Both must be enabled to work correctly. Wii must be set to 4:3 mode.

Game width1 492 to 512 (Wii set to 16:9)
203016b0 028001e0
043016b0 029a01e0
e0000000 80008000

Game width2 492 to 512 (Wii set to 16:9)
2039b264 028001e0
0439b264 029a01e0
e0000000 80008000
//Both must be enabled to work correctly. Wii must be set to 16:9 mode.
 
Last edited by Maeson,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
I got to create a Gecko Code that let us fix the width of Mega Man 10, so now we can play 9 and 10 correctly, combined with the 480p modification and removing the VFilter! It looks so much better now...


To me the second images look horizontally compressed.

I think the 256x240 is square pixels and needs to be horizontally widened by 10% to compensate for NTSC pixels being 10% skinnier than square.

I could be wrong, but if you check the original game I don't think it has such skinny looking sprites.

Screenshot from mobygames.com
341359-mega-man-9-xbox-360-screenshot-eight-new-mugshots-for-you.jpg


I don't know why VI's horizontal scaling is damaging the image in these Megaman games so much.

Test with Photoshop...

Original 256x240
ZgikZZ.png


Original > nearest neighbour > 512x480 > bilinear > 640x480
ZgiCum.png


Original > bilinear > 640x480
ZgiMgA.png


512x480 > VI scaling > 640x480
ZgioDQ.png

Note the left edge of the circle is thicker than the right.

The only way I can reproduce this kind of horizontal distortion in Photoshop is by:

256x240 > nearest neighbour > 320x240
ZgiyDP.png


256x240 > bilinear > 320x240
ZgiGWm.png
 
Last edited by NoobletCheese,

RodriGames40

Well-Known Member
Newcomer
Joined
Jun 9, 2021
Messages
50
Trophies
0
Age
23
Location
Miranda
XP
89
Country
Venezuela
Pretty much every third party game uses the 08 08 0A 0C 0A 08 08 filter for 480p video format, and a chunk of second and first party games too.

This is why knowing how to disable it was so important to us.

The only games that use less aggressive filters are some internally developed Nintendo games, and the few 2d games with flat visuals like Wario Land or Rhythm Heaven, these last ones did not use any filter.

Yeah, I just tested it with NTSC RE4 and... God, the difference was huge, you can even notice the low res textures with ease.
 

gZa

Well-Known Member
Newcomer
Joined
May 4, 2021
Messages
80
Trophies
0
Age
48
XP
750
Country
United Kingdom
Just done both Mario Kart Wii and Resident Evil 4 Wii. Didn't notice any real difference with MKW. Certainly not once my 4K TV has upscaled the Wii's component input. However the difference with RE4 is like night and day. Gonna hex edit Twilight Princess next.

Can I assume this hack is not necessary for games like Super Smash Bros. Brawl and Sonic and the Black Knight as they already have a built in option to toggle the filter on/off?!
 
Last edited by gZa,

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,384
Country
Spain
To me the second images look horizontally compressed.

I think the 256x240 is square pixels and needs to be horizontally widened by 10% to compensate for NTSC pixels being 10% skinnier than square.

I could be wrong, but if you check the original game I don't think it has such skinny looking sprites.

512x480 > VI scaling > 640x480
ZgioDQ.png

Note the left edge of the circle is thicker than the right.

I completely get it looks thinner than one would expect, but it does not suffer from that weird thing your circle picture shows, with certain lines being thicker than others, which is how the game originally is. And the screenshot of the menu you posted is from the Xbox 360 version, which might not help much in this case (but it shows how horribly blurry were the HD versions too).

You also have to have in mind that, while the supposed resolution of NES games was 256x240, theorically, many games did not use them. They tried to hide both horizontal extremes to hide garbage graphics and did not take the full 240p vertically either, so many were essentially showing a 240x224. Playing NES games at the correct 8:7 ratio gives very "thin" picture compared to what people is used to with their CRTs forcing 4:3 to everything.

I went ahead and made another shot with the cheat on for that circle.
MM10 Cheat Circle.jpg

And here's zoomed in:
MM10 Cheat Circle 2.jpg

With this width, there's no pixel weirdness horizontally. Maybe we could find another exact value that could help us, but right now it is the best result we can get.

I don't understand why they complicated this matter so much either.

Edit: There's difference with Mario Kart Wii, but as mentioned, some Nintendo-made games use a less aggressive filter

Edit: Okay, SCRATCH ALL THAT. It might be the capture card.

Edit Electric Boogaloo: It was the capture card playing pranks.

damnyoucapturecard.png

On the left, the capture card. On the right, how it actually looks on the TV (photo taken with my phone). So it is actually correct, it's just that the capture card might get funky with the resolution on this game. What a stupid mistake on my part.

I was starting to get paranoid because when I played with the cheat on (and I did so for an hour) it looked remarkably similar to how NES Megaman games look emulated on the same device (although at 240p and scaled through the OSSC to 960p, just like with 480p content).

I might need to change the resolution depending on what I capture I suppose.
 
Last edited by Maeson,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,083
Country
United States
Despite the awesomeness of the cheat codes, I'm still not satisfied with the presentation of Megaman 9.

Basically, all of the display modes are still wrong to various extents. There is no one mode which has correct geometry and no scaling artefacts, so we have to pick a compromise.

With Wii set to 4:3 we have 2 options:

1. No cheatcode, slightly wide graphics, moderate scaling artefacts
2. Cheatcode, quite skinny graphics, no scaling artefacts

With Wii set to 16:9 we have 2 more options:

3. No cheatcode, slightly wide graphics, horrendous scaling artefacts
4. Cheatcode, even wider graphics, no scaling artefacts

For me it's a tossup between 1 and 4. I don't think I could tolerate 2, and 3 is completely off the table.

For a game created in 2008 from scratch by Capcom, I find it confusing why they couldn't create a simple 256x240 raster while they were also putting out games like Street Fighter IV. Megaman 9 was not a SNES/PSX port or an old game, it was a brand new Megaman game created from scratch by a team of 20 people, and somehow manages to look worse than the old Megaman games. Somehow this scaling issue was not picked up in testing. I can only speculate their test display may have been 4:3 which has only moderate scaling artefacts, but surely they would have seen them in the 16:9 mode.
 
Last edited by NoobletCheese,
  • Like
Reactions: Maeson

Brand Newman

Well-Known Member
Member
Joined
Apr 29, 2014
Messages
555
Trophies
1
Age
43
Website
twitter.com
XP
3,341
Country
France
Despite the awesomeness of the cheat codes, I'm still not satisfied with the presentation of Megaman 9.

Basically, all of the display modes are still wrong to various extents. There is no one mode which has correct geometry and no scaling artefacts, so we have to pick a compromise.

Guys, you're on fire! Every time I come back to this thread, good news keep coming! Thank you very much for putting so much effort in a 15 year-old (yes, indeed) console!

Now, I have tested @SuperrSonic and @MaeseJesus codes both on Wii and Dolphin, and I think the Dolphin screenshots are a bit deceptive.

As far as I'm concerned, the Wii stretches the picture to 4:3 or 16:9 "corrected" ratio (depending on my settings) so it doesn't seem vertically wrong, something that Dolphin obviously doesn't.

So I can say that, on real hardware at least, aspect ratio is right for me, and that the picture does look better, with Megaman's face not being slightly distorted every step he makes. :lol:

On another subject, I take the opportunity to ask wether your current work can apply to the bilinear filter some games seem to have on them.

I have discussed it a bit with @MaeseJesus before, but one game I particularly like looks so much blurry, even on Dolphin emulation, that it ruins the beautiful 2d 16 bits pixel art it has on it, and that game is Samurai Shodown Anthology.

One might ask "why bother?", since the four individual games are on virtual console and can be displayed at real 240p, not to mention the collection available on various platforms.

But the anthology has two things the other ports lack, and these are :
  • training mode,
  • and the wonderful "arranged soundtrack" from the neogeo cd system, including the one that was specially done for Samurai Shodown V, a game that never made it to NGCD to begin with.
  • Oh, and of course there's Samurai Shodown VI, but that game is pretty bland compared to the previous entries.
Now, the thing with the anthology is that the picture is degraded by a very aggressive bilinear filter, as evidenced by the Dolphin screenshots below
y7DKN2F.png

tExk2ld.png

2BI0MhV.png

H4EHF1f.png


And then there's SSVI, which in addition seems to have downgraded 2d sprites (look at Earthquake's head and chain, it looks like a jpeg picture)
ZvRTaFM.png


It's a shame these games had to suffer from such a graphical downgrade (moreover since they don't seem to have as much pixel deformation as Metal Slug does), and I was wondering if there'd be any solution to remove the bilinear filter, or at least reduce it a bit?

Anyway, thanks again for this wonderful thread, I can't wait to see your progress and replay my old games with these improvements!
 
  • Like
Reactions: iGom and Maeson

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,384
Country
Spain
Okay, for parts...

About MM9 & MM10 codes...

What I'm going to say is in no way attempting to prove you wrong or say that your opinion is wrong, NoobletCheese, but as I said on a prior post, that you find the games with the cheat codes "thin" might had to do more with you being used to how games used to look on TVs than what the real aspect ratio of the games have.

14001346425_41b6ae33aa_o.png


The vast majority of us played games stretched to 4:3 because that's what TVs tend to do, which gives the picture a much wider than taller form. But the truth is that NES, SNES, PC-Engine, some Mega Drive and other systems output a 8:7 image. When I got the OSSC, this was the first thing I had to wrestle around with because I was so used to 4:3, although now I find 8:7 to be much more pleasing to me even if it takes less of the screen.

You can very easily see the difference between these with Mega Drive games. Games like Sonic are using the full horizontal 320 pixels, while other games, like Shining Force 2 use 256. Thus, when playing Shining Force 2 without correcting the picture, it will look stretched horizontally. Here's another quick example of what 4:3 does to graphics.

What makes this a bit more extreme with some NES games, including the Mega Man games (and these Wiiware titles try to emulate it), it's that many of them used the horizontal borders of the screen to hide garbage graphics that games load, most often the right side, and very often the ones to do it are games with heavy horizontal scrolling.

Super Mario 3 for example has always on the right side a vertical 16x16 pixel row of garbage data, that depending on your TV it could be hidden, or not. Because of that, those games aren't really made to be seen in a 256x224 fashion, but in a 240x224 fashion.

Here's a couple of screenshots, from MM1 and MM6, taken from RetroArch.

MM6.png MM1.png

And here's another one from a game that works with the full 256 pixels:

FF3.png

When I play MM 9 and 10 and compare it to how I see the NES games on my TV (playing with the 8:7 aspect ratio) they look very, very similar.

Now with all that said, we can try to get a fatter image that still has good scaling, I have absolutely no issue with giving that a try. It'd be nice to cover more options. Maybe bumping 512 to 576 could do the trick, but I have no time for it right now, later today I'll experiment.

Edit: Nope, 576 gives us bad scaling. 544 too. this might be more complicated...

About Samurai Shodown:

I've meant to look at it, but between the N64 Dark filter stuff, and the Mega Man 9/10 stuff I haven't got much time to look at it.

Cleaning the picture will not be much of an issue, just disabling GXSetCopyFilter (and then forcing the game to be 480p through USB Loader GX. The issue will be if the games are not well scaled, like the Metal Slug anthology, then we should first try the less invasive filters and see if the end result is worth it. I guess we could try doing something similar to what we've doing for MM9&10, but I can't promise it will work...The fact that it works with these two still surprises me.
 
Last edited by Maeson,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @BakerMan, I have a piano keyboard but I never use it