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

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
easiest way to get gameid is probably wit ID "file.iso" or "file.wbfs"

Code:
$ wit ID "Super Mario Galaxy (USA) (En,Fr,Es).iso" 
RMGE01
 

XFlak

Wiitired but still kicking
Member
Joined
Sep 12, 2009
Messages
13,811
Trophies
3
Age
38
Location
Cyprus, originally from Toronto
Website
modmii.github.io
XP
9,801
Country
Cyprus
edit2: it seems there are more games that don't use main.dol:

Mortal Kombat Armageddon: MK7.dol
Red Steel: redsteel.dol
Medal of Honor 2: game.dol
House of the Dead 2: hod2.dol
SSX Blur: ssx.dol
Super Swing Golf: PangyaRev.dol
Wii Sports Resort: player.dol
Madden NFL 07: madden.dol
Madden NFL 08: maddens.dol
Metal Slug Anthology: ms6.dol
Metroid Prime: Trilogy: rs5mp1_p.dol

However the page I got these from seems to indicate 'use alternate DOL' should work. I will test and report back...
Some games actually have more than 1 dol; for example, before the issue of IOS reloading was resolved, the only way to play "House of the Dead 2 & 3 Return" was by selecting the alt dol for the game you wanted to play within the loader before launching the game. So if you wanted to play house of the dead 2, you had to select hod2.dol, and if you wanted to play hod3 you had to select a different dol (presumably hod3.dol, but working from memory). You could not return to the game's main menu and switch between hod2 & hod3 without exiting, returning to the loader and selecting a different alt dol. If I recall correctly, some loaders even had the option to allow you to select which dol to load from within the game image itself, so you didn't need to extract the dols and keep them in a separate folder. All this was rendered moot when d2x solved the IOS reloading issue, now we typically just load up the main dol, and then when the game loads hod2.dol or hod3.dol depending on what the user selects at the title screen, it doesn't actually reload the IOS so it works seamlessly, allowing you switch between hod2 and hod3 without returning to the loader and messing with alt-dols.

Edit: apologies if I'm telling you things that you already know
 
Last edited by XFlak,

mive

