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

Option for disabling deflicker filter? #44

Open
jolteondude opened this issue May 29, 2024 · 1 comment
Open

Option for disabling deflicker filter? #44

jolteondude opened this issue May 29, 2024 · 1 comment

Comments

@jolteondude
Copy link

jolteondude commented May 29, 2024

Hello, is it possible to disable the deflicker filter through the WiiVC Injector? The Wii (and vWii) has a system level "blur" filter applied to everything, so I was wondering if I could turn off this filter to get the cleanest image possible for Wii games, like in some other homebrew applications like USB Loader GX.

(A screenshot taken from this video)
gx

@vaguerant
Copy link

This would probably be possible for at least some games. I've done it manually by editing some of my games before injecting them. You'll need to unpack the game so you can access the main.dol file, then try to find the compiled GXSetCopyFilter() SDK function within the title. You'd usually do this by opening main.dol in a hex editor (such as HxD on Windows) and searching for the following:

99498000 90E98000 99498000 91098000 41820040

Each set of four bytes is a single assembly instruction, so you're looking at five instructions above. The last instruction, 41820040, is a conditional branch, meaning it might branch ahead if the right conditions are met. The target of this branch is the code which disables the copy filter, so we want this branch to be unconditional, i.e. always run. To do that, you can change 41820040 to 48000040. 4182 is a branch-if-equal, and 4800 is a simple branch, so that's the part you're changing. The last part, 0040, is the distance to branch. You don't want to change that part since it's already pointing to the right place.

With that done, any time the GXSetCopyFilter() function runs, it will force the copy filter to be disabled because that's what you've edited it to do.

This may not work for all games, because Wii games were being made for about eight years and the SDK received updates over that time, so there's not really any guarantee that the code was unchanged across all SDK versions and all Wii games. Still, this feature would in theory be doable for at least some games in an injection tool, since they involve unpacking the game anyway (meaning the main.dol is accessible). It would need a feature to scan through the main.dol looking for that pattern to patch then replacing that 4182 with 4800.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants