Emulator Issues #9474
Transparent Wiimote graphic
Mario & Sonic at the London 2012 Olympic Games
Game ID? (right click the game in the game list, properties, info tab)
MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)
What's the problem? Describe what went wrong.
On the "How to Hold" screen, the Wiimote is transparent. On the actual Wii, it shows up as opaque white.
What steps will reproduce the problem?
Select any event, select any character, "Go to Event" and the transparent Wiimote should appear.
Which versions of Dolphin did you test on? Does using an older version of Dolphin solve your issue? If yes, which versions of Dolphin used to work?
What are your PC specifications? (CPU, GPU, Operating System, more)
Toshiba Satellite C55D-B5385 running Windows 10 on AMD A8-6410 processor with AMD Radeon R5 GPU.
Is there any other relevant information? (e.g. logs, screenshots,
Attached is a screenshot of the incorrect graphic.
#1 Updated by phire about 3 years ago
Could we get a 3 frame fifolog of this?
#4 Updated by MarioManTAW about 3 years ago
Looks like it happens on all video backends including video software.
I did just about as much testing as I could with my one computer, trying out all kinds of settings, and nothing that I've tried has worked. Your confirmation just rules out the possibility of it being a GPU/CPU-specific issue (unless you have same/similar specs).
#5 Updated by phire about 3 years ago
Yeah, not a CPU/GPU-specific thing.
I've also tried cached-interpreter mode to see if it's a CPU emulation bug, but looking at the graphics debugger, it looks like the draw call which draws the wiimote is missing a texture.
I've attached a frame capture from a real wii to so the correct output. Thanks to JMC47
#6 Updated by phire about 3 years ago
So, while drawing the Wiimote, the game sets the alpha equation to essentially:
(texture.a * konst.b) + prev.a
Texture is the diffuse color of the wiimote and has a constant alpha across it. konst.b is 0.333 and prev.a is.... undefined.
prev wasn't written to by an earlier tev stage, so it will default to the constant color which the game never sets (despite religiously setting every other constant register several hundred times a frame). System menu also doesn't set the constant color to anything either so the value of this register is undefined.
Dolphin defaults all the constants to zero, so it ends up with a constant 0.333 alpha across the entire wiimote. Somehow the wii is managing to get a value that results in the wiimote not being transparent (any value between 170 and 1023 would work).
Hardware tests are needed.
Note: we aren't even 100% sure that color gets transferred to prev at the start of every pixel, it's theoretically possible that it's getting the result of the previous pixel, which in the case of the wiimote would be the hand (which has an alpha of 1)
#14 Updated by phire about 3 years ago
Confirmed via hardware test, if prev isn't set it simply takes the color of the previous pixel that was rendered.
Basically impossible to emulate correctly on the hardware backends, though we can probably get it working correctly on video software.