Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokyo Xtreme Racer - Incorrect colors in vehicle selection #163

Closed
PixelCrusader opened this Issue Jul 11, 2018 · 16 comments

Comments

Projects
None yet
3 participants
@PixelCrusader
Copy link

PixelCrusader commented Jul 11, 2018

Windows 7 64 bit, AMD Radeon HD 6450, Intel i5-2320 CPU @ 3.00GHz
RetroArch 1.7.3 - Reicast 0.1 19c3a98

During car selection, cars appear with inaccurate colors. Light cars appear as dark and vice versa. Some cars become entirely different colors. Colors will return to normal when pressing up or down on the D-pad to change them. Inverted colors only happen with car selection, they do not carry over into game play,

tokyo xtreme racer usa -180711-191444
tokyo xtreme racer usa -180711-191528

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 12, 2018

Do you have a video of how it should look like with a real Dreamcast?

@PixelCrusader

This comment has been minimized.

Copy link
Author

PixelCrusader commented Jul 12, 2018

Hopefully these clips can suffice:

1
2
3
4
5

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 12, 2018

Yeah, I can see the issue clearly with the first car and link 1.

@flyinghead Looks like a valid graphics bug.

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

This is caused by the -ffast-math gcc option, which turns on the -ffinite-math-only option. As the name implies it makes the compiler ignore NaN and Infinity values and leads to incorrect results for operations involving these numbers.
Note that both dynarec and interpreter are affected, although the latter seems to be a bit more accurate.
Working on a fix.

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

Sure seems to be a recurring pattern where compiler optimizations seems to break many elements of Reicast when it comes to float.

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

Absolutely. I wonder if this fast-math option makes sense for desktop platforms. The performance gain is probably negligible compared to the potential for errors.

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

OK, so I should just remove it from the Makefile?

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

It does fix this issue, as well as the previous one with sqrt (Soldiers of Fortune). Not sure of the negative side effects though.
I'd rather work on a fix that works with fast-math so it can be used on low end platforms. But you might want to get rid of this option completely since you don't really target them.

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

OK, lets see what you come up with then, I am intrigued.

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

Here we go: flyinghead@ea35eeb

Yet I still think we'd be better without the fast-math option. I'll do some testing.

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

You might want to hold off for now. This commit breaks Fur Fighters (well, it was broken before but now it freezes in game). Potentially other games are affected as well. Looks like more work is needed...

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

OK, I had backported it just now but I guess I will revert it for now and wait for your better solution.

@flyinghead

This comment has been minimized.

Copy link
Collaborator

flyinghead commented Jul 13, 2018

Well I stand by my commit so far. Fur Fighters is totally broken anyway, so the problem is elsewhere. I'll do some more investigation in this area anyway.

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

OK, I will backport your commits now then.

@twinaphex

This comment has been minimized.

Copy link
Member

twinaphex commented Jul 13, 2018

OK, backported them. The OP might want to wait for new updated cores on the buildbot or build his own and test his results.

@PixelCrusader

This comment has been minimized.

Copy link
Author

PixelCrusader commented Jul 14, 2018

83c8c07

The cars now appear with their correct colors, consistent with the videos. There is no longer a 'jump' from glitched colors to correct ones when changing them.

I can't say for certain without a full playthrough on different settings , but at a glance it looks like this game has no more noticeable issues.

Thanks! Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.