Project

General

Profile

Actions

Emulator Issues #13403

open

Graphical Issues - Defender

Added by ZephyrSurfer 5 months ago. Updated 5 months 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?

Defender

Game ID? (right click the game in the game list, Properties, Info tab)

GDFE5D

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

ba494301ef873157b61a1299cf6328be

What's the problem? Describe what went wrong.

There are graphical issues when playing the game. Seems to affect menus and videos rather than the playable sections. It's like horizontal sections of the screen are in the wrong place, not sure how to describe it.

Here is a video showing the issue:
https://www.youtube.com/watch?v=DuN4ViwFMV0

What steps will reproduce the problem?

Play the game, and it will present in the menus and intro videos before the main menu.
It also affects the other parts of the game, like the mission briefings and the screen that displays when you lose a mission for example.

I have looked at early Dolphin releases and it didn't work then either.

I have also tried all the various settings, everything I could think of including the most accurate settings and none of them fixed the issue. However, single core enabled and disabled look different but neither solve the issue.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, 5.0-20347

Is the issue present in the latest stable version?

Yes, 5.0

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

N/A

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

[Attach any fifologs if possible, write a description of fifologs and screenshots here to assist people unfamiliar with the game.]

What are your PC specifications? (CPU, GPU, Operating System, more)

i7-4790K
RTX 2060 6GB
Windows 10
16GB DDR3

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Let me know, I'll see what else I can do.


Files

Defender_Intro_Fifologs.zip (2.31 MB) Defender_Intro_Fifologs.zip ZephyrSurfer, 11/19/2023 11:33 PM
Defender_Menu_Fifologs.zip (3.72 MB) Defender_Menu_Fifologs.zip ZephyrSurfer, 11/19/2023 11:33 PM
Defender_Mission_Fifologs.zip (4.47 MB) Defender_Mission_Fifologs.zip ZephyrSurfer, 11/19/2023 11:33 PM
defender_inevitable_logo.png (32.2 KB) defender_inevitable_logo.png ZephyrSurfer, 11/19/2023 11:35 PM
Defender_Screenshots_Memory_Card_1.zip (1.3 MB) Defender_Screenshots_Memory_Card_1.zip ZephyrSurfer, 11/21/2023 10:48 PM
Actions #1

Updated by pokechu22 5 months ago

  • Status changed from New to Accepted

This seems to be some kind of tmem thing. The game draws the intro in 4 strips, but each strip has the same texture address (0x42c240), and it's presumably replacing the texture in memory after each one, on the assumption that once the GPU finishes with one part it will have removed the start from tmem and can it can be used later. This is what causes the bottom quarter of the screen to be a duplicate of the part above.

There also seem to be cases where things are messed up within a single texture - probably a case of the texture being partially overwritten while it's being drawn (or when dolphin makes a complete snapshot of it). That would definitely behave differently on dual core.

Assuming the game is doing what I think it's doing, this would probably be difficult to emulate correctly. The game does call GXTexModeSync before each draw, which manifests as BPMEM_PRELOAD_MODE with value 0, which we don't currently do anything with but apparently is intended to be used for synchronization (but a different kind of synchronization from this - GXInvalidateTexAll would be correct here instead I think).

I've created https://github.com/dolphin-emu/dolphin/pull/12308 as a test - https://dl.dolphin-emu.org/prs/49/fa/pr-12308-dolphin-latest-x64.7z. Can you see if this makes a difference ingame?

It looks like this was Inevitable Entertainment's first game on the gamecube (followed by The Hobbit in 2003), which is interesting.

Actions #2

Updated by ZephyrSurfer 5 months ago

Hi, I can't tell any difference really with the test PR unfortunately

Actions #3

Updated by pokechu22 5 months ago

Can you try running the game with the software renderer (both with and without the PR)?

Actions #4

Updated by ZephyrSurfer 5 months ago

I have got screenshots of the latest dev release and the PR, on a hardware backend and software as well as single core enabled and disabled at the same frame of the game.

(The screenshots are just window snips since the screenshot feature is broke when there are zero fps like the memory card screen)

Actions #5

Updated by pokechu22 5 months ago

OK, it doesn't look like my PR helps at all. Those screenshots do show that it is some kind of timing issue, though (look at the top quarter line for 5.0-20351 opengl dual core and the middle middle of the pr opengl dual core, and you can see that it's clearly in the middle of creating the texture when it gets drawn).

This feels like something that would be difficult to fix, if it's possible at all.

Actions

Also available in: Atom PDF