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

GTA LCS,VCS and CHW Radio loading delays still there #7863

Closed
PlayerGameSK opened this issue Jul 15, 2015 · 61 comments
Closed

GTA LCS,VCS and CHW Radio loading delays still there #7863

PlayerGameSK opened this issue Jul 15, 2015 · 61 comments

Comments

@PlayerGameSK
Copy link

Hi all,

I just wanna tell ya all that there's still the radio delay issue in version 1.0 and up (not sure about ones between 0.9.9.1 and 1.0 but 0.9.9.1 works fine) but I have performance problems in 0.9.9.1 so I use newer ones. This issue was there already so you probably know what I mean.

Thanks for any replies :)

EDIT: I forgot to mention,it happens on PC (I have Windows 7 Professional)

@thedax thedax closed this as completed Jul 15, 2015
@thedax thedax reopened this Jul 15, 2015
@thedax
Copy link
Collaborator

thedax commented Jul 15, 2015

Never mind, I was wrong.

@PlayerGameSK
Copy link
Author

Ok,but do you know something about the issue?

@gamelaster
Copy link

A radio delay? Can u more descript your problem? I have LCS and play long at PPSSPP and i didnt get this trouble..

@PlayerGameSK
Copy link
Author

The radio stations load longer that they are supposed to,but,the closer they are to end,the longer they load,so for example if RISE FM is at beggining of itself,it will load imediately,but if it's about to end,it will load for about 5-6 seconds.

A nazdar GAMELASTER :D

@gamelaster
Copy link

Nazdar :D Poznáme sa ? :D počkať, 5 sekund trvá načítanie stanice? :D Trošičku nechápem :D Ale ak si to zoberem, tak trošku tam tú latenciu cítim :D , ale asi iba 1 sekundu (po tom čo prestane zvuk preladenia).

Well, my latency when i changing radio is little hear, but i dont know its normal or bad. Example, i retunning to RISE FM, i hear the tunning sound, and after end of sound is acc. 1 second latency of loading i though... mmm.

@hrydgard
Copy link
Owner

Yeah, this is known. It's a side effect of some improvements by @unknownbrackets to the Atrac3 playback code that fixed some other games, but unfortunately had this effect. Our Atrac3 emulation is still not fully correct, leading to issues like this, and needs more work. Still, this doesn't hinder playability very much so until we can improve it further we'll have to live with it.

@PlayerGameSK
Copy link
Author

Yeah,the game's playable and all but it just annoys me.

GAMELASTER ja som ten nový čo sa pridal k prekladu (ty vieš ktorý myslím) a tých 5 sekúnd som tak randomne hodil aj s tým RISE-om.

(GAMELASTER I am the new one that joined the translation (you know which i mean) and that 5 seconds along with the RISE were just randomly placed by me :D (hope you know what I mean) :D )

@PlayerGameSK
Copy link
Author

And can't you just make like one version with the old Atrac3 plugin?

@DemiKraw
Copy link

I would like to add that problems are more serious than delay.
I posted these on the forum

Grand Theft Auto: Liberty City Stories
ppsspp-v1.0.1-757-g73e9c3b

  • feels like system requirements for this game became higher, since now I'm barely handling 3x res, but played constant fullspeed with 5x 500 revisions ago
  • most of radiostations are now screwed and do not play anything, tried all possible combinations of sound settings

Grand Theft Auto: Chinatown Wars
So, there are really bad things going on here
ppsspp-v1.0.1-757-g73e9c3b

  • game is now lagging with both backends and minimum resolution
  • sounds appear/reappear almost randomly
  • all sound disappears when I switch to most of radiostations (tried all sound settings combination)
  • still 10-30 sec delay when I enter a car or switch to a couple of stations that work.

Windows 7. Intel Quad q9505 3.4 Ghz, 4 GB RAM, GT9800 1 Gb

Another proof you can see (or hear) here:
https://www.youtube.com/watch?v=XgiF7Bj-aMs
Note that when Tony gets in the car the radio does not play. But it should play some classic music.

And here
https://www.youtube.com/watch?v=x2P_GqNTxtk
Note that sound disappears after our protagonist gets out of a car and starts to swim
However the video does not show that, as I mentioned above, when switching to the most of stations the sound disappears completely.