Well-Known Member
Member
Joined
Jul 19, 2018
Messages
252
Trophies
0
Age
40
XP
598
Country
Germany
i checked some games, it seems if it uses a files folder its likely, that it has another dol besides main.dol:
but there's also RSBE01 (Super Smash Brawl)which has many main dols (but some seem to be the same so they have the same offset). also hod3.dol is the same as main.dol
Code:
mv@mv-pc:/tmp$ find . -type f -name *.dol -print | while read f; do echo "$f: $(~/Datengrab/Wii/Project/Disable_Vilfter/py_disable_GXSetCopyFilter.py -i "$f" --check)"; done
./RT5E8P/DATA/sys/main.dol: GXCopyFilter: set (offset: 2256980)
./RT5E8P/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./SEUPEY/sys/main.dol: GXCopyFilter: set (offset: 1514272)
./RB4E08/DATA/sys/main.dol: GXCopyFilter: set (offset: 1620964)
./RB4E08/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./RWCE4Z/sys/main.dol: GXCopyFilter: set (offset: 847800)
./SNJE69/DATA/sys/main.dol: GXCopyFilter: set (offset: 604016)
./SNJE69/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./SS9JMS/DATA/sys/main.dol: GXCopyFilter: set (offset: 730432)
./SS9JMS/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./SILE78/sys/main.dol: GXCopyFilter: set (offset: 2190736)
./SV4E8P/files/sys/mpls_movie/player.dol: GXCopyFilter: set (offset: 494880)
./SV4E8P/sys/main.dol: GXCopyFilter: set (offset: 3055456)
./RSBE01/P-HBLE/sys/main.dol: GXCopyFilter: set (offset: 698756)
./RSBE01/P-HBKE/sys/main.dol: GXCopyFilter: set (offset: 698756)
./RSBE01/P-HBIE/sys/main.dol: GXCopyFilter: set (offset: 242500)
./RSBE01/P-HBGE/sys/main.dol: GXCopyFilter: set (offset: 242500)
./RSBE01/P-HBFE/sys/main.dol: GXCopyFilter: set (offset: 242500)
./RSBE01/P-HBEE/sys/main.dol: GXCopyFilter: set (offset: 225548)
./RSBE01/P-HBDE/sys/main.dol: GXCopyFilter: set (offset: 218504)
./RSBE01/P-HBCE/sys/main.dol: GXCopyFilter: set (offset: 225520)
./RSBE01/P-HBBE/sys/main.dol: GXCopyFilter: set (offset: 226164)
./RSBE01/P-HBAE/sys/main.dol: GXCopyFilter: set (offset: 224448)
./RSBE01/P-HA9E/sys/main.dol: GXCopyFilter: set (offset: 218504)
./RSBE01/P-HA8E/sys/main.dol: GXCopyFilter: set (offset: 218504)
./RSBE01/DATA/sys/main.dol: GXCopyFilter: set (offset: 1996972)
./RSBE01/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./RJZP7U/sys/main.dol: GXCopyFilter: set (offset: 1331696)
./RVSE69/DATA/sys/main.dol: GXCopyFilter: set (offset: 4933516)
./RVSE69/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./R4QE01/sys/main.dol: GXCopyFilter: set (offset: 3799320)
./RMCP01/CHANNEL/sys/main.dol: GXCopyFilter: set (offset: 389872)
./RMCP01/DATA/sys/main.dol: GXCopyFilter: set (offset: 1486048)
./RMCP01/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./RZZE8P/sys/main.dol: GXCopyFilter: set (offset: 3261756)
./S72E01/files/vc/SF_sdx/SF_sdx.dol: GXCopyFilter: set (offset: 278848)
./S72E01/files/vc/SF_kby3/SF_kby3.dol: GXCopyFilter: set (offset: 278736)
./S72E01/files/vc/GB_kby2/GB_kby2.dol: GXCopyFilter: set (offset: 533168)
./S72E01/files/vc/GB_kby1/GB_kby1.dol: GXCopyFilter: set (offset: 533168)
./S72E01/files/vc/FC_yume/FC_yume.dol: GXCopyFilter: set (offset: 241120)
./S72E01/files/vc/64_k64/64_k64.dol: GXCopyFilter: set (offset: 757824)
./S72E01/sys/main.dol: GXCopyFilter: set (offset: 202656)
./RGSE8P/DATA/sys/main.dol: GXCopyFilter: set (offset: 1891724)
./RGSE8P/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./SF8P01/DATA/sys/main.dol: GXCopyFilter: set (offset: 4836412)
./SF8P01/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./R69E36/DATA/sys/main.dol: GXCopyFilter: set (offset: 1803036)
./R69E36/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./R26E5G/sys/main.dol: GXCopyFilter: set (offset: 803784)
./RS4EXS/sys/main.dol: GXCopyFilter: set (offset: 3477284)
./RBRP5G/sys/main.dol: GXCopyFilter: set (offset: 1790316)
./R6REJH/DATA/sys/main.dol: GXCopyFilter: set (offset: 4429168)
./R6REJH/UPDATE/sys/main.dol: GXCopyFilter: not found (offset: None)
./RHOE8P/sys/main.dol: GXCopyFilter: set (offset: 3418784)
./RSXE69/files/ssx.dol: GXCopyFilter: set (offset: 3462552)
./RSXE69/sys/main.dol: GXCopyFilter: set (offset: 108784)
./RHDE8P/files/ZExec/hod3.dol: GXCopyFilter: set (offset: 1450312)
./RHDE8P/files/ZExec/hod2.dol: GXCopyFilter: set (offset: 1114604)
./RHDE8P/sys/main.dol: GXCopyFilter: set (offset: 1450312)
 
  • Like
Reactions: NoobletCheese

QuintanaSonBlade

Member
Newcomer
Joined
Jul 23, 2020
Messages
8
Trophies
0
Age
38
Location
Argentina
XP
78
Country
Argentina
See post #119.

