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

Retroarch Playstation 2 it freezes #231

Open
andres0021 opened this issue Dec 3, 2023 · 24 comments
Open

Retroarch Playstation 2 it freezes #231

andres0021 opened this issue Dec 3, 2023 · 24 comments

Comments

@andres0021
Copy link

Hello, I wanted to report that the PS2 retroarch, the GPS freezes in the vast majority of games, a few minutes after starting some games it freezes, all of this happens on the console. I have no idea if it also freezes in the emulator.

@hugorsgarcia
Copy link

I reported a lot of these problems back in 2021. I even recorded gameplay of 30 or 40 games I found freezing but there was a lot more. Recently I tested some games again like Golden sun 1 and 2, Zelda minish cap, Metroid Fusion and Gunstar Super Heroes. All of will freezing after some time playing. A lot of changes were made since them but they did not fix these problems. Metroid Fusion back in 2021 have no problems in my tests. But now some new bugs were also introcuced

@andymcca
Copy link

I've started playing around with ps2dev with a view to doing my own RA/gpsp static core build for PS2. If successful I'll try and troubleshoot this issue.
Absolutely no promises though!

@andres0021
Copy link
Author

I've started playing around with ps2dev with a view to doing my own RA/gpsp static core build for PS2. If successful I'll try and troubleshoot this issue. Absolutely no promises though!

I've started playing around with ps2dev with a view to doing my own RA/gpsp static core build for PS2. If successful I'll try and troubleshoot this issue. Absolutely no promises though!

I hope you make it my friend, let me know anything!

@andymcca
Copy link

@andres0021 @hugogacia360 help me out pls - I've built a gpsp static core for my PS2 using the dev kit but when I go to Load Content and select a GBA ROM it comes up 'No Cores Available'. It does show gpsp as the core tho and I do have the core info file in place. Anything I'm doing wrong???

@zoltanvb
Copy link

Try disabling Settings / Core / Always reload core.

@andymcca
Copy link

Thanks @zoltanvb I was able to figure out what I was doing wrong (core directory needs to be set to the same directory you've run the static core from!)

So I have played around a lot with this over the last couple of days and also discussed with David. He suspected the Dynarec may have the issue and asked me to test with this disabled - sure enough, this seems to work around the issue at the expense of significantly reduced performance. @hugogacia360 @andres0021 please can you also test a few ROMS with Dynarec turned off (has to be from the very beginning i.e. set in Core Options) to confirm?

Will continue to investigate and update here if any further discoveries.

@andres0021
Copy link
Author

andres0021 commented Dec 30, 2023 via email

@andres0021
Copy link
Author

andres0021 commented Dec 30, 2023 via email

@andymcca
Copy link

@andres0021 be specific please, which game(s) are still freezing with dynarec off?

@andres0021
Copy link
Author

andres0021 commented Dec 31, 2023 via email

@andymcca
Copy link

Thank you, I will try that today and report back here/to David.

@andres0021
Copy link
Author

andres0021 commented Jan 1, 2024 via email

@andymcca
Copy link

andymcca commented Jan 1, 2024

Access the Retroarch Quick Menu while in-game, then go to Core Options -> Dynamic Recompiler and turn it off. You then need to save the Core configuration and restart Retroarch.

@andres0021
Copy link
Author

andres0021 commented Jan 1, 2024 via email

@andymcca
Copy link

andymcca commented Jan 1, 2024

Yes it will be like that.on a lot of games in Interpreter mode. Am making some progress identifying this issue, need to get psclient set up to dump some useful crash info.

@hugorsgarcia
Copy link

Thanks @zoltanvb I was able to figure out what I was doing wrong (core directory needs to be set to the same directory you've run the static core from!)

So I have played around a lot with this over the last couple of days and also discussed with David. He suspected the Dynarec may have the issue and asked me to test with this disabled - sure enough, this seems to work around the issue at the expense of significantly reduced performance. @hugogacia360 @andres0021 please can you also test a few ROMS with Dynarec turned off (has to be from the very beginning i.e. set in Core Options) to confirm?

Will continue to investigate and update here if any further discoveries.

Dynarec off ? That will be quite slow

@andymcca
Copy link

andymcca commented Jan 8, 2024

Dynarec off ? That will be quite slow

It's not the solution - but it does demonstrate that the problem is with the Dynarec as David suspected. I have a lot of work on at the moment, hoping to get back to this soon and do some debugging with pslink to try and get to the bottom of it. In the Dynarec if I flush the PS2 dcache/icache unconditionally after each block compilation then it doesn't crash. But of course that makes things just as slow as the Interpreter (maybe not as bad). And also it's difficult to draw conclusions from that - so it needs more investigation.

@andres0021
Copy link
Author

andres0021 commented Feb 6, 2024 via email

@andymcca
Copy link

I recently picked this up again. The next task would be to get ps2link working to debug the freezing. Have already started on this but not getting very far and it (like everything with RA/gpsp) is incredibly time-consuming.

@zoltanvb I think you did some work on fixing the audio for PS2 Retroarch. It may just be my test setup but I find that if I mess with the playback frequency in Retroarch settings it makes things even more unstable e.g. if I change the rate down to 22050 and the latency up to 128ms then gpsp won't even start a game for me (it brings me back to the game selection screen and then hangs). If you have some time would you be able to test this and see if you get the same instability?

@andymcca
Copy link

@andres0021 to be honest, you may be better off using TempGBA for PS2 instead if you're really set on GBA emulation on the PS2......

@andymcca
Copy link

@andres0021 and anyone else struggling with the freezes on PS2 -

Try this static core build for PS2, just put it over the top of the one that comes with the latest RetroArch PS2 release. In testing I found that increasing the frequency of icache invalidation helps with the stability of the dynarec at the cost of speed, so this build is a bit of a hack-y halfway house between the two. YMMV depending on the game.

gpsp_libretro_ps2.zip

@andymcca
Copy link

Potential discovery with this - I tried out ReGBA this morning which is a standalone-gpsp variant, just to see how it runs etc. No crashing/freezing like in lr-gpsp in-game BUT at one point I pressed the triangle button to enter the menu.....and this triggered the exact same type of freeze as in Retroarch gpsp i.e. audio carries on playing the same note it was on, console becomes immediately unresponsive (have to hard power off, reset doesn't work)!

@andres0021 I think you described this on the Blazing Blade issue but I didn't realise that it's the exact same crash we get in lr-gpsp. May be something to go on....

@andres0021
Copy link
Author

andres0021 commented Oct 12, 2024 via email

@andymcca
Copy link

It gives me something to go on to work at the problem. I'm now thinking the emulator gets stuck in a while loop somewhere when running on PS2. I want to test by recompiling TempGBA but the code needs changing to compile using the latest version of the PS2SDK. All so time-consuming.......

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

4 participants