P.S. i know that video shows Nvidia SHIELD emulation, but isuues on my Windows 7 look exactly the same,

@hrydgard
Copy link
Owner

Hm, that's not very good. I'm really confused about the increased system requirements though - if anything it should have become faster since 500 revs ago. Are you sure it's not just some setting? If you switch to an old version, do you get the old speed back?

But yeah, our Atrac3 stuff needs work. It's really, REALLY hard to keep all games working the same when developing emulators, what improves one game greatly can hurt another very easily...

@DemiKraw
Copy link

Hello! Thanks for the reply!
So I have just doublechecked performance. Default Settings with V-sync and 5x res.
1.0.1-31 works smooth and stutters a bit when new area of the city loading.

Latest revision stutters constantly and lag very badly (10-15 fps) in the points from where I can see the whole city. Stutters heavily (20-22 fps) when new area of the city loading. Another weird thing that in places where it shows 30 fps the gameplay is very choppy and feels like stutter.

BTW, Chinatown Wars has almost the same performance problem.

Changing settings does not make things better, I can only have some speed up disabling settings that prevent graphical bugs.

1x-2x res plays smooth on both mentioned revisions. The difference starts from 3x and become worse with higher resolutions.

@LunaMoo
Copy link
Collaborator

LunaMoo commented Jul 20, 2015

Did you tried turning off Vertex Cache? I remember "The Warriors" - which is also rockstar game likely using same engine as GTA VCS/LCS - runs terrible with it.

@hrydgard
Copy link
Owner

On what hardware do you see the large performance difference? It really shouldn't be resolution dependent either, as we've barely changed the shader generators in that interval and the only reason resolution should make a difference should be more complex fragment shaders, or any CPU readbacks, which AFAIK does not happen in GTA.

If the difference is as obvious as you say, the best way to track the issue down probably is a good old bisect or binary search. So, try the revision right in the middle of the two (~375-ish). Then if that is also fast, try the one right between that and 750, while if it's slower, try the one in the middle in the other direction, and so on, until you find which revision got slow.

@DemiKraw
Copy link

LunaMoo,
Turning off Vertex Cache helps with stuttering when new city area loading. But that is the only thing that become "fixed"

hrydgard,
My specs:
Windows 7. Intel Quad q9505 3.4 Ghz, 4 GB RAM, GT9800 1 Gb
Hey, could it be connected with video drivers? As you can see my GPU is pretty old and there have been few months already since Nvidia stopped updating its drivers, so my drivers are 6-7 months outdated.

I will try the older version of the drivers. If noone of you, guys dont get such a performance problem - then it is weird, indeed. If nothing changes I will try binary search. I will report about any results.

@unknownbrackets
Copy link
Collaborator

Binary search will be fast, don't worry. For 700 versions it'll mean trying less than 10 downloads of PPSSPP to find the range. What we ideally want is the first one that was bad and the last one that was good.

I also have a 9800 GT. I haven't noticed any significant impacts to render speed. However, there was a change to force CPU for framebuf conversion on older NVIDIA devices (159c8ba). It should not affect a 9800 GT, though.

Maybe be7d1d1 is hurting here or even 5fa3bf0?

-[Unknown]

@DemiKraw
Copy link

unknownbrackets,
thanks for pointing!
Indeed v1.0.1-580-g159c8ba is exact revision where all performance problems begin. 579 rev was the last decently working one and 580, 582 and further are problematic.

Also if its necessary I found exact revision where LCS and CW serious sound problems begin - v1.0.1-221-g62e621f.
216 rev has only long delays as before.
Hope it helps :)

@hrydgard
Copy link
Owner

@DemiKraw thank you for testing! That helps a lot, and explains why you'd see the performance problem and I not, because I have a much more modern nVidia card.

That change was made to solve this issue on old nVidias: hrydgard/native#228 . It hasn't been well tested exactly which nVidia GPU this workaround is needed for, it might be that it's not needed for your GPU.

@unknownbrackets
Copy link
Collaborator

What's weird is, I have a 9800 GT and my drivers support GL 3 just fine. I wonder what's causing it to use OpenGL 2?

-[Unknown]

@DemiKraw
Copy link