edit: apologies if I didn't explain enough -- I saw you were already patching WADs so I assumed you had the prerequisite knowledge. Basically you want to extract /sys/main.dol from the iso/wbfs using a tool such as WiiBackupFusion (GUI) or WIT (command line) using the command:
Code:
wit extract "C:\Games\Game.wbfs" "C:\Extracted" --files +/sys/main.dol --overwrite --flat

Then open it in a hex editor such as HxD and do a 'find and replace' on the string in post #119.

Then either:
a) copy the modified main.dol into /sys/ where WiiBackupFusion extracted the image to, then rebuild the image with WiiBackupFusion, or
b) rename main.dol to GameID.dol where GameID can be found from many places, such as gametdb.com/titles.txt, then copy to a folder on SD/USB drive and point the USB game loader to that folder and enable 'use alternate dol' for that game.

I'm working on a GUI to automate all this, but it's turning out to be way more complicated than I initially planned due to all these little caveats here and there (the goalposts keep moving). Aiming to have it finished in 2-3 weeks.


Thanks for the detailed information. I just got confused when trying to patch the GXSetCopyFilter, I didn't know if it was possible to change such a large table of values; sorry i don't have much patching experience. With your instructions I managed to do it in Fire Emblem!
On the other hand in the Muramasa game I applied the parameters 08080A0C0A0808 and 04080C100C0804, although it looks sharper, I suspect that the menus and 2d layers could be seen better. Could it be that I have another filter activated?
 

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
On the other hand in the Muramasa game I applied the parameters 08080A0C0A0808 and 04080C100C0804, although it looks sharper, I suspect that the menus and 2d layers could be seen better. Could it be that I have another filter activated?

Patching those 2 vfilter strings shouldn't be necessary anymore. I think patching setcopyfilter is going to be more reliable, as its the one and only function which sets the vfilter according to the Nintendo manual.

Whereas patching vfilters relies on an assumption that the game is going to pass one of them as an argument to setcopyfilter, which we've seen doesn't always happen.

I haven't tested Muramasa yet, but if you've patched setcopyfilter in main.dol and all other dols inside the image, I'd be very surprised if the filter was still enabled. The only way to get absolute proof is to use a capture card or take screenshots in Dolphin.
 

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,388
Country
Spain
Of the list posted above, I know Metal Slug Anthology does in fact work with editing the VFitlers, because when I removed them (and forced the game to progressive scan) I discovered that the aspect ratio is not 1:1, so that might be why the filters were put. The only game on that collection to work differently is in fact 6, and now I know why, it loads a different dol for that specific game.

Wii Sports Resort "player.dol" shouldn't be part of the game, it is on the Motion Plus movie folder.

I'm copying my Metroid Prime Trilogy game to check the extra dol and see if it makes a difference, but it will took a while as it is a double layered disc.

While that gets dumped I'll be disabling the "GXSetCopyFilter" of my dols.

Edit: Oh, and I mentioned in the past that I would make a list with Wiiware/VC games that had updates. I completely forgot to post what I found. Here:

Code:
Animal Life - Doubutsu Fureai Seikatsu (1.1)
Bit.Trip Beat          (v256)
Cave Story              (v258)
Dr.Mario                (v256)
Excitebike: World Rally (v512 USA, other regions have 1 version)
Family & Friends Party    (v257 USA, v258 Europe)
Final Fantasy M.L.A.A.K.(v256 Japan)
Gradius Rebirth         (v257 USA & Europe, v256 Japan)
Jett Rocket                (V512 Europe)
Kotoban No Puzzle        (v2 Japan)
La Mulana                (v257 Japan, other regions have 1 version)
Lost Wind Winter of Mel.(v257 Europe, other regions have 1 version)
Max & The Magic Marker  (v256 Europe, other regions have 1 version)
My Pokémon Ranch        (v256 USA)
Okiraku Daifugou Wii    (v257 Japan)
Okiraku Sugoroku Wii     (V5   Japan)
Rakugaki Hero            (v256 Japan)
Sonic The Hedgehog 4    (v256 Japan)
Texas Hold'em Tournmnt. (v256 Europe)
TV Show King            (v256 USA)


