Loom CD talkie problem

Subforum for discussion and help with ScummVM's Dreamcast port

Moderator: ScummVM Team

User avatar
eriktorbjorn
ScummVM Developer
Posts: 3522
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Who'sThere wrote: You wouldn't happen to know which version of ScummVM was the last to use the older method?
Looks like it was ScummVM 0.9.x. There, seeking was simply

Code: Select all

        // Calc offset. As all bitrates are in kilobit per seconds, the division by 200 is always exact
        offset = (startFrame * (_mad_header.bitrate / (8 * 25))) / 3;
#ifdef __SYMBIAN32__
        // Reopen the file if it is not open yet
        if(!_file->isOpen())
                _file->open(_file->name());
#endif
        _file->seek(offset, SEEK_SET);
User avatar
Who'sThere
Posts: 46
Joined: Wed Dec 31, 2008 12:18 am

Post by Who'sThere »

[quote="eriktorbjorn]Looks like it was ScummVM 0.9.x.[/quote]
Did this only apply to the cdda tracks, or was it also used for say.... the Lucasart games' "monster.sou" files as well?

Correct me if I'm wrong...

I believe they (.sou) contain multiple smaller audio files that when compressed by the official tools are done in VBR.
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3522
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

Who'sThere wrote:Did this only apply to the cdda tracks, or was it also used for say.... the Lucasart games' "monster.sou" files as well?
As you say, the monster.sou file consists of lots and lots of smaller files. ScummVM only has to find where in the file the desired sound is, but that's easy: The game script provides the exact offset. (Of course, things get a little more complicated if the file has been compressed... but not much.) But there is, to the best of my knowledge, no seeking within the sound itself.

For games that use CD audio for music, e.g. the CD version of The Secret of Monkey Island, there are several CD tracks, but none of them is more than a few minutes so even if it has to seek within it (e.g. in the Monkey Island intro), it never has to seek far. In Loom, on the other hand, there is only one, very long audio track. So if the game says "play 5 seconds, starting at 50 minutes into the track", ScummVM has to decode 50 minutes worth of MP3 frame headers to find it.

At least, that's how I think it works.
User avatar
DCDayDreamer
Posts: 90
Joined: Sat Nov 05, 2005 5:13 pm
Location: Dream Land
Contact:

Post by DCDayDreamer »

eriktorbjorn wrote:
Who'sThere wrote:Did this only apply to the cdda tracks, or was it also used for say.... the Lucasart games' "monster.sou" files as well?
As you say, the monster.sou file consists of lots and lots of smaller files. ScummVM only has to find where in the file the desired sound is, but that's easy: The game script provides the exact offset. (Of course, things get a little more complicated if the file has been compressed... but not much.) But there is, to the best of my knowledge, no seeking within the sound itself.
This is why the Dreamcast can still play the games that have large audio resource files very well (monster.sou for example), even with all the data on CDR, and the limited hardware resources, the game script makes it easier for the old console to cope with the game itself.
eriktorbjorn wrote:For games that use CD audio for music, e.g. the CD version of The Secret of Monkey Island, there are several CD tracks, but none of them is more than a few minutes so even if it has to seek within it (e.g. in the Monkey Island intro), it never has to seek far. In Loom, on the other hand, there is only one, very long audio track. So if the game says "play 5 seconds, starting at 50 minutes into the track", ScummVM has to decode 50 minutes worth of MP3 frame headers to find it.

At least, that's how I think it works.
That's how I thought it worked too.

The problem with Loom and the audio track is not a limitation of ScummVM though, it's a limitation of the hardware that's using ScummVM and that particular version of the game. It appears the Wii port has the same problem too:

Loading Time Problem with Loom CD Version

Although a different platform entirely, the same principle applies to both consoles: it's a matter of the memory/processing/data transfer rate, the Dreamcast is restricted with the data on CDR, the Wii it seems is restricted to the data on SD card. Both these methods do not have the best transfer rate for dealing with a single audio file of that size, and especially if memory restrictions mean that you have to seek the audio file every time the game requires a chunk of audio to play.
mc
ScummVM Porter
Posts: 8
Joined: Fri Jun 02, 2006 8:12 pm
Location: Linköping

Post by mc »

Pardon me, but is this some special version of Loom which does not work with CD-DA? Because Loom is running fine for me when using the original CD which has CD-DA sound.
User avatar
DCDayDreamer
Posts: 90
Joined: Sat Nov 05, 2005 5:13 pm
Location: Dream Land
Contact:

Post by DCDayDreamer »

mc wrote:Pardon me, but is this some special version of Loom which does not work with CD-DA? Because Loom is running fine for me when using the original CD which has CD-DA sound.
It's not a special version, it's a data loading lag problem when using Loom with compressed audio. After reading your post I compiled (and partially tested) a Loom ScummVM CD with CDDA for the Dreamcast, there is virtually no lag at all! - the sound is instantaneous. This is the first time I've used version 0.13.1 with a large CDDA track (previous builds had pauses/lag for me) and I'm impressed to say the very least.

However, during the conversation between the elders some audio dialogue did not play, this might be a problem with my audio rip though (I'll do some more testing later, along with swap disk from original CD). I haven't play tested much further into the game yet but I can say that with CDDA there is virtually no lag on the Dreamcast (even playing the notes on the staff is instantaneous).

Thanks for all your efforts Marcus.
User avatar
Who'sThere
Posts: 46
Joined: Wed Dec 31, 2008 12:18 am

Post by Who'sThere »

DCDayDreamer wrote:I haven't play tested much further into the game yet but I can say that with CDDA there is virtually no lag on the Dreamcast (even playing the notes on the staff is instantaneous).
Are we talking about the same game here? When I first loaded up the game there was a significant wait while the "Loom Title" logo music was waiting to be loaded. From then on out anything that started notes/voices would take at least a minute to load, and that was the track encoded at 128kbps.

To be quite honest, I don't like disc swapping, It's so 2001...

EDIT
Ooooh I see, you meant burning the track as a cdda via a proggy like Bootdreams? Well I'll see if I can get my burner to use BD's "cdrecord" option as it hasn't worked for me in the past.
User avatar
DCDayDreamer
Posts: 90
Joined: Sat Nov 05, 2005 5:13 pm
Location: Dream Land
Contact:

Post by DCDayDreamer »

Who'sThere wrote:Ooooh I see, you meant burning the track as a cdda via a proggy like Bootdreams? Well I'll see if I can get my burner to use BD's "cdrecord" option as it hasn't worked for me in the past.
If cdrecord doesn't work for you, here's a guide how to create a custom Loom Audio/Data CD Image using BootDreams.

From the Dreamcast plainfiles put the following files in a directory on your hard drive named Loom (any directory name will do, this directory will be your Dreamcast CD root):

IP.BIN
SCUMM.PLG
SCUMMVM.BIN

From the Loom CD put these files in root (Loom directory on your hard drive):

DISK01.LEC, *.LFL

Rip the Loom audio track as .WAV (name it loom.wav if you want) and put it into the CDDA directory within BootDreams.

Start BootDreams
Check all your ISO Settings
Check Dummy file
Select A120% (Alcohol icon)
Browse for the Loom directory on your hard drive
Click Process
Click YES at the question
Select the LOOM.WAV from the list that appears in the left panel
Click the arrow to transfer the file to the right panel
Click OK (the audio conversion process will begin)
Select where to save the CD Image (Loom.mds) (the CD creation process will begin)

When complete, burn to CDR with Alcohol 120%.
User avatar
Who'sThere
Posts: 46
Joined: Wed Dec 31, 2008 12:18 am

Post by Who'sThere »

You know what, I hadn't tried the Alcohol 120% method until a couple days ago. Didn't even realize the option was there...

Problem is that Alcohol 120% doesn't recognize the image.

I had tried this on a Windows 98SE PC that I had an older version of Alcohol on. Does this require the latest version of Alcohol? Could you tell me which version of BootDreams, and which version of Alcohol you used successfully?

BTW - If I wanted to run the game off the original disc, I'd use the PC version of ScummVM with all it's superior features.
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

If support were ever added for the Steam version's CDDA.SOU file, would that stream better?
User avatar
DCDayDreamer
Posts: 90
Joined: Sat Nov 05, 2005 5:13 pm
Location: Dream Land
Contact:

Post by DCDayDreamer »

Who'sThere wrote:I had tried this on a Windows 98SE PC that I had an older version of Alcohol on. Does this require the latest version of Alcohol? Could you tell me which version of BootDreams, and which version of Alcohol you used successfully?
Sorry for the late reply here, for Dreamcast stuff with CDDA I use BootDreams 1.0.6c (latest version), and Alcohol 120% version 1.9.5.4327 (2006-07-31).
Who'sThere wrote:BTW - If I wanted to run the game off the original disc, I'd use the PC version of ScummVM with all it's superior features.
That goes without saying, but the whole point here is to try and get the game running on the ever aging Dreamcast, and fortunately there is disc swap support to at least test how the game works in it's original form before creating and burning an optimized standalone CD. Hope you manage to sort out a disc with CDDA, I'm sure you'll be pleasantly surprised with the old dog (the Dreamcast, not the game).
marzipan wrote:If support were ever added for the Steam version's CDDA.SOU file, would that stream better?
Not sure, but I'd guess the results would probably be similar to (perhaps slightly better than) having the audio as MP3, the game has to seek through the audio file every time it requires a chunk of audio to play, so there could be audio lag once again.
Post Reply