DXA support in BrokenSword 1/2

Ask for help with ScummVM problems

Moderator: ScummVM Team

User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

DXA support in BrokenSword 1/2

Post by Raziel »

Sorry if this has been covered already

Is it already in SVN?
edit: How does one "activate" it?

The FeebleFiles with the new DXA vids look marvellous and i
want to get rid of the "sub-optimal" MP2 vids from BS1/2 as
soon as possible

I know there's a feature request, but it's not very much
frequented and drawing info out of there is kind of a pita :-)
edit: http://sourceforge.net/tracker/index.ph ... tid=418823

I'd address myself to betatest! ;-)
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Re: DXA support in BrokenSword 1/2

Post by eriktorbjorn »

Raziel wrote:Sorry if this has been covered already

Is it already in SVN?
edit: How does one "activate" it?
As indicated in the feature request you linked to, the SVN version of ScummVM should support DXA movies for Broken Sword 2 already. But since I'm in the process of moving to another city, I haven't found the energy to add support to Broken Sword 1 yet.

The "activation" should be automatic, assuming ScummVM is compiled with the appropriate libraries: zlib for DXA, and libmpeg2 for MPEG, and, of course, whatever is needed to play the compressed sound. The game will first look for a DXA movie. If that fails, it will look for an MPEG movie. If that also fails, it will use a "dummy" player for the voice-over and subtitles.
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Re: DXA support in BrokenSword 1/2

Post by Raziel »

eriktorbjorn wrote:
Raziel wrote:Sorry if this has been covered already

Is it already in SVN?
edit: How does one "activate" it?
As indicated in the feature request you linked to, the SVN version of ScummVM should support DXA movies for Broken Sword 2 already. But since I'm in the process of moving to another city, I haven't found the energy to add support to Broken Sword 1 yet.

The "activation" should be automatic, assuming ScummVM is compiled with the appropriate libraries: zlib for DXA, and libmpeg2 for MPEG, and, of course, whatever is needed to play the compressed sound. The game will first look for a DXA movie. If that fails, it will look for an MPEG movie. If that also fails, it will use a "dummy" player for the voice-over and subtitles.
Thanks and sorry for the delay, damn nightshifts

So, i have to put the .DXA files in BS2's main dir, what about ScummVM looking in a VIDEO subdir, doesn't seem to find anything if put in one yet?
oduverne
Posts: 57
Joined: Sat Apr 15, 2006 4:43 pm

Post by oduverne »

I put dxa videos in video subdirectory and it works fine
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

oduverne wrote:I put dxa videos in video subdirectory and it works fine
Well, if i put it in a VIDEO or VIDEOS subdir i get
"Broken Sword 2: Cannot find SCRIPTS.CLU"

If it put it in the main (BS2) dir, i get the eye.dxa playing fine
but the next video which comes right after not, just a black screen
telling me "NARRATOR" and i should go and download the videos

Do i miss a video here, if it's INTRO.DXA i HAVE got it, but it's not playing then :-(
whatever
Posts: 27
Joined: Fri Jun 30, 2006 5:21 pm

Post by whatever »

just tried it, works fine.
the filesize with dxa is noticeable larger than the mpeg2 solution (dxa + ogg = 112.5MB with "-q 4" vorbis), but as dxa is a losless compression method the quality is exactly the same as with the original smk files.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Raziel wrote: Well, if i put it in a VIDEO or VIDEOS subdir i get
"Broken Sword 2: Cannot find SCRIPTS.CLU"
I have no idea why adding a subdirectory would cause ScummVM to not find files in the main directory. Doesn't make any sense at all to me.
Raziel wrote: If it put it in the main (BS2) dir, i get the eye.dxa playing fine but the next video which comes right after not, just a black screen telling me "NARRATOR" and i should go and download the videos

Do i miss a video here, if it's INTRO.DXA i HAVE got it, but it's not playing then :-(
INTRO.DXA ought to work. I have no idea why it doesn't for you. What happens if you keep INTRO.DXA (and its audio file), but temporarily remove the "eye" ones?
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

eriktorbjorn wrote:
Raziel wrote: Well, if i put it in a VIDEO or VIDEOS subdir i get
"Broken Sword 2: Cannot find SCRIPTS.CLU"
I have no idea why adding a subdirectory would cause ScummVM to not find files in the main directory. Doesn't make any sense at all to me.
Raziel wrote: If it put it in the main (BS2) dir, i get the eye.dxa playing fine but the next video which comes right after not, just a black screen telling me "NARRATOR" and i should go and download the videos

Do i miss a video here, if it's INTRO.DXA i HAVE got it, but it's not playing then :-(
INTRO.DXA ought to work. I have no idea why it doesn't for you. What happens if you keep INTRO.DXA (and its audio file), but temporarily remove the "eye" ones?
I'm just int he process of bugtracking a maybe only backend (OS4)
related issue.

I have recopied the mpeg cutscenes, but it doesn't play them too
Not sure why, have to juggle around with the files, but it seems
the .dxa support you implemented broke hte playback from the OS4
build in some way...let's see if i can sum it up

Thanks for the hints so far
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

OK now, breakdown...

ScummVM 0.10.0svn (Aug 14 2006 20:27:00)
Features compiled in: Vorbis FLAC MP3 zLib MPEG2

Somethings broken (no offence please), maybe in the file handling of the backend?

With the original mp2 files in the main game dir only eye.mp2 is played, intro.mp2 fails (NARRATOR)
With the dxa files the very same

As soon as i put a VIDEO, VIDEOS, VIDEOS_DXA or something subdir in the game dir it
"Broken Sword 2: Cannot find SCRIPTS.CLU", don't ask me why, it sounds as stupid to you as it does to me :-/

When i remove eye.mp2/.dxa i get the narrator also

It's working (with the mp2 files of course) with the 0.9 release...
Any hints?

Should i try to catche the log with -q2 or 3 or even -q9?
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Raziel wrote:With the original mp2 files in the main game dir only eye.mp2 is played, intro.mp2 fails (NARRATOR)
With the dxa files the very same
Well, there could be some memory corruption going on, but my very limited testing with Valgrind didn't turn up anything. (My computer is much too slow to do any extensive Valgrind testing, though.)

But you say that you do get the "narration only" mode, and that could be interesting, because the code to select which mode to use is extremely simple:

Code: Select all

MoviePlayer *makeMoviePlayer(Sword2Engine *vm, const char *name) {
    char filename[20];

#ifdef USE_ZLIB
    snprintf(filename, sizeof(filename), "%s.dxa", name);

    if (Common::File::exists(filename)) {
        return new MoviePlayerDXA(vm);
    }
#endif

#ifdef USE_MPEG2
    snprintf(filename, sizeof(filename), "%s.mp2", name);

    if (Common::File::exists(filename)) {
        return new MoviePlayerMPEG(vm);
    }
#endif

    return new MoviePlayerDummy(vm);
}
What you're getting is the "dummy" player, and for that to happen, either USE_MPEG2 and USE_ZLIB weren't defined (in which case you wouldn't even have seen the "eye" movie), or the tests for DXA and MP2 files both failed.

Finding out why might be a good place to start.
User avatar
john_doe
ScummVM Developer
Posts: 117
Joined: Fri Nov 04, 2005 8:25 pm
Location: Stuttgart, Germany

Post by john_doe »

Just an idea, could it be the case of the filename(s)?
I have no clue about OS4 and if the File::exists code is case sensitive or not.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

john_doe wrote:Just an idea, could it be the case of the filename(s)?
I have no clue about OS4 and if the File::exists code is case sensitive or not.
It used to be that ScummVM tried the original form of the file name, an all upper-case version, and an all lower-case version. Nowadays, I believe it's supposed to be completely case-insensitive.
User avatar
Raziel
ScummVM Porter
Posts: 1542
Joined: Tue Oct 25, 2005 8:27 am
Location: a dying planet
Contact:

Post by Raziel »

eriktorbjorn wrote:
john_doe wrote:Just an idea, could it be the case of the filename(s)?
I have no clue about OS4 and if the File::exists code is case sensitive or not.
It used to be that ScummVM tried the original form of the file name, an all upper-case version, and an all lower-case version. Nowadays, I believe it's supposed to be completely case-insensitive.
Never had a problem with case sensivity on OS4

I did a complete recompile, new configure...

All files except the video files in main dir

Now i have a VIDEOS_DXA or VIDEOS_MP2 folder, i get the
mentioned Broken Sword 2: No SCRIPTS.CLU found

If i rename the VIDEOS_DXA or VIDEOS_MP2 or VIDEO
to VIDEOS it goes through but gives me only the Narrator (?)
(That goes for both MP2 and DXA - what the...)

If i keep the video files in the main dir together
with the rest, it's stuck on the SCRIPTS.CLU (huh?)

It plays the dxa's from Feeble, BUT these are encoded with the
OLD method, BS2 videos are encodes with the new method, so
Which version of zlib do i need to get them decoded?
I have 1.2.3 (Maybe there's the crux?)

What i don't understand is
Why isn't it going though as soon as i have a subdir NOT named VIDEOS???
(btw, this works with a CLUSTERS subdir too - well, it doesn't work) :-)

I know it's something completely stupid simple, but
i can't point to it yet :-(
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

The current SVN version should support DXA movies in both Broken Sword 1 and 2 now. There's some cleanup/restructuring of the code I'd like to do, but at least the groundwork's there.
whatever
Posts: 27
Joined: Fri Jun 30, 2006 5:21 pm

Post by whatever »

with broken sword 1 i get some garbage in the lower part of the screen instead of the black bar in some movies (not in all of them, intro works fine for example). apart from that it works as intended.

example (ending):
Image
Post Reply