hrydgard, nice! Notify me if there is something else I can do :)

unknownbrackets, I dont have any programming/coding skills so I have no idea :)
I dont know if it matters but I have some other problems that not related to PPSSPP. For example I cant use any WebGL based feature in any browser (like human model on zygotebody.com) and Im unable to see 360 degree videos on youtube, I see only it's 'unwrapped' version. I'm telling this only to show that there may be some reasons to think that my exact GPU has some issues or malfunctions.

@hrydgard
Copy link
Owner

@DemiKraw Could you go into Settings / Tools / System Information and take a screenshot of the GPU page?

@DemiKraw
Copy link

Sure. This?

sshot-37
sshot-39

@DemiKraw
Copy link

Daaamn! I've just realized that I was confusing the model of my GPU for the long time. I hope it is not serious. I feel so dumb :(

@DonelBueno
Copy link

Really off topic, but I've always been curious about your PC specs, @hrydgard. What are they?

@hrydgard
Copy link
Owner

@DemiKraw no worries. But hm, with that card, which reports GL 3.3, the commit should not do anything. If it does, either the GL version is reported as < 3, or the build is taking the wrong #ifdef path there, which seems unlikely. Very odd....

@DonelBueno , nothing super special, a 3770K Ivy main CPU, 16 gigs of RAM, and nVidia GeForce 770GTX if I remember correctly. SSD + harddrives. Plus a large pile of Android devices and a Macbook Pro.

@DemiKraw
Copy link

hrydgard,
I see. Looks like you need a few more people with that GPU to confirm your doubts. If reveals that this problem is exclusive to me, this might be the case, when the new video card is the only possible fix :)
I've just tried The Warriors and Midnight Clubs and FF7CC, Kingdom Hearts, Monster Hunter Freedom 1 and Unite and none of them seem to be affected. Looks like it's GTA only problem.

@unknownbrackets
Copy link
Collaborator

You may be able to workaround the problem by disabling "simulate block transfer" or checking "disable slow effects". However, it will look worse.

Maybe gl_extensions.ver[0] is somehow getting cleared? @DemiKraw if you want to try compiling PPSSPP (there's a post on the forum about how, it's not that hard and you might find it interesting), I could tell you a file to change that might give us more insight.

-[Unknown]

@DemiKraw
Copy link

unknownbrackets,
So first of all I have to compile a PPSSPP via this guide?
http://forums.ppsspp.org/showthread.php?tid=5231
Ok will try it. It does not look too difficult in that guide. While I'm trying to figure it out, tell me please, what I have to do after compilling?

@vnctdj
Copy link
Contributor

vnctdj commented Jul 22, 2015

Yes, this tutorial is very good :)
It will help you compile the latest version of PPSSPP.
Afterwards, @unknownbrackets will propose you to edit one or more files and then compile again :)

_Note :_ Bad luck, at the moment, the latest commit (which is 11f64ee) have a problem which prevents to compile with success...

@DemiKraw
Copy link

Ok, so I changed framebuffer.cpp. I have to recompile? Done.

unknownbrackets said:
I'm most interested in:
Whether this works around the issue in the latest build.
^ I should check the performance after changing the framebuffer.cpp?

How frequently it logs the message.
What the log message is.
^^where is that log? Debug-Log Console? What should the message look like?

@hrydgard
Copy link
Owner

  1. Yes, after changing and then compiling, then running. (Ctrl+F5 in Visual Studio)

  2. Yeah, the log console that can be enabled from a menu.

@DemiKraw
Copy link

Still what message should I look for? Log strings do not tell me anything and I see nothing special there. Should that message you talk about be there 100% ? I might have done something wrong.

@unknownbrackets
Copy link
Collaborator

If you're not seeing "Would use CPU for pixconv" during gameplay, then it's highly unlikely that the change here actually caused your performance problem. Maybe we were wrong that it was the cause.

-[Unknown]

@DemiKraw
Copy link

I see. Checked every line of log - nothing similar to "Would use CPU for pixconv".
Further orders?

@hrydgard
Copy link
Owner

If you don't see that, there's no way I can see that v1.0.1-580-g159c8ba is the exact commit that slowed things down, as that log line gets executed at the same time as the only thing that changed in that commit. Can you once again try the commits before and after and confirm that that is the first slow one?