Emeraldia VC Arcade            (v256, only released in Japan)
Fighting Street TGCD        (v256 Japan, others only have 1 version)
Fire Emblem Seisen no Keifu (V256, only released in Japan)
Star Blade                    (v257 Japan)

Edit 2:

Okay, Metroid Prime Trilogy has several extra dols (pal version used here):

rs5fe_p.dol
rs5mp1_p.dol
rs5mp2_p.dol
rs5mp3_p.dol

The "GXSetCopyFilter" string found by NoobletCheese can be found in all four of them. I'll edit them and put the modified game onto my USB and see what happens.

Edit 3:

Yup, they look unfiltered now. You can change between games with no issue too! I guess the Main.dol now is only useful for the profile selection now lol.

Edit 4: Yesterday I was playing around with the video width on the Megaman 9 "main.dol" and I did see nothing through dolphin, but on real hardware I installed by error that version and, it actually looks like it cut the screen on both sides instead of breaking or glitching the screen, interesting.

I guess we can't "unstretch" the game that way anyaway.
 
Last edited by Maeson,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
I have played a couple of hours of RE4 now, and am really enjoying the sharper picture (and great motion controls!). But the game uses lots of dithering, which doesn't look that good. I am guessing the (de)flicker filter hides it normally, but without it, the dithering is too much.
Would it be possible to do a similar hex edit to remove the dithering? With Swiss it is possible to remove alpha dithering, so I was thinking this might also be possible?
btw I created a separate thread on the dithering https://gbatemp.net/threads/disable-dithering-via-hex-editing.558951/

I wanted to add, that while Resident Evil 4 has noticeable dithering when removing the filters, it still looks better to me, and specially on 16:9, as what the game does on that setting is to zoom in into the original 4:3 viewable area, which made it look HORRIBLE, with huge pixels and extreme blurriness. With filters removed it looks much more acceptable to me.


Got around to patching GXSetDither, however it's probably not something you'll want to do as it causes banding, weird hues and a bit of black crush.

A compromise I settled on was to set the vfilter to half strength (04041010100404 -- the one used by Donkey Kong Returns).

i.e in a hex editor replace all 08080A0C0A0808 with 04041010100404.

If you're curious to see what it looks like without dithering, you can replace

XXXXXXXX3C80CC0138A000613800000080C702205066177A98A4800090C4800090C70220B00700024E800020

with

480000283C80CC0138A000613800000080C702205066177A98A4800090C4800090C70220B00700024E800020

(note: X is not the same for every game).

I only tested this with Resident Evil 4 Wii Edition.

There's also another func called GXPokeDither which probably needs patching too if other games are using it, but it seems a moot point to me.

A better solution would be to patch GXSetPixelFmt to a higher bit depth (GX_PF_RGB8_Z24 -- 8-bit for each RGB value) then we should be able to turn dithering off and have no colour problems since dithering is only used for games which render in 6-bits or less (GX_PF_RGBA6_Z24 or GX_PF_RGB565_Z16).

Dolphin appears to support this with its 'force 24-bit color' setting. Curiously, Dolphin is not showing noticeable dithering artefacts even when this setting is unticked. But the ticked setting does improve it slightly. I'm not sure what's going on there, although I doubt it's as simple as changing a single value like that, otherwise the game devs would have done it, or it would affect performance somehow. Surely?
 
Last edited by NoobletCheese,
  • Like
Reactions: enarky and Draxikor

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,388
Country
Spain
I tried it without dithering for a few moments and, I find it looks really nice... on small areas. For example on 1-2, with that big exterior area the banding was easy to notice if you look at far away places, but in interiors is pretty clean. I'll try now the 04 04 10 10 10 04 04 filter.

Edit: With the aforementioned filter is... kinda like a middle road. I can still see the dithering if I stop and look, but it's more subdued than with an unfiltered dol. It's less sharp, but it's far from how blurry it looked originally.

I guess it'd be the choice for most.
 
Last edited by Maeson,
  • Like
