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

Modify Hack for Crash Tag Team Racing to fix Gundam games #9274

Merged
merged 2 commits into from
Feb 3, 2017

Conversation

LunaMoo
Copy link
Collaborator

@LunaMoo LunaMoo commented Feb 3, 2017

This wasn't tested much yet, I don't even have Crash Tag Team Racing so maybe it's not ok for merging.

It modifies the hack for CTTR to the other function mentioned in #5468 which turns out to fix Gundam games that is: #7136, #9003 maybe also #9007 /definitely needs more testing, hence why I'm opening this pr.

So far I tested Gundam Battle Universe and Gundam Battle Chronicle with this, both seems to work, but in place of previous crash they get like 1 glitchy frame, might be caused by this or some other GE function also needing a change in pair with this. Edit: Nvm the glitch is #9275 ;p saw a difference since I updated right before building this heh.
Edit: Removed custom build as I got CTTR tested which is affected same way as before aka still fixed at least US version from the PS store, but it was potentially affecting different regions differently in the first place?
Fixes #7136, Fixes #9003
Should also fix #9007, but I can't find which Ace units crash it even without this hack, the error from the log posted looks exactly same as from other 2 gundam games through.

@@ -408,6 +408,7 @@ int sceGeListSync(u32 displayListID, u32 mode) {

static u32 sceGeDrawSync(u32 mode) {
//wait/check entire drawing state
hleEatCycles(500000); //HACK(?) : Potential fix for Crash Tag Team Racing and a few Gundam games
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't like this, this seems like a dangerous change that will affect the timing of many, many games. Of course, eating a small amount of cycles here makes sense, but that big an amount would seem to indicate that the problem really is that we are processing display lists too fast, and the game is buggy and stupidly relies on that.

If we find no other sensible solution, I could accept this behind a compat flag that only turns it on for the affected games.

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Feb 3, 2017

Eating small amounts didn't really helped I actually tried it even before taking value from CTTR hack, so I made it into compat.ini.
I actually fixed it before with cwcheat hack but it was doing similar thing in very wasteful way ~ by adding a big loop that was just wasting time to slow down following function execution.

@moura464
Copy link

moura464 commented Feb 3, 2017

if (PSP_CoreParameter().compat.flags().DrawSyncEatCycles) <<<<error Builds What? No

@moura464
Copy link

moura464 commented Feb 3, 2017

Build warning :)

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Feb 3, 2017

Don't really see any warnings, maybe your compiler is racist against braceless statements.;p VS and most other stuff seeing what Travis already built seems to be perfectly happy with it.

@hrydgard
Copy link
Owner

hrydgard commented Feb 3, 2017

Alright, this is fine. It's clear that we need to improve GPU timings.

@hrydgard hrydgard merged commit 8b359a3 into hrydgard:master Feb 3, 2017
@LunaMoo LunaMoo deleted the hackGundam branch February 3, 2017 16:32
@sum2012
Copy link
Collaborator

sum2012 commented Feb 5, 2017

@LunaMoo Not sure need include this.
I get report from baidu that SD Gundam G Generation Over World crash in-game

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Feb 5, 2017

Don't know about any crashes in that game, there's even this english fan translation project where they definitely use ppsspp, even released some HD textures to this game aiming at texture replacement and the only crashing mentioned in their very long thread seems to be related to some HQ texture pack(not the HD one) which replaces files on iso.

It should be easy enough for any user to just edit compat.ini and add new games for the existing hacks to check if it can affect it or not.
Althrough I kind of doubt this had the same problem as Gundam Battle games, this one is a tactical 2D game made by different developer and likely runs on completely different engine. Crash could easily be related to some ppsspp options like multithreading, changed psp cpu clock, cheats or be specific to any fan made patch.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 5, 2017

It is not easy for edit compat.ini for Android.
Anyway,I will test it when I have time

@hrydgard
Copy link
Owner

hrydgard commented Feb 6, 2017

yeah, been meaning to make it also read compat.ini from PSP/SYSTEM on the stick if that exists... that would make such tests easier on Android. Though bugs that need compat workarounds are not normally android-only so you can just try on PC.

@LunaMoo
Copy link
Collaborator Author

LunaMoo commented Feb 6, 2017

Actually it was already done;p.
I just tried to make sure, creating new compat.ini on memstrick/PSP/SYSTEM/ makes it read hacks for games which aren't included in compat.ini in the assets folder.

So it should be easy for android users as well. They just need to create that file manually or copy it from ppsspp github whatever's faster, then add new game ID's under hacks they want to activate.

@hrydgard
Copy link
Owner

hrydgard commented Feb 6, 2017

Oh yeah, I guess that got done indeed :)

@unknownbrackets
Copy link
Collaborator

What happens if we remove the hack for Gundam now that #12160 is in?

-[Unknown]

@hrydgard
Copy link
Owner

I'll open a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants