Opened 14 months ago

Closed 6 weeks ago

Last modified 6 weeks ago

#15476 closed defect (fixed)

SWORD2: PSX: Unhandled Multi-track Video

Reported by: sl2365 Owned by: lephilousophe
Priority: high Component: Engine: Sword2
Version: Keywords:
Cc: Game: Broken Sword 2

Description

I have extracted the RAW stream files from a Playstation 1 IMG file using jPSX.dec as stated in the wiki.

Two files required re-extracting due to errors. But I still get a crash stating this:

generateZipSet: Loaded pack file: shaders.dat
FSDirectory::createReadStreamForMember('stone1.str') -> 'D:\Documents\Games\ScummVM\Broken Sword 2 - The Smoking Mirror\STONE1.STR'
Unhandled multi-track video!
Debugger started, type 'exit' to return to the game.
Type 'help' to see a little list of commands and variables.
ERROR: Unhandled multi-track video!

Reported DPI: 96 default: 96, ratio 1, clipped: 1
Setting 960 x 719 -> 960 x 719 -- 1
Reported DPI: 96 default: 96, ratio 1, clipped: 1
Setting 960 x 719 -> 960 x 719 -- 1

I asked for help via the forum, and was suggested to post a bug report here.
Forum topic: https://forums.scummvm.org/viewtopic.php?p=100044#p100044

I get to the cafe in Paris, talk to the waiter then Andre appears. Once I talk about the STONE, he shows it and I assume a cutscene should appear, that is when the game crashes and I get the error.

ScummVM version: Latest daily build as of this date/time. v2.9.0git10734-gcc0e753dee8.
OS: Windows 11 23H2.
Game Platform: Playstation 1.
Language: English.

Attachments (2)

sword2-psx-us.000 (295 bytes ) - added by sl2365 14 months ago.
sword2-psx-us.001 (315 bytes ) - added by sl2365 14 months ago.

Download all attachments as: .zip

Change History (14)

by sl2365, 14 months ago

Attachment: sword2-psx-us.000 added

by sl2365, 14 months ago

Attachment: sword2-psx-us.001 added

comment:1 by AndywinXp, 14 months ago

Summary: BUG: Broken Sword 2 - Unhandled Multi-track VideoSWORD2: PSX: Unhandled Multi-track Video

comment:2 by davidmorom, 13 months ago

For whatever reason, this cutscene seems to have the video track indexed as 0 instead of 1. Replacing "track == 1" with "track == 0 || track == 1" on line 210 of file "psx_decoder.cpp" fixes the issue, and it doesn't seem to affect the playback of the rest of the cutscenes.

comment:3 by sl2365, 13 months ago

Thanks, seems simple when you know how!
Trouble is, I don't have a file called "psx_decoder.cpp" where is that? I extracted the ISO file but only get the game files, that doesn't exist. Any idea?

comment:4 by sl2365, 13 months ago

I assume it's within the Cutscene file PARIS.CLU itself? I've tried extracting that, but I can't.
I then tried looking at the file in a hex editor, but it doesn't show anything regarding track on line 210.
Not sure what else to try.

Last edited 13 months ago by sl2365 (previous) (diff)

comment:5 by davidmorom, 13 months ago

I'm talking about the source code of the program (https://github.com/scummvm/scummvm/blob/master/video/psx_decoder.cpp). This has to be done by a developer.

In the meanwhile, to progress in the game, you can just delete the file "stone1.str". Is a very irrelevant cutscene, but you can use MPC-HC, for example, to play it, if you want to see it.

comment:6 by sl2365, 13 months ago

Ah ok, lol thanks for the info, much appreciated.

comment:7 by davidmorom, 2 months ago

Priority: normalhigh

A similar bug (#14803) was fixed recently, so maybe this one should be taken into consideration as well, as it makes the game unplayable from a given point.

comment:8 by eriktorbjorn, 7 weeks ago

My guess is that the 0 indicates that this video (STONE1.STR) has no audio on its own, and that the game should just keep playing its own in-game audio. (Which is indeed what happens if you allow the video to be played.)

It's tempting to just change the decoder to (as was suggested) test if track <= 1 instead of track == 1 but if I read the documentation referred to in the header of the source code correctly it doesn't indicate the number of channels in the file. Just which particular channel should be played at the moment:

Channel number (1 byte)
The sub-channel in this 'file'. Video, audio and data sectors can be mixed into the same channel or can be on separate channels. Usually used for multiple audio tracks (e.g. 5 different songs in the same 'file', on channels 0, 1, 2, 3 and 4)

Last edited 7 weeks ago by eriktorbjorn (previous) (diff)

comment:9 by eriktorbjorn, 7 weeks ago

Or maybe we should simply drop that check from video decoding and only do it for audio decoding?

comment:10 by Le Philousophe <lephilousophe@…>, 6 weeks ago

In 598581c3:

VIDEO: Don't hardcode expected channels in PSX decoder

Still allow only one channel, but the channel number doesn't matter.
Also rename track to channel to follow the specifications.

Fixes Trac#15476.

comment:11 by bluegr, 6 weeks ago

Owner: set to lephilousophe
Resolution: fixed
Status: newclosed

comment:12 by Le Philousophe <lephilousophe@…>, 6 weeks ago

In d121f4d9:

VIDEO: Don't hardcode expected channels in PSX decoder

Still allow only one channel, but the channel number doesn't matter.
Also rename track to channel to follow the specifications.

Fixes Trac#15476.

Note: See TracTickets for help on using tickets.