Menu

#497 Rayman (v1.00) Fails CD Check

0.74
open
None
1
2019-07-31
2018-12-29
RibShark
No

When attempting to run v1.00 of Rayman in DOSBox, both the installer (CONFIG.EXE) and the main game (RAYMAN.EXE) fail the CD check. Note that this only occurs with v1.00 of Rayman; with future versions the game runs fine in DOSBox. I am using a redump.org verified CD image, which means that this isn't simply a bad dump. I have tested in PCem and the game installs and runs fine there.

Discussion

  • RibShark

    RibShark - 2018-12-29

    (also, the reason this bug has likely gone unreported is that the v1.00 version of Rayman appears to be extremely rare compared to the other versions)

     
  • RibShark

    RibShark - 2018-12-29

    Delete issue, fixed in SVN.

     
  • Qbix

    Qbix - 2018-12-30
    • status: open --> fixed
     
  • RibShark

    RibShark - 2019-04-26

    No longer fixed, not sure when it broke again. The installer works with the latest SVN build, but the game itself fails the check and will only run in limited mode (no CD tracks, watermark over gameplay, only a single screen of gameplay before the game force-closes). This happens when using IMGMOUNT, but if using MOUNT -t cdrom on an actual CD drive (or Daemon Tools in SCSI but not DT mode), the game works. And the image is good (I dumped it to redump.org standards, and it works in PCem).

     

    Last edit: RibShark 2019-04-26
  • krcroft

    krcroft - 2019-04-26

    Ribshark,

    Rayman 1.0 might be sensitive to MSF locations. Skim the first post here then see the 4th post in the thread where I explain it further https://www.vogons.org/viewtopic.php?f=33&t=62417

    If you want to try it, the current version of DOSBox ECE includes the latest version of this MSF handling patch.

    Even though I have a later version of Rayman, I do recall my version being similarly tempermental with the same behavior you're describing.

    Track  1: MODE1/2352    01 00:00:00
    Track  2: AUDIO         00 10:17:43 01 10:19:43
    Track  3: AUDIO         00 12:49:25 01 12:51:25
    <snip>
    

    Here's my delta changes to dosbox.conf:

    [cpu]
    core=dynamic
    cycles=max 95% limit 30000
    cputype=auto
    
    [dosbox]
    machine=vgaonly
    memsize=16
    
    [mixer]
    nosound=false
    rate=48000
    blocksize=2048
    prebuffer=20
    
    [gus]
    gus=true
    gusrate=48000
    gusbase=240
    gusirq=5
    gusdma=3
    
    [dos]
    xms=true
    ems=false
    umb=true
    
    [speaker]
    pcspeaker=true
    tandy=off
    disney=false
    
    [sblaster]
    sbtype=none
    
    [autoexec]
    mixer gus 400:400
    

    Rayman was installed to "c:\rayman", configured with GUS audio, and the CDROM was imgmounted to D:

    Audio tracks were compressed with Ogg OPUS and mounted using the following cue
    (DOSBox ECE also includes the patch for FLAC, Opus, and MP3 audio track handling).

    Note that I'm not using a PREGAP of 2s nor did I have to lock down MSF track locations like I had to with Destruction Derby in the Vogons thread.

    FILE "data.iso" BINARY
      TRACK 01 MODE1/2048
        INDEX 01 00:00:00
    FILE "track02.opus" OPUS
      TRACK 02 AUDIO
        INDEX 01 00:00:00
    FILE "track03.opus" OPUS
      TRACK 03 AUDIO
        INDEX 01 00:00:00
    FILE "track04.opus" OPUS
      TRACK 04 AUDIO
        INDEX 01 00:00:00
    FILE "track05.opus" OPUS
      TRACK 05 AUDIO
        INDEX 01 00:00:00
    FILE "track06.opus" OPUS
      TRACK 06 AUDIO
        INDEX 01 00:00:00
    FILE "track07.opus" OPUS
      TRACK 07 AUDIO
        INDEX 01 00:00:00
    FILE "track08.opus" OPUS
      TRACK 08 AUDIO
        INDEX 01 00:00:00
    FILE "track09.opus" OPUS
      TRACK 09 AUDIO
        INDEX 01 00:00:00
    FILE "track10.opus" OPUS
      TRACK 10 AUDIO
        INDEX 01 00:00:00
    FILE "track11.opus" OPUS
      TRACK 11 AUDIO
        INDEX 01 00:00:00
    FILE "track12.opus" OPUS
      TRACK 12 AUDIO
        INDEX 01 00:00:00
    FILE "track13.opus" OPUS
      TRACK 13 AUDIO
        INDEX 01 00:00:00
    FILE "track14.opus" OPUS
      TRACK 14 AUDIO
        INDEX 01 00:00:00
    FILE "track15.opus" OPUS
      TRACK 15 AUDIO
        INDEX 01 00:00:00
    FILE "track16.opus" OPUS
      TRACK 16 AUDIO
        INDEX 01 00:00:00
    FILE "track17.opus" OPUS
      TRACK 17 AUDIO
        INDEX 01 00:00:00
    FILE "track18.opus" OPUS
      TRACK 18 AUDIO
        INDEX 01 00:00:00
    FILE "track19.opus" OPUS
      TRACK 19 AUDIO
        INDEX 01 00:00:00
    FILE "track20.opus" OPUS
      TRACK 20 AUDIO
        INDEX 01 00:00:00
    FILE "track21.opus" OPUS
      TRACK 21 AUDIO
        INDEX 01 00:00:00
    FILE "track22.opus" OPUS
      TRACK 22 AUDIO
        INDEX 01 00:00:00
    FILE "track23.opus" OPUS
      TRACK 23 AUDIO
        INDEX 01 00:00:00
    FILE "track24.opus" OPUS
      TRACK 24 AUDIO
        INDEX 01 00:00:00
    FILE "track25.opus" OPUS
      TRACK 25 AUDIO
        INDEX 01 00:00:00
    

    Here's my launch batch file:

    cd cd\opus
    imgmount d cdrom.cue -t iso > NUL
    d:
    cd \rayman
    rayman.exe save=c:\rayman
    

    Unfortunately I don't have access to a 1.0 CDROM to test with.

     

    Last edit: krcroft 2019-04-26
  • RibShark

    RibShark - 2019-04-26

    Later versions of Rayman 1 (1.12 and above, which are a lot more common) do not have this issue. With the patch, DOSBox can't even seem to handle the image at all, every file appears to be empty when the image is mounted with it. The CUE is a standard multi-track cue file and can be downloaded here (just the CUE, no copyrighted stuff). I am guessing the patch isn't able to correctly interpret cue files with multiple .bin files, despite that being perfectly to standard.

     

    Last edit: RibShark 2019-04-26
  • Qbix

    Qbix - 2019-04-28
    • status: fixed --> open
    • assigned_to: ripsaw8080
     
  • ripsaw8080

    ripsaw8080 - 2019-04-28

    DOSBox does not support multiple .BIN files; only a single .BIN file containing all data and audio tracks is supported, so I suggest making one of those. However, I think krcroft's patch included support for multiple .BIN files, but I could be mistaken.

     
    • RibShark

      RibShark - 2019-04-29

      I do not believe that is correct. Any other game (and even other versions of Rayman) work fine with multiple .bin files.

       
      • ripsaw8080

        ripsaw8080 - 2019-04-29

        Please see these vogons threads for context:
        https://www.vogons.org/viewtopic.php?f=33&t=62417
        https://www.vogons.org/viewtopic.php?f=31&t=62422

        Perhaps you have been using the ECE build which includes krcroft's patch, and that is why you've had some success using multiple .BIN files containing audio tracks. Please note that the ECE build, though based on SVN, contains unofficial patches and is not representative of official source.

         

        Last edit: ripsaw8080 2019-04-29
        • RibShark

          RibShark - 2019-07-25

          I have looked into this further. DOSBox by default (most recent official build) does work with multiple audio .BIN files, with some versions of the game, however it erroneously reads from INDEX 00 in the .cue file (the pre-gap) rather than INDEX 01 for any such tracks which causes issues with v1.00, and causes sound delay on other versions with a 2-second pregap. DOSBox-ECE actually makes things worse in this case, as at least one version of the game will not pass the check here where it does on official builds.

           
  • ripsaw8080

    ripsaw8080 - 2019-07-26

    Does it help to use a "PREGAP 00:02:00" line in the cuesheet in place of "INDEX 00"?

     
  • krcroft

    krcroft - 2019-07-27

    RibShark,

    Thanks - the Japanese 1.0 CUE file you sent provides each track's absolute position (INDEX 01's) on the CDROM.

    When loaded in DOSBox-ECE, the INDEX 01s pin down each track's MSF position to match the original CDROM's layout.

    Here are the intial checks RAYMAN.EXE makes and the MSF values handed back:

    CDROM: GetAudioTracks, stTrack=1, end=21, leadOut.min=59, leadOut.sec=56, leadOut.fr=71
    CDROM: GetAudioTrackInfo track=1 MSF 00:02:00, attr=64
    CDROM: GetAudioTrackInfo track=2 MSF 10:16:46, attr=0
    CDROM: GetAudioTrackInfo track=3 MSF 12:46:45, attr=0
    CDROM: GetAudioTrackInfo track=4 MSF 15:13:53, attr=0
    CDROM: GetAudioTrackInfo track=5 MSF 18:15:26, attr=0
    CDROM: GetAudioTrackInfo track=6 MSF 20:47:36, attr=0
    CDROM: GetAudioTrackInfo track=7 MSF 23:16:60, attr=0
    CDROM: GetAudioTrackInfo track=8 MSF 25:47:19, attr=0
    CDROM: GetAudioTrackInfo track=9 MSF 30:30:37, attr=0
    CDROM: GetAudioTrackInfo track=10 MSF 31:53:22, attr=0
    CDROM: GetAudioTrackInfo track=11 MSF 32:28:46, attr=0
    CDROM: GetAudioTrackInfo track=12 MSF 36:05:49, attr=0
    CDROM: GetAudioTrackInfo track=13 MSF 36:16:32, attr=0
    CDROM: GetAudioTrackInfo track=14 MSF 40:35:54, attr=0
    CDROM: GetAudioTrackInfo track=15 MSF 45:30:27, attr=0
    CDROM: GetAudioTrackInfo track=16 MSF 46:41:58, attr=0
    CDROM: GetAudioTrackInfo track=17 MSF 50:09:32, attr=0
    CDROM: GetAudioTrackInfo track=18 MSF 55:25:67, attr=0
    CDROM: GetAudioTrackInfo track=19 MSF 56:34:56, attr=0
    CDROM: GetAudioTrackInfo track=20 MSF 57:34:54, attr=0
    CDROM: GetAudioTrackInfo track=21 MSF 59:37:10, attr=0
    

    After those checks, RAYMAN.EXE queries the CDROM three times, stops playback, and then plays the intro UbiSoft music for a fixed durations (808 sectors).

    CDROM: GetAudioStatus playing=0, paused=0
    CDROM: GetAudioStatus playing=0, paused=0
    CDROM: GetAudioStatus playing=0, paused=0
    CDROM: StopAudio
    CDROM: Playing track 11 at 44.1 KHz 2-channel at start sector 162274 (0.0 minute-mark), seek 0 (skip=0,dstart=162274,secsize=2352), for 808 sectors (10.8 seconds)
    

    RAYMAN.EXE also uses hardcoded CDROM absolute offsets to jump to specific sequences, like the voice track after you've enter your three initials to start the first level.

    CDROM: GetAudioSub attr=0, track=20, index=1
    CDROM: GetAudioSub absoute  offset (259104), MSF=57:34:54
    CDROM: GetAudioSub relative offset (150), MSF=0:2:0
    CDROM: PauseAudio, state=resumed
    CDROM: GetAudioStatus playing=1, paused=0
    

    The INDEX 01 MSFs pass the checks, but that doesn't solve the fact that the audio tracks themselves start with 2 seconds of slience; which is part of the audio sequence itself.

    The tracks also contain four frames of audio garbage (roughly 0.05s) at the end, which can cause a very brief "hitch" noise if the track is played all the way through.

    We could try tweaking the CUE file to "bake out" these sections, which indeed UbiSoft has done in their 1.12 and 1.20 release CDROMs if you inspect those audio tracks. But we would then need our 1.0 RAYMAN.EXE to be aware of the new durations and absolute offsets.

    instead, we can fix the audio tracks out-of-band and keep their sizes exactly the same - so the CUE and RAYMAN.EXE can remain as-is.

    The following three (Linux/GNU) commands will clean up the Rayman (Japan) (Track *).bin tracks (using GNU parallel, dd, and truncate). These are non-destructive: they only read from original .bin files and create adjacent ".fix" files.

    parallel dd bs=2352 skip=146 if={} of={.}.fix ::: Rayman\ \(Japan\)\ \(Track\ *.bin
    parallel truncate -s -$((2352 * 4)) ::: Rayman\ \(Japan\)\ \(Track\ *.fix
    parallel dd if=/dev/zero of={} ibs=2352 count=150 obs=2352 oflag=append conv=notrunc ::: Rayman\ \(Japan\)\ \(Track\ *.fix
    

    Explanation of commands:

    1. Removes 146 frames from the start of the tracks, which leaves 4 frames (0.05s) of silence prior to the audio starting, which matches what UbiSoft did in the 1.12 and 1.20 releases.
    2. Removes 4 frames of audio garbage from the end of the tracks.
    3. Appends 150 frames of slience to the end of the tracks, which matches what UbiSoft did in the 1.12 and 1.20 releases.

    Here's the CUE that refrences the fixed audio tracks (using the original INDEX 01 MSFs) :

    FILE "Rayman (Japan) (Track 01).bin" BINARY
      TRACK 01 MODE1/2352
        INDEX 01 00:00:00
    FILE "Rayman (Japan) (Track 02).fix" BINARY
      TRACK 02 AUDIO
        INDEX 01 10:14:46
    FILE "Rayman (Japan) (Track 03).fix" BINARY
      TRACK 03 AUDIO
        INDEX 01 12:44:45
    FILE "Rayman (Japan) (Track 04).fix" BINARY
      TRACK 04 AUDIO
        INDEX 01 15:11:53
    FILE "Rayman (Japan) (Track 05).fix" BINARY
      TRACK 05 AUDIO
        INDEX 01 18:13:26
    FILE "Rayman (Japan) (Track 06).fix" BINARY
      TRACK 06 AUDIO
        INDEX 01 20:45:36
    FILE "Rayman (Japan) (Track 07).fix" BINARY
      TRACK 07 AUDIO
        INDEX 01 23:14:60
    FILE "Rayman (Japan) (Track 08).fix" BINARY
      TRACK 08 AUDIO
        INDEX 01 25:45:19
    FILE "Rayman (Japan) (Track 09).fix" BINARY
      TRACK 09 AUDIO
        INDEX 01 30:28:37
    FILE "Rayman (Japan) (Track 10).fix" BINARY
      TRACK 10 AUDIO
        INDEX 01 31:51:22
    FILE "Rayman (Japan) (Track 11).fix" BINARY
      TRACK 11 AUDIO
        INDEX 01 32:26:46
    FILE "Rayman (Japan) (Track 12).fix" BINARY
      TRACK 12 AUDIO
        INDEX 01 36:03:49
    FILE "Rayman (Japan) (Track 13).fix" BINARY
      TRACK 13 AUDIO
        INDEX 01 36:14:32
    FILE "Rayman (Japan) (Track 14).fix" BINARY
      TRACK 14 AUDIO
        INDEX 01 40:33:54
    FILE "Rayman (Japan) (Track 15).fix" BINARY
      TRACK 15 AUDIO
        INDEX 01 45:28:27
    FILE "Rayman (Japan) (Track 16).fix" BINARY
      TRACK 16 AUDIO
        INDEX 01 46:39:58
    FILE "Rayman (Japan) (Track 17).fix" BINARY
      TRACK 17 AUDIO
        INDEX 01 50:07:32
    FILE "Rayman (Japan) (Track 18).fix" BINARY
      TRACK 18 AUDIO
        INDEX 01 55:23:67
    FILE "Rayman (Japan) (Track 19).fix" BINARY
      TRACK 19 AUDIO
        INDEX 01 56:32:56
    FILE "Rayman (Japan) (Track 20).fix" BINARY
      TRACK 20 AUDIO
        INDEX 01 57:32:54
    FILE "Rayman (Japan) (Track 21).fix" BINARY
      TRACK 21 AUDIO
        INDEX 01 59:35:10
    

    The above MSF values are only valid for the Japanese 1.0 release of Rayman, confirmed with the following MD5 sums:

    46354effdc6dc2a4a9a5e4d295689015  Rayman (Japan) (Track 01).bin
    578160e0bdfb11579dd0405615398a46  Rayman (Japan) (Track 02).bin
    2474a1ba562dd083d49be70748608d2c  Rayman (Japan) (Track 03).bin
    49e0200fdb26fe96c1940375469acaa7  Rayman (Japan) (Track 04).bin
    0620421db15c2ad9e17cb844c111a46b  Rayman (Japan) (Track 05).bin
    6078ebfbad5461cadd82617f58db97f5  Rayman (Japan) (Track 06).bin
    1774781d23f98e551ee76408224d208f  Rayman (Japan) (Track 07).bin
    52a492619286acdfb5c49a1a0a18bb20  Rayman (Japan) (Track 08).bin
    771c2e425fa739a86c1b04628557d018  Rayman (Japan) (Track 09).bin
    bb7dc635aaf050749317057f63bdcc9b  Rayman (Japan) (Track 10).bin
    33718e569fab30f5a645d0c4a065bb1a  Rayman (Japan) (Track 11).bin
    f3adfacf2256342b9dd9a23312cf9570  Rayman (Japan) (Track 12).bin
    136b0c3422fdd3a860d5f0fe28687cfd  Rayman (Japan) (Track 13).bin
    3681a18a059411e070505071e8dbfafc  Rayman (Japan) (Track 14).bin
    5a390006eef37109179923b293fccb39  Rayman (Japan) (Track 15).bin
    eeb3e9e86e8836eb1afbad6325ee73dd  Rayman (Japan) (Track 16).bin
    61e4c6bde633f52528b69fbb71b48736  Rayman (Japan) (Track 17).bin
    f47fb3680476e97654f52ab411a78794  Rayman (Japan) (Track 18).bin
    3b72d6118caa4695eb8251bfefcc7e38  Rayman (Japan) (Track 19).bin
    0a9d8927b9a36908ae03fda2c146c041  Rayman (Japan) (Track 20).bin
    8fa6c8ec668c2cde008b12922e041d9b  Rayman (Japan) (Track 21).bin
    

    This should have the Japanese 1.0 CD loading properly with clean and properly timed audio, similar to the 1.12 and 1.20 releases.

    Because we shifted the audio sequences inside the tracks, this could cause voice sequences to start 2 seconds ahead of the animation, given RAYMAN.EXE is still using the unshifted offsets. I haven't played through it enough to get to these areas though. If you notice a problem, then we could try leaving the voice tracks as-is and simply cleanup their trailing garbage.

     

    Last edit: krcroft 2019-07-28
    • RibShark

      RibShark - 2019-07-28

      Such a cuefile is nonstandard. INDEX 01 specifies where in the file the track data (excluding pregap) lies, not the place on the entire CD image, and should be 2:00 for any track with a 2 second pregap. I doubt any cuefile like this would work with any other program. The correct behaviour is to use the size of each track file to calculate the MSF up to the track that is being queried, and then add the INDEX 01 MSF to get the correct MSF for that track.

       
      • krcroft

        krcroft - 2019-07-28

        DOSBox and DOSBox-ECE can emulate a physical CDROM that's composed of compressed audio tracks (Vorbis in the case of DOSBox and Vorbis, Opus, FLAC, and MP3 in the case of DOSBox-ECE).

        The correct behaviour is to use the size of each track file to calculate the MSF up to the track that is being queried, and then add the INDEX 01 MSF to get the correct MSF for that track

        When compressed audio files are used to simulate CDROM tracks, the only way to determine track "sizes" is to use play-time duration, which can be inexact resulting in MSFs values that don't match those found in the original "pristine" single BIN/CUE.

        The vast majority of games don't check MSF values, but some care about it. Destruction Derby is one example, and it looks like Rayman 1.0 is sensitive to this as well.

        Therefore, to handle these types of games, DOSBox-ECE's audio patch "overloads" INDEX 01 allowing users to specify absolute MSF start times per track.

         

        Last edit: krcroft 2019-07-28
        • RibShark

          RibShark - 2019-07-29

          The trouble there being that your patch then invalidates otherwise valid cue-files such as the Redump Rayman ones I provided you. What I would suggest is extending the cue format by, for example, parsing a line such as REM MSF: MM:SS:FF = LBA:XXXXX under the INDEX lines and using that as the MSF (this format is already implemented by ISOBuster, which is why I suggest it). That way, existing standard cue files will still work with your patch. Using the REM command will mean that other programs can also parse the edited CUE. This is what redump.org does to extend cue files (for example, for multisession discs), and it works quite well.

           

          Last edit: RibShark 2019-07-29
          • krcroft

            krcroft - 2019-07-29

            Very nice suggestion!

            I will remove the MSF changes from my current patch, allowing it to focus 100% on the stand-alone audio codecs and how DOSBox handles the audio streams.

            Given this suggestion brings the CUE file back to full compliance without changing the baseline functionality, I wonder if the best place for this is in the mainline of DOSBox (SVN). QBix, what do you think?

            I can work on this MSF handling in a separate patch, ideally only minimally touching the code to include detection of this new string pattern and then skipping the MSF calculations.

             
            👍
            1

            Last edit: krcroft 2019-07-29
  • RibShark

    RibShark - 2019-07-30

    Back to the issue at hand, which is Rayman (v1.00) failing to work on SVN DOSBox with no patches. I took a look at the code in cdrom_image.cpp and noticed a bug in line 583:

    if (prestart > 0) {
            if (prestart > curr.start) return false;
            skip = curr.start - prestart;
        } else skip = 0;
    

    Here, the code checks whether the pregap start is greater than the default value 0, and then skips calculating the pregap if so. The error is that there are valid cuesheets that have the pregap starting at exactly 0 in the file, which matches the default. Here is an example of the Rayman cuesheet I was using to demonstrate this:

    FILE "Rayman (Europe) (En,Fr,De) (Track 01).bin" BINARY
      TRACK 01 MODE1/2352
        INDEX 01 00:00:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 02).bin" BINARY
      TRACK 02 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 03).bin" BINARY
      TRACK 03 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 04).bin" BINARY
      TRACK 04 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 05).bin" BINARY
      TRACK 05 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 06).bin" BINARY
      TRACK 06 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 07).bin" BINARY
      TRACK 07 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 08).bin" BINARY
      TRACK 08 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 09).bin" BINARY
      TRACK 09 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 10).bin" BINARY
      TRACK 10 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 11).bin" BINARY
      TRACK 11 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 12).bin" BINARY
      TRACK 12 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 13).bin" BINARY
      TRACK 13 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 14).bin" BINARY
      TRACK 14 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 15).bin" BINARY
      TRACK 15 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 16).bin" BINARY
      TRACK 16 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 17).bin" BINARY
      TRACK 17 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 18).bin" BINARY
      TRACK 18 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 19).bin" BINARY
      TRACK 19 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 20).bin" BINARY
      TRACK 20 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 21).bin" BINARY
      TRACK 21 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 22).bin" BINARY
      TRACK 22 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 23).bin" BINARY
      TRACK 23 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 24).bin" BINARY
      TRACK 24 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    FILE "Rayman (Europe) (En,Fr,De) (Track 25).bin" BINARY
      TRACK 25 AUDIO
        INDEX 00 00:00:00
        INDEX 01 00:02:00
    

    One solution is to use a different default value for prestart, such as -1, and check against that instead. I have attached a .patch file with this fix.

    While this fix is enough to get Rayman v1.00 past the initial text screen, it is not enough to fool the game entirely, as when entering gameplay this text shows: see image.
    I will look into more detail and see if I can figure out what the additional bug is (or whether my fix is incorrect).

     

    Last edit: RibShark 2019-07-30
    • RibShark

      RibShark - 2019-07-30

      Nevermind! It seems the game pulled a sneaky trick and the installer, despite not throwing an error with the mainline SVN build, actually put a flag in the games config file to say it wasn't a legitimate copy. Reinstalling the game with my patch applied removes the watermark and the game runs perfectly.

       
    • krcroft

      krcroft - 2019-07-30

      RibShark,

      I reverted the patch's CDROM_Interface_Image::AddTrack() and CDROM_Interface_Image::LoadCueSheet() functions to the baseline (SVN) and applied your prestart changes. The Japanese 1.0 games installs and plays like you noted.

      The music starts immediately when the UbiSoft splash srcreen , skipping past the track's 2-seconds (or 150 frames or 352800 bytes) of initial silence. However, from that 352800-byte offset, the game still attempts to play an additional 808 frames, which runs beyond the end of the BIN file by 150 frames (or 352800 bytes). The BIN file itself is only 808 frames in size.

      You can also hear the audio glitch out moments before it overruns.

      You can see the problem playout in the debug statements as well as when the game runs beyond the end of the track (the patch protectively feeds the mixer zeros).

      CDROM: Playing track 11 at 44.1 KHz 2-channel at start sector 162424 (0.0 minute-mark), seek 352800 (skip=352800,dstart=162424,secsize=2352), for 808 sectors (10.8 seconds)
      CDROM: GetAudioStatus playing=1, paused=0
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      CDROM: Underdecoded by 2352. Feeding mixer with zeros.
      
      < ... snip for brevity ... >
      
      CDROM: GetAudioStatus playing=1, paused=0
      CDROM: GetAudioStatus playing=1, paused=0
      CDROM: GetAudioStatus playing=1, paused=0
      

      That said.. the games does play; but I can't help but suspect the CDROM layout or the track content is flawed. Then again, maybe reading beyond a track's end is either undefined or legal on real real hardware and/or MSCDEX, and this this is all just fine? (the more accurate we can make DOSBox, the better!).

       

      Last edit: krcroft 2019-07-30
      • RibShark

        RibShark - 2019-07-30

        It is quite possible the track layout is flawed, however this is exactly as it was mastered on the disc. Using the actual CD to play the game (with mount D X:\ -t cdrom) gives exactly the same results. Running the game in PCem also shows identical results, at least audially. So I think DOSBox is doing the right thing here, and the game is just asking the drive to play for the wrong time. You can also test it with the 1.0 European version (the 2nd link that I sent you) and see if that performs the same.

         
    • krcroft

      krcroft - 2019-07-31

      RibShark,

      When the BIN files are concatenated (single .bin and single-file CUE), the prestart = -1 patch doesn't solve (or honor) the two-second track start offset. Instead, the game plays two seconds of silence prior to hearing the start of audio.

      FILE "Rayman (Japan).bin" BINARY
        TRACK 01 MODE1/2352
          INDEX 01 00:00:00
        TRACK 02 AUDIO
          INDEX 00 10:12:46
          INDEX 01 10:14:46
      
       ... etc ...
      
       

      Last edit: krcroft 2019-08-02

Log in to post a comment.