Weird CDDA problem with Prince of Persia: Arabian Nights

Discussion in 'Sega Dreamcast Development and Research' started by Wesker, Jan 25, 2018.

  1. Wesker

    Wesker Spirited Member

    Joined:
    Jan 5, 2008
    Messages:
    147
    Likes Received:
    14
    I'm assisting someone who's creating a patch for turning Prince of Persia: Arabian Nights for the Dreamcast into a Spanish version by means of importing the official Spanish text/voice localization that the PC version of Prince of Persia 3D got back in the day (the Dreamcast version was never released outside North America, hence why it was only available in English). He successfully managed to get it working but there's one weird problem related to CDDA audio which we can't get to solve anyhow.

    Prince of Persia: Arabian Nights stores its musics in a single CCDA track of 34:40 minutes, containing most (although not all) the music tracks from Prince of Persia 3D scattered through several minutes, including four of the five PC level music tracks and three of the five PC combat music tracks (although the Dreamcast version doesn't actually use any combat music when fighting, it just keeps playing the current level music). Among the four PC level music tracks is this one.



    It's placed just at the beginning of the CDDA track and the game uses it for both the menu screen and also randomly in levels when you start one or load a saved game.

    The problem is, for some odd reason, if you do a backup of the game no matter how, this music will never play when it's supposed to and there's silence instead. It only happens with that one though, as the other level musics/minutes play as normally duting the levels on the other hand. This is especially noticeable in the menu screen, which will always be silent in the menu screen because, unlike the levels which randomize the music/minute playing, the menu screen will always play that one no matter what.

    I thought it could be because of a bad rip, but I have checked all the rips/releases everywhere and they all suffer from the same issue, so it seems to be a common problem when ripping the game. I have the retail game, but in order to get a fully localized version in other language besides English it's needed to do a good rip and therefore solve this problem.

    Anyone may know what could be the reason and a possible solution?

    PS: I wish there could be a way to make the Dreamcast version play those unused combat musics when fighting like in the PC version, but I suppose that would be way more complicated to attempt.
     
    fafadou likes this.
  2. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    Dreamcast selfboots are very finicky about CDDA tracks. You can try some hacking program called "dahack" and "CDDA" to see if it helps. Otherwise, you could study the release of What's Shenmue and Ecco E3 to see their peculiar handling of CDDA, with an IP.BIN patch IIRC.
     
    Last edited: Jan 26, 2018
  3. yzb37859365

    yzb37859365 Spirited Member

    Joined:
    Jul 14, 2013
    Messages:
    187
    Likes Received:
    124
    Maybe NBA Hoopz is the same reading way, you can upload a 1st file to see
     
    fafadou likes this.
  4. fafadou

    fafadou Gutsy Member

    Joined:
    Aug 3, 2016
    Messages:
    473
    Likes Received:
    185
    Maybe as said family guy look at the ip.bin for seeing how the cdda are managed too.
     
  5. Wesker

    Wesker Spirited Member

    Joined:
    Jan 5, 2008
    Messages:
    147
    Likes Received:
    14
    "dahack" and "CDDA" hacking programs have been attempted like 10 times without results. Maybe the problem lies within ip.bin and not 1st_ read.bin.

    There seems to be an obscure Russian rip/release of the game around which manages to get the music track perfectly working like the retail game does. We are hoping it will reveal the key to this issue and see if it could be included in the patch to fix it when applied to all the affected rips.
     
    fafadou likes this.
  6. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    It's not that there are problems in the ip.bin stopping the music from playing properly, it just doesn't have anything to do with audio normally. It's rather that you can put some code in the ip.bin, a patch basically, to fix the handling of audio tracks. This method was used for What's Shenmue and the Ecco E3 Demo IIRC.
     
    Last edited: Jan 26, 2018
    fafadou likes this.
  7. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    Hello, I am the one who created the traslated to Spanish of the game.
    The bug is not found in the ip.bin, I have tried both and it does not work, but changing these values in the 1st, and leaving them the same as the Vector release has worked, and the theme is heard in the main menu and in the levels
    address
    0x9607C: 4 values
    ORIGINAL = 0B 00 F6 68
    VECTOR = 08 A0 09 00
    0X96090: 10 values
    ORIGINAL = 09 00 09 00 09 00 09 00 09 00
    VECTOR = 4B E1 1C 30 1C 30 0B 00 F6 68
    Now my question is if you can add the songs from the matches that also have files inside the raw file, but in the gdi you can not hear them, if it can be.
    I leave you with the binaries in case you can help me in this aspect
     

    Attached Files:

    • bins.rar
      File size:
      361.5 KB
      Views:
      52
  8. kuze

    kuze Peppy Member

    Joined:
    Sep 28, 2011
    Messages:
    371
    Likes Received:
    6
    Does it work if you use a GDI instead?
     
  9. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    Sorry I don't understand your request, could you rephrase and explain in more detail?

    Do you want to apply the VECTOR fix to the GDI for use in gdemu/usb-gdrom?
     
  10. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    The music of the main menu and levels are already heard normally.
    But on the track, there are also music for the matches. These songs do not sound in the original game, only in the PC version.
    That is my question. If it would be possible to include them in the game.
    Sorry for my english.
     
  11. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    No problem about your English, a lot of people here aren't native speakers either. What's your mother tongue?

    Do the music plays in the retail GD-ROM disc version? Or is it only skipped using GDEmu?
     
  12. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    I am Spanish :)
    This music is included in the GDI, but it is not heard in the game. This along with other music. But for some reason they did not schedule it in the game
    Here are the themes of the music in the track
    00:00 - Level Music 1
    04:26 - Level Music 2
    11:29 - Level 3 Music
    18:17 - Fight Music 1 and 2
    23:20 - Level 5 Music
    29:31 - Fight Music 3
    Fight music 1,2 y 3 they are not heard in the DC version, only in PC, but if they are inside the GDI track
     
  13. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    If they voluntarily didn't include them, it might be hard to add them in the game. You'd have to figure out how the game knows what track to play and where to skip in the monolithic track to read it. Are you sure that the behaviour you're describing also happens with a physical disc? (not using GDEmu)

    PS: Yo hablo español un poquito, puedes escribe los frases complicado en español si quieres, voy haco la traduction en ingles para todos. (complicado para tù en ingles, pero simple para mi en español, por favor)
     
    Last edited: Jan 26, 2018
  14. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    Yes, everything happens on a physical disk (No GDEMU)
    Now you have understood me :)
    Those 3 songs are included in the game, but they are not heard in the fights(no levels, only fights), nor in the original game or copy.
    That's why my question was if they could be included.
     
  15. -=FamilyGuy=-

    -=FamilyGuy=- Site Supporter 2049

    Joined:
    Mar 3, 2007
    Messages:
    3,031
    Likes Received:
    890
    If they don't work on GDEmu, it might be very hard to fix it by hacking the GDI. You might want to contact deunan about it.

    Edit:
    Oh shoot, I think I misunderstood again.

    You'd need to dig into the workings of the game to add them, to figure out how it handles its weird big single audio track. If you're lucky it might be in a readable text file.
     
    pitito likes this.
  16. Mrneo240

    Mrneo240 Gutsy Member

    Joined:
    Sep 15, 2017
    Messages:
    462
    Likes Received:
    571
    I hate reading threads like this...

    They catch my interest too easily.
     
    fafadou and -=FamilyGuy=- like this.
  17. yzb37859365

    yzb37859365 Spirited Member

    Joined:
    Jul 14, 2013
    Messages:
    187
    Likes Received:
    124
    I don't understand your problem?
    Do you want to play the music that is not used in the DC version? It's hard to add that.

    If only nulldc plays GDI original music, your version of the version of the music is not normal, the repair is a little simpler.

    By the way, the program address: why is 8C0A607C +0x96 rather than initialized to =0x96?
    Maybe I understand the mistake?
     
  18. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    That's the Vector fix used to run the audio in the main menu and levels correctly. This is already fixed

    It's only about the other 3 remaining songs that are inside the track, but that the game does not use them.
     
  19. yzb37859365

    yzb37859365 Spirited Member

    Joined:
    Jul 14, 2013
    Messages:
    187
    Likes Received:
    124
    That's hard. You need to find the plug.

    In addition to the place where new music is inserted, it turns out that there is no music in the game.
     
    SiZiOUS, pitito and -=FamilyGuy=- like this.
  20. pitito

    pitito Rising Member

    Joined:
    Mar 8, 2015
    Messages:
    57
    Likes Received:
    31
    I thought that maybe that music, if it could be inside the 1ST, but not programmed for some reason, of course this port for dramcast, they cut many things with respect to the PC version.
    It has some level less, it lacks audio samples, cut music, it seems that the game was taken out in a hurry.
     
    fafadou likes this.
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page