Reactions: Draxikor

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
Edit: With the aforementioned filter is... kinda like a middle road. I can still see the dithering if I stop and look, but it's more subdued than with an unfiltered dol. It's less sharp, but it's far from how blurry it looked originally.
I guess it'd be the choice for most.

I'm flip flopping on it... seem to prefer unfiltered now? Maybe I'll just pretend the dithering artefacts are cool and retro :D

Checked the GameCube version and it has the same problem, plus it only runs in a 16:9 window letterboxed into a 4:3 frame, and there's no way to change it other than using the display's aspect controls to zoom in (which ends up looking the same as Wii version).

Tried patching GXSetPixelFmt. Oddly, the game's menus and 2D assets render correctly without dithering artefacts, but the 3D viewport has bad RGB levels. I'm not really patching it though, just skipping it (changing its first line to branch to end of function).

I'd like to patch the first argument to GX_PF_RGB8_Z24 but it requires adding an extra line to the top of the function, which then corrupts the dol's section offsets and it crashes.

I think what I need to do is add my own .text section to the dol and make it branch to that, which would contain my own custom version of GXSetPixelFmt. Is this how cheat engines do it?

Another option might be to sacrifice one line of code somewhere in the function, to open up a space to put the new line in.
 
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
Actually PS1 games had that dithered look...

Z8gAbQ.png


Just pretend it's a retro PS1 game, problem solved :)
 

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,388
Country
Spain
Yes PS1 games with 3D visuals had heavy dithering. In fact, I've been replaying Tenchu 1 again and it was the first thing I noticed (well, besides the super low depth of view, but that's intentional). On PS2 there's a way to play PS1 games with smoothed out visuals, which can help with it for games that are not cartoony (or sprite-based games with lots of zoom-in and zoom-out camera effects too).

And yes, The original GC version of RE4 originally was "letterboxed" because developers (I think it was the director, Mikami?) thought that it made the game more "cinematic". Personally I think it was a trick to help the game perform decently by making the viewable area smaller and passing that as an artistic choice. Games like Zelda have dynamic black bars for "cinematic effect" when you Z-target but they an after-effect, with RE4 the game is literally like that.

This has been a constant issue throughout pretty much all the ports of this game. You can read about people talking about the so called "Black Bars" being annoying for years and years, on GC, on PS2, on Wii, on PS3 and Xbox 360... I don't know much of PS4/Xbox One/Switch versions or the most current PC port though. And the original PC port was a disaster with issues far more important than this...

Curiously enough, the default RE4 Wii on Widescreen looks HORRIBLE. As you said and I mentioned on this forum before, it's because it just zooms in into the small viewable area of the original 4:3 aspect ratio, but when you play 16:9 unfiltered you get a far better picture than I expected by just zooming in.

In any case the dithering wasn't much of an issue for me (specially being used to the PS1), and with DKCR's filter as I said we get an ok compromise between both ends. I should find some time to do another Mine Launcher playthrough again. That was a hoot on the Wii version thanks to the IR aiming.

I got a couple of more games' main.dol edited, Trackmania and Samurai Warriors: Katana, (which I found surprisingly fun for how "out there" was to translate a musou game into an "on rails arcade shooter" style game); but I don't know if it's worth writing down the filters' offsets anymore now that we can disable the function from the "root".

It feels like a much more universal and simple solution, with games like "Everybody's Golf" being a handful of exceptions...
 
Last edited by Maeson,

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
I'd like to patch the first argument to GX_PF_RGB8_Z24 but it requires adding an extra line to the top of the function, which then corrupts the dol's section offsets and it crashes.
Another option might be to sacrifice one line of code somewhere in the function, to open up a space to put the new line in.


As it turns out there are some unneeded lines which can be removed in some of the relevant functions, so we can put our own lines to overwrite the function arguments. This lets us patch pixel format to GX_PF_RGB8_Z24 and texture destination format to GX_TF_CMPR, then we are in 8-bit mode with no filter and no dithering.

However some shadow effects are rendering a bit incorrectly, so it's still not a proper solution like Dolphin's 'force 24-bit' mode.