Also, you're not just seeing something like overheating slowing down the card, it's really, really consistent that the version matters?

@DemiKraw
Copy link

I've just doublechecked that again. Same problems with v1.0.1-580-g159c8ba. Everything is fine with 579 except audio.

Well the GPU itself is 70C without games and 80-85C with games. But I have overclocked CPU and it is pretty hot (75-90 and up to 100 in heavy games) and unstable in summer. For example a was getting overheating BSODs in Oddworld New'n'Tasty, Sleeping Dogs and sometimes get them in Mafia 2.
But performance spikes in PSP GTA games clearly obvious begin in v1.0.1-580-g159c8ba.
So maybe I should also check the temperature in 579 and 580 revs?

@hrydgard
Copy link
Owner

It makes no sense - like I said before, if you are not seeing that log message when you add it and build, the v1.0.1-580-g159c8ba change should do nothing. I don't get it.

@DemiKraw
Copy link

You definitely should check it on another 9600GT. If that another card OK I will fix mine with a trash can :)
So is there something alse I can do? I'm ready to go to the end to clear this problem.
But please note, I'm still a programming noob, your instructions should be really detailed :)

@unknownbrackets
Copy link
Collaborator

So, when you run from Visual Studio using Ctrl-F5, the performance has not changed?

The change I suggested basically disables 159c8ba, in addition to logging whenever it would change. So, has the performance improved with that change, or is it still bad?

If it's still bad, there are basically these options:

  1. The performance is affected by multiple factors. One was introduced by that commit, and another completely separate one was introduced later. This feels unlikely, but you never know.
  2. Something else is causing the performance issue, and it's somehow coincidence that those builds perform the way you've noticed. This also seems unlikely at this point.
  3. You're not actually running the new build, or you're using different settings in the new build. If you're using Ctrl-F5, this shouldn't be either.

Either way, we can try something else to verify. Get a git prompt in the directory with the ppsspp code in it, and then run the following command:

git reset --hard 00e57b1

When you switch back to Visual Studio, it'll ask if you want to reload. Say Yes to All. Then recompile. This will send you back to before 159c8ba - to v1.0.1-579-g00e57b1. If it's still slow, that means we've eliminated (probably) option 1 above. It has to be either option 2 or option 3 then.

If this is fast again, then we've verified it's definitely not option 3 above. At that point, the next step is:

git reset --hard 159c8ba

This will send you to v1.0.1-580-g159c8ba. Ideally, double check that the performance problem is back (since this problem seems weird.)

After that, apply my change to Framebuffer.cpp from above.

If it logs things and the performance improves, then that means it's most likely option 1 above. If performance doesn't improve, it's probably option 2. If it does improve, but it's not logging anything, it could still be option 1 or 2.

-[Unknown]

@DemiKraw
Copy link

unknownbrackets,
Performance was still bad.
Got 579 via
git reset --hard 00e57b1 - FAST again.
Got 580 via
git reset --hard 159c8ba - SLOW again.
Applied changes to Framebuffer.cpp - SLOW and does not log anything :(
So this is probably option 2?
Whats next?

@unknownbrackets
Copy link
Collaborator

Erp, I'm stupid. My change is wrong. I feel stupid I didn't give it a second look until now, sorry. All my fault.

Replace this:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA || gl_extensions.ver[0] < 3) {
            useCPU = true;
        }
    }

With:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA || gl_extensions.ver[0] < 3) {
            useCPU = true;
        } else {
            NOTICE_LOG(G3D, "Would use CPU for pixconv, vendor: %d, ver: %d, buf: %08x", gl_extensions.gpuVendor, gl_extensions.ver[0], vfb->fb_address);
            useCPU = true;
        }
    }

So sorry.

-[Unknown]

@DemiKraw
Copy link

