Next Generation Emulation banner

1 - 5 of 5 Posts

18 Posts
Discussion Starter #1
So I've been poking around with this bug for a while now, but without more knowledge on my part, I doubt I'll get any farther, so I figured it'd be a good idea to mention what I did find out. Namely, why this bug is happening.

The source of the bug comes from the way that the OpenGL and DirectX plugins handle the commands sent to them by the function GXCopyTex under certain circumstances. It's not really worth getting into the details here, so I'm just going to list the commands in question. They consist of 6 BP register loads, with one register already set to a certain value which may or may not be important. Fifo that sets this value is not actually within the function, but it would be:

61 43 000041

The first two loads are routine: outlining the area on the screen that needs to be copied. Fifo for these is:

61 49 0130a8
61 4a 033d2f

Then comes:

61 4d 000013

From what I can see, it's not entirely clear yet what this register is supposed to do. However, I don't think this is the problem in this scenario.

The next is the destination of the copy:

61 4b 04be0d

This represents the location in memory of 0x8097c1a0

Finally, the action of copying is performed with the following command;

61 52 018213

Based on the current implementation of the plugins, this performs an HLE function to copy the texture.

There's just one problem here. Because this is done via HLE, there is one outcome of this scenario which is currently not being performed. The pictograph algorithm in Zelda: Wind Waker actually requires the texture to be copied to the location in memory where the destination of the copy would have been, storing it there in the exact format and dimensions specified by the copy. This information is required in order to perform further processing on the image before being stored wherever the pictograph data is being stored. Because the texture copying is not being done at a low level, the memory space where it would have been read during the further processing is empty, which generates an error.

So that's the story of that bug. I wish I could fix it myself, but I really don't know enough about either DirectX or OpenGL to be able to implement a fix. Hopefully this information will be helpful to someone, and hopefully I haven't made any mistakes in my reasoning along the way.

424 Posts
Maratanos, good analysis.

Omega, no. But it's the same problem that Mario Sunshine has with its goo. Guess someone will have to get around to fixing it, heh...
1 - 5 of 5 Posts