If you're curious to know what it looks like though, here is the procedure (only for RE4):

1. Disable GXSetCopyFilter
Replace

2C 03 00 00 41 82 00 F8 89 04 00 00 38 00 00 00 89 44 00 01 38 60 00 00 51 00 07 3E 88 E4 00 06 51 40 26 36 89 04 00 0C 50 E3 07 3E 38 E0 00 00 51 07 07 3E 89 44 00 0D 89 64 00 07 39 00 00 00 51 47 26 36 89 44 00 02 89 24 00 12 51 63 26 36 51 40 45 2E 89 44 00 0E 51 28 07 3E 89 24 00 13 51 47 45 2E 89 44 00 03 51 28 26 36 89 24 00 14 51 40 64 26 89 44 00 0F 51 28 45 2E 89 24 00 15 51 47 64 26 89 44 00 04 89 64 00 08 51 28 64 26 51 40 83 1E 89 44 00 10 89 24 00 16 51 63 45 2E 89 64 00 09 51 47 83 1E 89 44 00 05 51 28 83 1E 89 24 00 11 51 63 64 26 89 64 00 0A 51 40 A2 16 89 44 00 0B 51 27 A2 16 88 84 00 17 39 20 00 01 51 63 83 1E 51 43 A2 16 50 88 A2 16 51 20 C0 0E 39 40 00 02 39 20 00 03 38 80 00 04 51 43 C0 0E 51 27 C0 0E 50 88 C0 0E 48 00 00 24 3D 00 01 66 3C 60 02 66 3C E0 03 66 3C 80 04 66 38 08 66 66 38 63 66 66 38 E7 66 66 39 04 66 66 3D 20 CC 01 39 40 00 61 99 49 80 00 2C 05 00 00 38 80 00 53 39 60 00 00 90 09 80 00 38 00 00 54 39 80 00 00 50 8B C0 0E 99 49 80 00 50 0C C0 0E 90 69 80 00 99 49 80 00 90 E9 80 00 99 49 80 00 91 09 80 00 41 82 00 40

with

2C 03 00 00 41 82 00 F8 89 04 00 00 38 00 00 00 89 44 00 01 38 60 00 00 51 00 07 3E 88 E4 00 06 51 40 26 36 89 04 00 0C 50 E3 07 3E 38 E0 00 00 51 07 07 3E 89 44 00 0D 89 64 00 07 39 00 00 00 51 47 26 36 89 44 00 02 89 24 00 12 51 63 26 36 51 40 45 2E 89 44 00 0E 51 28 07 3E 89 24 00 13 51 47 45 2E 89 44 00 03 51 28 26 36 89 24 00 14 51 40 64 26 89 44 00 0F 51 28 45 2E 89 24 00 15 51 47 64 26 89 44 00 04 89 64 00 08 51 28 64 26 51 40 83 1E 89 44 00 10 89 24 00 16 51 63 45 2E 89 64 00 09 51 47 83 1E 89 44 00 05 51 28 83 1E 89 24 00 11 51 63 64 26 89 64 00 0A 51 40 A2 16 89 44 00 0B 51 27 A2 16 88 84 00 17 39 20 00 01 51 63 83 1E 51 43 A2 16 50 88 A2 16 51 20 C0 0E 39 40 00 02 39 20 00 03 38 80 00 04 51 43 C0 0E 51 27 C0 0E 50 88 C0 0E 48 00 00 24 3D 00 01 66 3C 60 02 66 3C E0 03 66 3C 80 04 66 38 08 66 66 38 63 66 66 38 E7 66 66 39 04 66 66 3D 20 CC 01 39 40 00 61 99 49 80 00 2C 05 00 00 38 80 00 53 39 60 00 00 90 09 80 00 38 00 00 54 39 80 00 00 50 8B C0 0E 99 49 80 00 50 0C C0 0E 90 69 80 00 99 49 80 00 90 E9 80 00 99 49 80 00 91 09 80 00 48 00 00 40
2. Disable dithering
Replace

