Project

General

Profile

Emulator Issues #9474

Transparent Wiimote graphic

Added by MarioManTAW about 3 years ago. Updated about 3 years ago.

Status:
Accepted
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Mario & Sonic at the London 2012 Olympic Games

Game ID? (right click the game in the game list, properties, info tab)

SIIE8P

MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)

48b4a2901c515eec09a5fccad4b4dcb6

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?

4.0-9109

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,
configuration files)

Attached is a screenshot of the incorrect graphic.

History

#3 Updated by phire about 3 years ago

  • Status changed from New to Accepted

Looks like it happens on all video backends including video software.

#4 Updated by MarioManTAW about 3 years ago

phire wrote:

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

5358

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[1].a * konst[3].b) + prev.a

Texture[1] is the diffuse color of the wiimote and has a constant alpha across it. konst[3].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[0] 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[0] 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[0] 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)

#7 Updated by MarioManTAW about 3 years ago

I wonder if it's an issue with my ISO. If we can contact someone else, maybe we can rule out that possibility.

#8 Updated by JMC4789 about 3 years ago

It's not, just tested it on console and dolphin; both booted from the system menu.

#9 Updated by phire about 3 years ago

Versions of dolphin before 4.0-9135 render the wiimote more or less correctly on the video software backend.

#10 Updated by MarioManTAW about 3 years ago

phire wrote:

Versions of dolphin before 4.0-9135 render the wiimote more or less correctly on the video software backend.

I found the bug on 4.0-9109...

#11 Updated by MarioManTAW about 3 years ago

EDIT: Oops, I thought I had tested Software Renderer, but apparently I hadn't.

#12 Updated by MarioManTAW about 3 years ago

Since we obviously don't want to force Software Renderer in game INI, what else might fix the problem?

#13 Updated by phire about 3 years ago

Nothing. It's kind of an impossible problem for the hardware backends. Any fix would be a hack.

#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.

Dolphin:

Actual Wii:

Basically impossible to emulate correctly on the hardware backends, though we can probably get it working correctly on video software.

Also available in: Atom PDF