Has anyone figured out how to remove dithering on GameCube and Wii games on the Wii?
The best way is just to disable GXSetCopyFilter, then you don't need to edit video filters.
The string to modify is on previous pages
Howdy! Just KO'd the NES VC palette issue today-- it's mildly off topic but I'll keep it concise since there's demand for it.
The actual palette is stored as RGB5A3, 0x80 bytes long, and starts with 'A529 800D 840C 940B' (for a few games I checked, anyway)
For reference, in SMB2 USA the loop mapping palette ram => colors is at 0x8000F18C, and the default palette is at 0x80163BB0 (offset 0x15FCB0). Might be useful if any extra research is required-- though it really shouldn't be.
I've attached a python script to convert your favorite NES palettes to VC's format, ready to be pasted over or turned into a cheat code. If you don't want to use that, or need a quick reference, here's FirebrandX's 'Composite Direct' palette pre-formatted:
B18C804F8C119810A80BAC03A4009C608CC080E0810080E280AA800080008000D6B58D39A0BCB47AC875CC6BCCC0BD20AD8091E0820081E781B1800080008000FFFFB2BFC63FD9DFF1BFF5B8FA0DEE65DEC1C321AF47A74FA719A52980008000FFFFE39FEF7FF75FFF3FFF3EFF59FF76F7B4EBD4E3F7DFDADFDEDEF780008000
Conversion script (Python3, supports drag-n-drop):
Code:#!/usr/bin/python3 import os, sys, argparse, struct def main(ext_args = None): parser = argparse.ArgumentParser(description='Convert a NES .pal palette to Virtual Console RGB5A3 format.') parser.add_argument('fn_input', metavar='input', help='Input .pal palette file, will output to [file.pal].bin') args = parser.parse_args(ext_args) # if == None, will decay to sys.argv fn_input = os.path.normpath(args.fn_input) fn_output = fn_input + '.bin' palette = bytearray() with open(fn_input, 'rb') as f: palette = f.read() vc_palette = bytearray() for i in range(64): # get values and shift them down to 5 bits r = palette[(i*3) + 0] >> 3 g = palette[(i*3) + 1] >> 3 b = palette[(i*3) + 2] >> 3 vc_palette += struct.pack(">H", (1<<15) | (r << 10) | (g << 5) | b) print("VC palette (hex string):") print(vc_palette.hex()) with open(fn_output, 'wb') as f: f.write(vc_palette) print('Successfully completed!') if __name__ == '__main__': main()
Full research process for the curious-- it's more accessible than you might think:
I took a few stabs at finding RGB888 => RGB565 converted values at first, to find the palette directly, but didn't have any luck. (This makes sense as it turned out to be RGB5A3)
Next, I decided to find palette ram => color mapping happening in the emulator. I booted up a debugging NES emu, noted some of the current palette bytes, and searched for that in a Wii VC ram dump.
I found three instances-- one which was within the bounds of the rom, another which matched that section of the ROM entirely, and a third which didn't. I suspected the third was the palette ram, so with Dolphin I put a breakpoint-on-memory-read on its first bytes. This led to finding the palette mapper func, and without even unpausing the debugger I was able to find the active palette buffer from there. Finally a simple search for this palette in the binary itself was needed, since it was in a non-static buffer, to ensure it wasn't transformed/crushed on the fly-- which it isn't.
In 01.app find
A529800D840C940Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Replace with
B18C804F8C119810A80BAC03A4009C608CC080E0810080E280AA800080008000D6B58D39A0BCB47AC875CC6BCCC0BD20AD8091E0820081E781B1800080008000FFFFB2BFC63FD9DFF1BFF5B8FA0DEE65DEC1C321AF47A74FA719A52980008000FFFFE39FEF7FF75FFF3FFF3EFF59FF76F7B4EBD4E3F7DFDADFDEDEF780008000
x = wildcard, may vary between games
edit: although if different games are using different palettes to begin with, replacing them all with the same palette would result in wrong colours. In that case the best option may be to modify the game's original palette to increase the peak brightness only. eg. export palette from game's 01.app, then increase brightness using a tool like this http://drag.wootest.net/misc/palgen.html , then import it back into 01.app.
Great work with that @SunkenSkunk, @NoobletCheese and @SuperrSonicWorking here in code form. Using the original palette as base, and applying exposure 1.07 with PS.
The waterfalls in the starting level of SMB2 are not affected by the palette, this should be expected considering that if you take the rom and try it on other emulators it uses one of the blank colors.
Code:Super Mario Bros. 3 NTSC-U Restored brightness palette 061e0bd0 00000080 b18c8012 88119c0f ac0db000 ac009c60 90c08102 810080e2 80ab8000 80008000 d2748117 a01eb419 c415c80a c8a0bd00 ad8091e0 89e081e8 818f8842 80008000 fbdeb67f c5ffdddf f1def997 fe2de668 d687bee0 a708a30f ab18a529 80008000 ffffe37f e31eef1f f6fffb1b fb58ef35 ef74e7b5 dfb5d777 d358ef7b 80008000 Widescreen Correction using VI 281c7cea 00000028 021c7cea 00000068 021c7cee 00000200 021c7cea 00000068 021c7cee 00000200 021c7d62 00000068 021c7d66 00000200 e0000000 80008000 No DF in HOME Menu/eManual 061c7e02 00000007 00001516 15000000 061c7e7a 00000007 00001516 15000000 061c7ef2 00000007 00001516 15000000 061c7f6a 00000007 00001516 15000000
So, I've tested @NoobletCheese's new code for replacing the old values of the "dark NES color pallete" with the new colorful and bright NES color pallete.
oh i didn't know that but anyways thanks for helping us with these useful infoJust to clarify, it's not my code and credit goes to @SunkenSkunk for discovering it.
I have more interesting news about that... I tested with some other NES color palletes that I converted to VC format (I was able to use @SunkenSkunk's Python 3 tool for convert the .pal pallete files to VC) with my method that I found, and they worked great.RE: Replacing NES dark color pallete on Wii VC
EDITED: 29-06-2021 10:12 am (GMT -05:00)
@NoobletCheese @SunkenSkunk @SuperrSonic @Zorg1996
So I decided to figure out if the same procedure can be done with more NES Wii VC games. I tested to brighten Mega Man 5 (NTSC-U), which 1.app is LZ77-compressed. I uncompressed it with wwcxtool, then searched for the A529800D840C940B values but I didn't find anything.
So, I was seeking in other NES Wii VC WADs, checked 1.app of Super Mario Bros. 3 (NTSC-U) and I saw that 1.apps of NES VC games share a same "code" for storing the "color pallete", as shown:
View attachment 268568
So I suppose every NES game stores its color pallete under these found values, if you want to see it for yourself seek for the following values in hex: 00600000426F6D426C69737300000000425921C80D5341540000000000000000
Under these values you will find a 128bytes NES VC color pallete, as shown:
View attachment 268572
So I replaced these old values of the color pallete with @SunkenSkunk's custom color pallete code, as shown:
View attachment 268571
Then saved and compressed again the resulting 1.app, inserted into the MM5 WAD, and surprisinly it worked!
Here's some screenshots of my test in this comparison:
View attachment 268569 View attachment 268570
Maybe this will work on most NES VC games, I suppose? I hope so yes
Greetings
I think that this info oughta be copied to another thread and pinned, because there's a lot of relevant stuff.Here is a summary of patches discussed in this thread starting from most recent.
29/6 Restoring full brightness for NES VC games
Relevant posts: [1][2]
Credits: @SunkenSkunk
25/6 Removing vfilter from Wii System Menu
Relevant posts: [1]
Credits: @SuperrSonic, @XFlak
24/6 Restoring full brightness for SNES VC games
Relevant posts: [1][2][3]
Credits: @NoobletCheese, @SuperrSonic
Note: was intended for NES games but only worked on emulator, but works for SNES games on Wii hardware.
8/6 Restoring full brightness for N64 VC games
Relevant posts: [1][2][3]
Credits: @SuperrSonic, @MaeseJesus, @NoobletCheese
10/6 Fixing various pixel issues in Mega Man 9 and 10
Relevant posts: [1][2][3]
Credits: @SuperrSonic, @MaeseJesus
4/6 Removing vfilter for GameCube games
Relevant posts: [1]
Credits: @NoobletCheese
Note: Nintendont already has pretty reliable removal of vfilter, so this should only be needed for a small number of stubborn games eg. Starfox Adventures, Soul Calibur 2.
23/5 Disabling dithering for Wii games
Relevant posts: [1]
Credits: @NoobletCheese
15/5 Disabling vfilter for Wii games
Relevant posts: [1][2][3]
Credits: @NoobletCheese, @SuperrSonic
Note: @blackb0x's upcoming release of USB Loader GX is planned to implement this.
General info
Hex editing app/dol files [1][2]
Uncompressing 00000001.app in WADs [1][2]
Explanation of vfilter [1]
It's not over yet -- stay tuned
The patching tool was either going to give you a [ID6].dol to launch separately with ULGX, or make you a patched copy of your original iso/wbfs, so you could always revert to your originals. But I guess it wouldn't hurt to also add an 'unpatch me' option as well.
This article shows the brightness control in Metroid and menu screen fades in Soul Calibur not working when GXSetCopyFilter is disabled
https://ppltoast.wordpress.com/2018/05/11/a-small-look-into-the-gamecubes-copy-filter/
Not a dealbreaker for me personally -- I'd still rather not have the filter -- but enough to preference the vfilter patching method as the default method, and revert to patching GXSetCopyFilter as a last resort.
I've added some more NES color palletes that are compatible with VC. The Wavebeam pallete was requested by @Zorg1996I have more interesting news about that... I tested with some other NES color palletes that I converted to VC format (I was able to use @SunkenSkunk's Python 3 tool for convert the .pal pallete files to VC) with my method that I found, and they worked great.
Here's some additional hex codes of NES color palletes converted to VC format:
Nestopia Emulator's YUS color pallete:
B1 8C 80 B1 88 54 9C 14 AC 0F B4 08 B4 00 A8 60 98 C0 85 20 81 40 81 21 81 09 80 00 80 00 80 00 D6 B5 89 7B A1 1F B8 9F D0 79 D8 6F D8 C4 CD 20 B5 A0 9E 00 86 40 82 26 81 F1 80 00 80 00 80 00 FF FF B2 DF CA 5F E1 DF F9 BF FD B9 FE 0E F6 64 DE E0 C7 60 AF 86 A3 90 A7 3B A5 29 80 00 80 00 FF FF E3 7F EB 5F F7 3F FF 1F FF 1D FF 38 FB 74 F3 92 E7 B2 DF D5 DB D9 DB BE DE F7 80 00 80 00
Nestopia Emulator's RGB color pallete:
B5 AD 80 92 80 1B B5 3B C8 0D D8 0D D8 80 C9 20 B5 20 91 20 81 A4 82 40 81 29 80 00 80 00 80 00 DA D6 81 BB 81 3F C8 1F D8 1F FC 12 FC 00 ED A0 C9 A0 92 40 82 40 82 CD 82 52 90 84 80 00 80 00 FF FF B6 DF CA 5F ED BF FC 1F FD BF FE 40 FE C0 EF 60 B7 60 83 E0 A7 FB 83 FF A5 29 80 00 80 00 FF FF DB 7F EE DF FE DF FE 5F FE D6 FF 72 FF E9 FF ED DB E9 CB ED A7 FB CB 7F CA 52 80 00 80 00
Restored NES Wii VC color pallete (thanks to @SuperrSonic):
B5 AD 80 13 84 11 9C 0F AC 0D B4 00 AC 00 9C 60 90 E0 81 02 81 00 80 E2 80 AC 80 00 80 00 80 00 D2 94 81 17 A0 1E B4 1A C4 16 CC 0A CC A0 C1 00 AD A0 92 00 89 E0 81 E9 81 B0 88 42 80 00 80 00 FF FF B6 9F C5 FF DD DF F5 DF FD B7 FE 2D EA 89 DA 87 C3 00 AB 28 A3 30 AB 39 A9 4A 80 00 80 00 FF FF E7 9F E7 3F EF 3F F7 1F FF 3C FF 59 EF 36 EF 94 EB B6 DF B6 DB 97 D3 59 EF 7B 80 00 80 00
FireBrandX's FBX Composite Direct color pallete:
B1 8C 80 4F 8C 11 98 10 A8 0B AC 03 A4 00 9C 60 8C C0 80 E0 81 00 80 E2 80 AA 80 00 80 00 80 00 D6 B5 8D 39 A0 BC B4 7A C8 75 CC 6B CC C0 BD 20 AD 80 91 E0 82 00 81 E7 81 B1 80 00 80 00 80 00 FF FF B2 BF C6 3F D9 DF F1 BF F5 B8 FA 0D EE 65 DE C1 C3 21 AF 47 A7 4F A7 19 A5 29 80 00 80 00 FF FF E3 9F EF 7F F7 5F FF 3F FF 3E FF 59 FF 76 F7 B4 EB D4 E3 F7 DF DA DF DE DE F7 80 00 80 00
FireBrandX's NES Classic Mini color pallete:
B1 8C 80 11 8C 33 98 4F A8 4C AC 02 A8 20 9C 81 90 C1 85 01 89 02 80 E3 80 AA 80 00 80 00 80 00 D6 B5 85 38 A4 9B B4 59 C8 55 CC 69 C8 C0 B9 40 AD A2 89 E2 8A 01 89 C9 8D 92 80 00 80 00 80 00 FF FF B2 7F C5 FF D9 BF ED BE F1 D5 F2 0B E6 64 D6 C0 BB 00 AF 29 9B 11 A6 F9 A1 08 80 00 80 00 FF FF DF 5F E7 3F EF 1F F7 1F FF 1C FB 38 F3 34 EF 73 E7 93 DF 97 DB B9 DB 9D D6 B5 80 00 80 00
Wavebeam color pallete (thanks to FireBrandX):
B5 AD 80 71 90 13 A0 11 B0 0C B0 03 AC 20 A4 40 94 C0 81 00 81 21 81 03 80 CB 80 00 80 00 80 00 DA D6 89 5A A0 DD B8 9B CC 77 D4 2C D4 A0 C5 20 B1 A0 92 00 82 20 82 08 81 D2 80 00 80 00 80 00 FF FF B2 DF BE 7F E1 FF F5 DF F9 D9 FA 2D EE 85 DE E1 C7 41 AF 67 A7 70 A7 3A A9 4A 80 00 80 00 FF FF DF 7F EB 5F F3 3F F7 1F FF 1C FF 38 FB 75 F7 94 EB B4 DF D6 DB D9 DB BE DE F7 80 00 80 00
Greetings
Thanks, I got it working!
I tried patching Resident Evil 4 Wii Edition and the difference was huge. I also tried Super Mario Galaxy, but it made no difference. I guess that Mario Galaxy doesn't use the filter in progressive mode?
It would be awesome to start building a database of some sort. I will keep on patching games and post here if/when I have the time.