80E2BB783C80CC0138A000613800000080C702205066177A98A4800090C4800090C70220B00700024E800020

with

480000283C80CC0138A000613800000080C702205066177A98A4800090C4800090C70220B00700024E800020
3. Set pixel format to GX_PF_RGB8_Z24
Replace

81 22 BB 78 3C C0 80 2F 54 67 10 3A 38 C6 6B 80 81 09 02 2C 7C 06 38 2E 7D 05 43 78 50 05 07 7E 50 85 1E B8 7C 08 28 40 90 A9 02 2C 41 82 00 38 3C A0 CC 01 38 00 00 61 98 05 80 00 38 03 FF FE 7C 04 00 34 80 09 02 2C 90 05 80 00 80 09 02 54 50 80 25 AC 90 09 02 54 80 09 05 FC 60 00 00 04 90 09 05 FC 7C 06 38 2E 28 00 00 04 40 82 00 30 38 03 FF FC 80 89 02 24 50 04 4D 6C 3C 60 CC 01 38 00 00 42 50 04 C0 0E 90 89 02 24 38 00 00 61 98 03 80 00 80 09 02 24 90 03 80 00 38 00 00 00 B0 09 00 02 4E 80 00 20

with

38 60 00 00 38 80 00 00 81 22 BB 78 3C C0 80 2F 54 67 10 3A 38 C6 6B 80 81 09 02 2C 7C 06 38 2E 7D 05 43 78 50 05 07 7E 50 85 1E B8 7C 08 28 40 90 A9 02 2C 41 82 00 38 3C A0 CC 01 38 00 00 61 98 05 80 00 38 03 FF FE 7C 04 00 34 80 09 02 2C 90 05 80 00 80 09 02 54 50 80 25 AC 90 09 02 54 80 09 05 FC 60 00 00 04 90 09 05 FC 7C 06 38 2E 28 00 00 04 40 82 00 30 38 03 FF FC 80 89 02 24 50 04 4D 6C 3C 60 CC 01 38 00 00 42 50 04 C0 0E 90 89 02 24 38 00 00 61 98 03 80 00 80 09 02 24 90 03 80 00 4E 80 00 20
4. Set texture copy destination format to GX_TF_CMPR
Replace

94 21 FF D0 7C 08 02 A6 80 E2 BB 78 2C 05 00 13 90 01 00 34 38 00 00 00 7C 69 1B 78 7C 88 23 78 93 E1 00 2C 54 BF 07 3E 93 C1 00 28 7C DE 33 78 93 A1 00 24 93 81 00 20 98 07 02 50 40 82 00 08 3B E0 00 0B 2C 05 00 26 41 82 00 1C 40 80 00 30 2C 05 00 04 40 80 00 28 2C 05 00 00 40 80 00 08 48 00 00 1C 38 00 00 03 80 67 02 4C 50 03 7B E0 3B A7 02 4C 90 67 02 4C 48 00 00 18 38 00 00 02 80 67 02 4C 50 03 7B E0 3B A7 02 4C 90 67 02 4C 54 A0 E7 FE 7C A3 2B 78 98 07 02 50 7D 05 43 78 83 82 BB 78 7D 24 4B 78 80 1D 00 00 53 E0 07 38 38 C1 00 10 38 E1 00 0C 90 1D 00 00 39 01 00 08 48 00 0D 81 38 00 00 00 38 60 00 00 90 1C 02 48 38 00 00 4D 80 A1 00 10 80 81 00 08 7C 85 21 D6 50 83 05 BE 50 03 C0 0E 90 7C 02 48 80 1D 00 00 53 C0 4D AC 53 E0 26 76 90 1D 00 00 83 E1 00 2C 83 C1 00 28 83 A1 00 24 83 81 00 20 80 01 00 34 7C 08 03 A6 38 21 00 30 4E 80 00 20

with

