audacious-media-player / audacious

A lightweight and versatile audio player
https://audacious-media-player.org
Other
872 stars 116 forks source link

PSF2 plugin hangs when playing some psf2 files #282

Closed Audacious-Bot closed 7 months ago

Audacious-Bot commented 7 months ago

Author Name: Lei YU Original Redmine Issue: https://redmine.audacious-media-player.org/issues/148 Original Date: 2012-07-17


When playing some psf2 files, audacious hangs (consume 100% CPU).

For example, try to play FinalFantasy X's 102 In Zanarkand.minipsf2, audacious hangs. The file can be played successfully on Winamp with Highly Experimental plugin.

I'll post the log with below DEBUG macros enabled (some code in DEBUG_THREADING cause build error, they are commented)

define DEBUG_SPU2 (1) // debug PS2 SPU read/write

define DEBUG_HLE_IOP (1) // debug PS2 IOP OS calls

define DEBUG_UNK_RW (1) // debug unknown reads/writes

define DEBUG_THREADING (1) // debug PS2 IOP threading

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2012-07-30T05:46:15Z


Any chance you could provide a patch?

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: Lei YU Original Date: 2012-07-30T06:56:17Z


John Lindgren wrote:

Any chance you could provide a patch?

Sorry, I have no idea how to fix this issue. Currently my workaround is to let the playback fail if it's in "IOP 'null' state", so that it returns and stop the playback. See https://github.com/mine260309/android-sexypsf-player/commit/3c3524035ef1da24555c6d4ea6e963ca4f06a1cd

Is it able to contact the author of psf2 plugin for help?(it looks like it's originated from Audio Overload?)

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: Ariadne Conill Original Date: 2012-07-30T10:46:11Z


The rip CaitSith2 did for FF10 is well, broken... has invalid opcodes for the IOP. Doesn't even work on an actual PS2.

I redid the rip, you can find those files here: http://tortois.es/~nenolod/ffx.tbz2 - these have a different patch for the replayer which does work on an actual PS2 and also on the audacious PSF2 plugin.

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: Lei YU Original Date: 2012-07-30T16:28:04Z


Wow, great, I have downloaded your rip and it works like a charm :) However, the rip CaitSith2 did works good on Highly Experimental on Winamp, any idea why and how to do that?

And another issue with some songs, e.g. FFXII's "105 - Boss Battle.psf2" and "110 - Penelo's Theme.psf2", Audacious only produces a simple loop sound like it's in forever loop, any idea what's wrong?

Thanks a lot!!

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: Ariadne Conill Original Date: 2012-08-03T01:27:14Z


HE's CPU emulation accepts opcodes that are valid both on the IOP processor of the PS2 and the R3000A of the PS1. The MAME-based CPU implementation is broken in other ways.

I do happen to have the code to HE, but it is under terms that make it undistributable in source form. So I'm weary of doing that.

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: Lei YU Original Date: 2012-08-03T03:43:20Z


William Pitcock wrote:

HE's CPU emulation accepts opcodes that are valid both on the IOP processor of the PS2 and the R3000A of the PS1. The MAME-based CPU implementation is broken in other ways.

I do happen to have the code to HE, but it is under terms that make it undistributable in source form. So I'm weary of doing that.

Thanks a lot for the explanation!

Audacious-Bot commented 7 months ago

Original Redmine Comment Author Name: John Lindgren Original Date: 2012-08-11T20:29:40Z


So, not a bug, I guess.