unknownbrackets,
Dont worry, sh*t happens :)
I repeated and double checked everything from the beginning and then changed Framebuffer.cpp with ^.
Ahh, sadly everything is exactly the same as in my previous comment :(

@hrydgard
Copy link
Owner

You should be seeing some logging. What if you put the NOTICE_LOG line above the "if (g_Config.iRenderingMode)"? If you are still not seeing any logging, that code isn't called and I can't see any possible way that 159c8ba can have such an impact..

EDIT: I just put a breakpoint there and jumped into my GTA:LCS save and nothing, this code doesn't run at all. Which really makes it a mystery how that change could have any impact whatsoever.

@DemiKraw
Copy link

Done. Still no "Would use CPU for pixconv" message :(

^ I see. Is there something I can do next?

@unknownbrackets
Copy link
Collaborator

Okay let's be super sure.

git reset --hard 159c8ba

Find this code again, but this time, just delete it:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA || gl_extensions.ver[0] < 3) {
            useCPU = true;
        }
    }

Does performance return to normal?

If yes, try this instead:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        useCPU = true;
    }

And then also try this:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA) {
            useCPU = true;
        }
    }

I wonder if some external software is fingerprinting PPSSPP and that's why it's slow with certain code. Like an antivirus or the driver.

-[Unknown]

@PlayerGameSK
Copy link
Author

Guys,I don't wanna be "bad" or whatever but don' you think you're going a bit offtopic of my issue already?

@DemiKraw
Copy link

unknownbrackets,
Now things are getting interesting :) I hope I did not mess here.
So, when I remove code the performance gets much better, but not as good as in 579. FPS is stable but there is a lag when more areas of the city loading.
When I did this
if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
useCPU = true;
}
Things did not change.
But with this
if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA) {
useCPU = true;
}
}
Performance became as good as in 579 as far as I can tell.
Is it good?

claude13112001,
I'm really sorry I caused this off-topic here :( I did not expect that. I think they will clean up this topic as soon as this performance problem ends some how.

@hrydgard
Copy link
Owner

If that works, then this should work, and produce log output for your test scenario:

if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
    if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA) {
        useCPU = true;
    } else {
        NOTICE_LOG(G3D, "Would use CPU for pixconv, vendor: %d, ver: %d, buf: %08x", gl_extensions.gpuVendor, gl_extensions.ver[0], vfb->fb_address);
    }
}

It really seems we must be misdetecting the gl version on your card somehow.

Can you also try the very latest build, and go take another screenshot of device info? I changed how we display the GL version there.

@DemiKraw
Copy link

Still no "Would use CPU for pixconv" unfortunately :(
Here is a screen you asked for:
sshot-52

Orders?

@unknownbrackets
Copy link
Collaborator

So what if you replace that code from earlier:

    if (g_Config.iRenderingMode == FB_BUFFERED_MODE) {
        if (gl_extensions.gpuVendor != GPU_VENDOR_NVIDIA || gl_extensions.ver[0] < 3) {
            useCPU = true;
        }
    }

With a log statement:

NOTICE_LOG(HLE, "HELLO I AM RUNNING HOW ARE YOU?");

If it never logs that, it's not running this code. Maybe it's some weird linker issue or the driver is detecting things. If that's the case we might be out of luck...

-[Unknown]

@DemiKraw
Copy link

unknownbrackets,
Ha-ha! I would be glad to see that in the log.
But nothing like that :(

@PlayerGameSK
Copy link
Author

It's not only radios but credits music too,I completed (100% :) ) VCS just about 10 minutes ago and I watch the whole credits but when the cars went to the second island (first in VCS) it showed the "Welcome to Vice City" postcard and then the music stopped playing and some talking radio (I think it's VCPR or something) started playing and I had to listen to it half the credits! (thank god it's just 10 minutes and that it happend just somewhere in the middle cause I couldn't stand listening to it the whole 10 minutes,cause I am not even English and I don't really understand what they're sayin' there -_- )

Thanks for all the responses :)

@MaxBowie
Copy link

MaxBowie commented Oct 6, 2015

May I post it here?
Okay, so v1.0.1-2783-geb4ca0c made audio work again.
But in LCS I noticed that at least in the first 2 cutscenes sound works only for 0.1 second and than there no sound in that cutscenes at all. Changing sound settings of PPSSPP does not seem to help.

@MaxBowie
Copy link

v1.1.1-66-g5ebd7bf - Both Stories work great - no sound problems so far.
Chinatown Wars - radio delay has GONE completely! You did it! Thank you guys so much!

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

No branches or pull requests

10 participants