38 A0 00 0E 60 00 00 00 94 21 FF D0 7C 08 02 A6 80 E2 BB 78 2C 05 00 13 90 01 00 34 38 00 00 00 7C 69 1B 78 7C 88 23 78 93 E1 00 2C 54 BF 07 3E 93 C1 00 28 7C DE 33 78 93 A1 00 24 93 81 00 20 98 07 02 50 2C 05 00 26 41 82 00 1C 40 80 00 30 2C 05 00 04 40 80 00 28 2C 05 00 00 40 80 00 08 48 00 00 1C 38 00 00 03 80 67 02 4C 50 03 7B E0 3B A7 02 4C 90 67 02 4C 48 00 00 18 38 00 00 02 80 67 02 4C 50 03 7B E0 3B A7 02 4C 90 67 02 4C 54 A0 E7 FE 7C A3 2B 78 98 07 02 50 7D 05 43 78 83 82 BB 78 7D 24 4B 78 80 1D 00 00 53 E0 07 38 38 C1 00 10 38 E1 00 0C 90 1D 00 00 39 01 00 08 48 00 0D 81 38 00 00 00 38 60 00 00 90 1C 02 48 38 00 00 4D 80 A1 00 10 80 81 00 08 7C 85 21 D6 50 83 05 BE 50 03 C0 0E 90 7C 02 48 80 1D 00 00 53 C0 4D AC 53 E0 26 76 90 1D 00 00 83 E1 00 2C 83 C1 00 28 83 A1 00 24 83 81 00 20 80 01 00 34 7C 08 03 A6 38 21 00 30 4E 80 00 20

I've only tested this at the first area in the game; for all I know there could be other problems elsewhere in the game.

edit: even in the first area there are effects missing which I didn't initially notice, like the water texture under one of the bridges is missing, and the general lighting of the first town area is different. Therefore I wouldn't recommend using these patches.
 
Last edited by NoobletCheese,

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,388
Country
Spain
If you have an ISO of the game, you could use Wii Scrubber to insert back the main.dol file by itself (by replacing the original one inside) and save yourself the rebuilding part.

if you have an extracted game that you want to make into a WBFS file, you could use Wiimms ISO Tools. I can describe how it goes for windows.

inside the bin folder, make a new folder named "dump" and put the games' files inside, with the modified main.dol file too of course. Then, go to the direction bar at the top of the window of the explorer, and write "cmd".

A black window will appear. There, write:

wit COPY dump game.wbfs

wit > the program to use
COPY > the action to take
dump> the name of the folder
game.wbfs > the name of the resulting wbfs file. "game" can be any other thing, but it's easier to give it something short and rename it later.

It will then create the WBFS file. How long it takes depends on the size of the game.
 
  • Like
Reactions: Draxikor

NoobletCheese

Well-Known Member
Member
Joined
Aug 12, 2018
Messages
533
Trophies
0
Age
25
XP
1,084
Country
United States
After spending more time patching various functions, it seems we got lucky that GXSetCopyFilter only differs by 2-bytes per game, as I've noticed other functions differ by large clusters of bytes which makes them difficult to identify.

Perhaps this is due to different version SDK's being used to compile different games, or different compiler settings which ends up producing slightly different machine code.

If this were true of GXSetCopyFilter, then that long string in post #119 wouldn't be found in many games.

If you do come across a game that doesn't contain that long string in any of its dols, try searching for a shorter substring of it. For example, searching the last 8 bytes '9109800041820040' seems to be a sufficient signature. This means if other bytes in the function vary between games, you won't find it by that large string, but you may still find it by this short string. If you get many search results for the short string, start increasing the size with more bytes to the left from the large string. But so far it seems the function is very consistent from game to game, so we got lucky there.

Also the version of GXSetCopyFilter used by Wii games (or any substring of it) doesn't appear to be present in any GameCube games, so I'm not confident Swiss's GameCube patching signatures would work for Wii games.
 
Last edited by NoobletCheese,
  • Like
Reactions: Draxikor

Maeson

Well-Known Member
Member
Joined
Apr 3, 2013
Messages
1,180
Trophies
1
XP
3,388
Country
Spain
In my case, in all the 80 plus games I already looked at and wrote down, the long string was present in every one. Admittedly, I haven't checked on GC games though...
 
  • Like
Reactions: NoobletCheese

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.