libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
52 stars 52 forks source link

Retroarch Playstation 2 it freezes #231

Open andres0021 opened 10 months ago

andres0021 commented 10 months ago

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.

hugogacia360 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

@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 commented 9 months ago

Try disabling Settings / Core / Always reload core.

andymcca commented 9 months ago

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 commented 9 months ago

I can't find that option friend, where is it?

El sáb., 30 de diciembre de 2023 2:05 p. m., andymcca < @.***> escribió:

Thanks @zoltanvb https://github.com/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 https://github.com/hugogacia360 @andres0021 https://github.com/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.

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1872566026, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7GKSWFRIXG6BYQTALTYMBCUHAVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGU3DMMBSGY . You are receiving this because you were mentioned.Message ID: @.***>

andres0021 commented 9 months ago

I just disabled that option I mentioned in cores, but it keeps freezing

El sáb., 30 de diciembre de 2023 4:00 p. m., Andrés21 @.***> escribió:

I can't find that option friend, where is it?

El sáb., 30 de diciembre de 2023 2:05 p. m., andymcca < @.***> escribió:

Thanks @zoltanvb https://github.com/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 https://github.com/hugogacia360 @andres0021 https://github.com/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.

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1872566026, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7GKSWFRIXG6BYQTALTYMBCUHAVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGU3DMMBSGY . You are receiving this because you were mentioned.Message ID: @.***>

andymcca commented 9 months ago

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

andres0021 commented 9 months ago

Kirby & the Amazing Mirror

El dom., 31 de diciembre de 2023 7:01 a. m., andymcca < @.***> escribió:

@andres0021 https://github.com/andres0021 be specific please, which game(s) are still freezing with dynarec off?

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1872909322, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7GA2HR7YZUE3IDSHMLYMEZWJAVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSHEYDSMZSGI . You are receiving this because you were mentioned.Message ID: @.***>

andymcca commented 9 months ago

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

andres0021 commented 9 months ago

By the way, where do I turn off dynarec? I just turned off the Always reload core that zoltanvb mentioned

El dom., 31 de diciembre de 2023 7:26 a. m., andymcca < @.***> escribió:

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

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1872914362, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7GUYUXS4TW54DHT5K3YME4V7AVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSHEYTIMZWGI . You are receiving this because you were mentioned.Message ID: @.***>

andymcca commented 9 months ago

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 commented 9 months ago

oh yeah, it seems that way it works, the problem is that the games run very slow if you deactivate that option

El lun., 1 de enero de 2024 1:15 p. m., andymcca @.***> escribió:

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.

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1873386460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7D7XG27PVI7ZDSER2TYMLOLLAVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGM4DMNBWGA . You are receiving this because you were mentioned.Message ID: @.***>

andymcca commented 9 months ago

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.

hugogacia360 commented 8 months ago

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 commented 8 months ago

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 commented 7 months ago

Hello, is there any way to solve the crashes of "fire emblem the blazing blade"?

El lun., 8 de enero de 2024 7:12 p. m., andymcca @.***> escribió:

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.

— Reply to this email directly, view it on GitHub https://github.com/libretro/gpsp/issues/231#issuecomment-1881903138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO7AR7ABNET7U2KKPX5LUWDYNRVMTAVCNFSM6AAAAABAEXK6ZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBRHEYDGMJTHA . You are receiving this because you were mentioned.Message ID: @.***>

andymcca commented 6 months ago

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 commented 6 months ago

@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 commented 6 months ago

@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