[Technical][DC] Samba de Amigo 2000

Discussion in 'Sega Dreamcast Development and Research' started by Renard, Oct 3, 2018.

  1. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    Hello everyone! I'm opening this call for help here, following the preliminary research I've done on Sonic Retro.
    http://forums.sonicretro.org/index.php?showtopic=38225&pid=933742&st=0&#entry933742
    I've also opened a thread on RomHacking: https://www.romhacking.net/forum/index.php?topic=27112.0

    ________

    I've had a peek at Samba de Amigo 2000 on Dreamcast, which I consider the definitive home version of the game. It includes all the songs from the original game, adds a lot more (including fake DLC), and has more game modes. The only downside is that a few mini-games are missing (replaced by volleyball), but eh.

    I've had a peek at how the game works. The gist of it is, audio tracks are your good old regular ADX files, and beatmaps are a relatively simplistic format (not quite just a .txt file as in Stepmania, but hex editing the files show difficulty levels in plain text and patterns). Fun thing is that the Wii version seems to be using the same beatmap format, only the endianness is reversed for some reason. There's also quite a bit of padding it seems, with a (broken) ~600mb "ADX" file on the disc.

    So there are a few things that could potentially be done, I believe:
    • Inject the Wii tracks (and Wii DLC) into Samba 2K
    • Translate the game into at least English, can re-use textures from Samba 1
    and maybe, going further than this
    • Unlock on-disc "DLC" stages by default, saving previous space on your VMU
    • Convert and import tracks from the Shakka to Tambourine series
    • Create custom tracks!
    Now there are a few things that can help a lot: there's no encryption, no significant compression, and pretty much all file formats are supported by relatively modern tools (apparently even ffmpeg added DC ADX support, including encoding, back in 2016).

    The current roadblocks are:
    • I've got no idea how to further analyze the beatmap files, and potentially produce my own
    • The way the song list work is a mystery. Haven't even found it so far in the game's files. There's a chance it's hard-coded somewhere.
    • For some reason, I can't open PVR textures from that game using the usual PVR Tools.

    _____

    Further observations since I've started the topic on Sonic Retro:

    • Beatmaps from Samba Wii are using the same format as on Dreamcast, but with different endianness. It is possible to simply inject the Wii files into the DC game once this is taken into account. Normal gameplay will work absolutely fine, but Hustle mode will crash as soon as a dance symbol is prompted, and the cameras angles are broken.
    • Swapping songs around totally work, but the menu items themselves are unchanged.
    • It's possible to edit the beatmaps, even adding extra info and widely changing the file size/content, and the game will still load them (as long as you keep the section starting "blocs" intact, identified by tags such as CAM, EASY, etc). I do have trouble understanding the actual beatmap format (stored in .AGM files). The song's name and BPM do not seem to be stored in the .AGM files, no idea where that info could be.
    • Textures are PVRs, mostly hidden into AFS containers. Most have a "PVR!T" (with that !) header.
    • There's a ~700Mb dummy file "SAMBADEAMIGO.BIN" on the disc that can be zeroed out, but apparently not deleted (game will loop the title screen if deleted). That's a lot of room for extra songs!
    [​IMG]
    And if you happen to be born with three hands, well, the game engine can cover this as well.

    What I'm currently looking for:

    Help understanding and documenting the AGM beatmap format, and the camera format.
    Help finding where the song wheel is located, and how it works (adding new list items, and unlocking DLC).
    Someone to code a basic AGM editing tool (I don't know how to code except somewhat in C128 Basic, so, err).
    Anyone willing to help with regular work on textures (swapping textures from Samba 1 to Samba 2000, translating Japanese-only ones).

    I'm working using the .GDI dumps of Samba de Amigo 2000 JP and Samba de Amigo PAL (because the PAL version offers 50Hz and 60Hz, multiple languages including English, etc).

    Thanks!

    ____

    Some more stuff:
     
  2. wombat

    wombat SEGA!

    Joined:
    Mar 14, 2004
    Messages:
    2,674
    Likes Received:
    322
    Unfortunately I'm not technical on the level that I can help you with the actual coding and converting, however as a huge fan from this title I would like to applaud you for undertaking all of the above. It will be great to see v2000 translated into English, and getting even more tracks....... loving the potential!
     
    LuizNai likes this.
  3. PrOfUnD Darkness

    PrOfUnD Darkness Familiar Face

    Joined:
    Mar 13, 2004
    Messages:
    1,122
    Likes Received:
    48
    Amazing project!
     
    LuizNai and fafadou like this.
  4. megavolt85

    megavolt85 Peppy Member

    Joined:
    Jan 8, 2015
    Messages:
    323
    Likes Received:
    473
    is damaged or scrambled texture
     
    LuizNai and fafadou like this.
  5. fafadou

    fafadou Enthusiastic Member

    Joined:
    Aug 3, 2016
    Messages:
    505
    Likes Received:
    200
    amazing project ! @truemaster1 told me a long time ago about some ideas he has for this.

    For PVR pictures you have a plugin for photoshop.
    the songs are often in an .afs file.
     
    LuizNai likes this.
  6. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    The whole game engine seems to fit inside the 2mb 1ST_READ.BIN. There are a few interesting tidbits here and there, including at least two unreleased songs, "One week" and "Sonic A Gogo".

    Isn't that the Sonic X theme?
    In a game released years before Sonic X first aired?
     
    LuizNai and fafadou like this.
  7. fafadou

    fafadou Enthusiastic Member

    Joined:
    Aug 3, 2016
    Messages:
    505
    Likes Received:
    200
    In my memory it was released just before.
     
    LuizNai likes this.
  8. yzb37859365

    yzb37859365 Spirited Member

    Joined:
    Jul 14, 2013
    Messages:
    187
    Likes Received:
    124
    I remember the PVR picture of this game seems to be compressed??


    find: 0B41 3C3408200D8B

    replace:01e0 3C3408200D8B

    This can delete the SAMBADEAMIGO.BIN file.
     
    Last edited: Oct 6, 2018
    fafadou likes this.
  9. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    688
    Likes Received:
    378
    samba de metallica \m/ hahaha

    the only help i can offer is regarding the enabling of DLC without the VMU file, it might just be a matter of a few 0s or 1s in memory.

    i forget the name of the program, but its the program to explore and compare memory of an emulator or other software. create two .VMS virtual VMUs, one with DLC and one without DLC, use the non-DLC .VMS first, scan the emulator memory, then insert the .VMS with the DLC and "scan for changes"
    ( edit-- i remember now, its CheatEngine)

    if it is a simple bool variable in memory that enables the DLC, maybe @Mrneo240 has memory patching implemented in his Neo-IP program

    before you do this though it would be good to know if the game loads the DLC when you insert VMU, or the game must be reset

    great idea @Renard
     
    LuizNai likes this.
  10. Anthaemia.

    Anthaemia. The Original VF3 Fangirl™

    Joined:
    Jun 4, 2004
    Messages:
    1,654
    Likes Received:
    221
    If the corresponding audio file is any indication, Sonic A GoGo is a retroactive name for the Sonic World area theme, though I'd also previously seen reference to this possibly being called Pineapples...
     
    LuizNai likes this.
  11. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    @Anthaemia. Yep! It appears to indeed be the theme of Sonic World, from Sonic Jam. Probably not really fitting for the game, maybe they used this at a test track at some point.

    @yzb37859365 Neat! Thanks!

    @TerdFerguson You have to reset the game to unlock the DLC (in order to be able to reload the VMU save). The VMU holds one key per "DLC" song, taking approximately two blocks each. And there are about 15 "DLC" songs, which adds up. I'm not sure if the DLC keys have to be on the same VMU as the Samba save. There are also a few more unlockables, such as maracas noises, some of these might have been DLCs.

    ____


    As a side note - for now I've had help from SiZiOUS to help repack the game after modification. It probably would be a better idea to use GDIBuilder http://projects.sappharad.com/tools/gdibuilder.html as well as neoIP https://github.com/mrneo240/neoIP in the end.

    SiZiOUS also suggested that the textures might be LZSS or LZW compressed.

    I've also tried encoding new audio using ffmpeg, and the results were disappointing. adxencd seems to give far better results https://github.com/esc0rtd3w/dreamcast-tools/tree/master/selfboot/Self-BooTDATA Pack/Utilities/ADX
     
    LuizNai likes this.
  12. FunKing

    FunKing Member

    Joined:
    Sep 23, 2013
    Messages:
    15
    Likes Received:
    50
    Hi there!

    I sure like the idea, and I know there will be a lot of work for some of the stated goals. My guess from harder to easier would be:
    • Create custom tracks
    • Port songs from
      • Wii
      • Shakatto Tambourine (Naomi)
      • MiniMoni. Shakatto Tambourine! Dapyon! (PS)
    • Translate from Japanese to English
    • Unlock all downloadable songs
    Working backwards from the list above, unlocking all songs is already possible by downloading the respective VMU files, so I'd give it the lowest priority. It probably could also be done by patching 1ST_READ.BIN.

    I'd say translating the game should also not be a very high priority, since it can be easily played in Japanese with a translation guide. OTOH, it's probably just a matter of editing / replacing / repacking textures, so it's more artistic than technical work. This means more people could help here, too, so this could be finished in a short time.

    Porting songs requires plenty of testing, since the file formats can be different (perhaps only a bit on the Wii, but certainly more on the Shakatto games). It also requires changing textures (so the name of the songs can appear in the menus).

    To create custom tracks we need to fully understand the file formats, write an editor to create the beatmaps, convert audio and created required textures, automatically patch everything and create a final GDI. I think it should not be that hard, but there are other issues...

    Should we create a single disc including all original, ported and custom tracks? This means a lot of hacking, since it seems plenty of data is hardcoded in 1ST_READ.BIN - it would have to be disassembled, patched and built again. Doing a simple 1:1 replacement of the original songs for new ones can avoid some issues, but you'll end up with several images (or game versions): one for original songs, another (maybe two) for Wii, etc.

    And that leaves us with another headache: savegames! I'd like to keep my progress, score and so on, but since the songs in the patched discs will be different, so should be the savegames. In theory that's not hard - just change the name of the VMU file used by each image (each game version having its own savegame), but that could be harder with custom songs. A simple case would be to have one game image / version just for custom songs, and only one save for it. That means having two games with custom songs would require juggling VMU saves around. Another option would be to allow the "track editor" to also set the savegame file name. This is prone to user error (who might use a "wrong" file name and destroy a savegame), but it's the best solution I can think of ATM.

    I'm now going through all files in Samba de Amigo 2K and taking notes. I'll later try to play around with some simple changes and see what I find.
     
    LuizNai likes this.
  13. TerdFerguson

    TerdFerguson ls ~/

    Joined:
    Apr 27, 2015
    Messages:
    688
    Likes Received:
    378
    i see... you could do "first scan" of memory via cheatengine at main menu using the VMU without DLC, reset the emulator, then do second scan at main menu using the VMU with DLC, then tell cheatengine to find 'all changed values only', which will take some searching and trial\error because you'll likely have quite a few arbitrary values change like timing for menu music and looping menu animations

    its likely the memory addresses for the on-disc songs are in the same neighborhood of the memory as the others. if so, then you test if you can unlock all of the songs by changing the memory value in cheatengine once you find the memory address(es)

    its also plausible that the DLC songs are enabled with 1 lone memory address. so song A would set the memory address to 1, song B to 2, etc etc. so it might not be possible to enable all of the songs at one time unless you know for sure if you have multiple DLC files on the VMU it will unlock each respective song per file

    i hope i was helpful
     
    LuizNai likes this.
  14. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    Small finding: El Bucanero's VMU backup CD has two modified saves with everything fully unlocked including DLC (without the need for extra keys); one for the US version of Samba 1, one for Samba 2000.
     
    LuizNai likes this.
  15. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    Quick post: here is a "naive" mod in action played by a friend. "Mexican Flyer" has been taken from the Wii version and injected into Samba 2000 without any further changes:



    Interestingly, we also tried swapping replacing "Mambo Beat" with "Mas Que Nada" from the Wii version (the song used to be in Samba 1, but was one of the very few removed from 2000). The Wii file triggers the Bingo & Bongo scene/stage on the Dreamcast with a perfectly working camera.

    Also please note that the English Wikipedia has a very detailed list of songs and related tidbits: https://en.wikipedia.org/wiki/Samba_de_Amigo
     
    Last edited: Oct 8, 2018
    TerdFerguson, fafadou and Yakumo like this.
  16. FunKing

    FunKing Member

    Joined:
    Sep 23, 2013
    Messages:
    15
    Likes Received:
    50
    Awesome news, Renard! :D
     
  17. FunKing

    FunKing Member

    Joined:
    Sep 23, 2013
    Messages:
    15
    Likes Received:
    50
    I've been through most of the DC files already, and I've found a couple of interesting things I'd like to share.

    First, does anyone know if the number 38 has a special meaning in Samba de Amigo, or for Sonic Team in general? It appears in several places, but I have no idea why. Perhaps there were 38 songs in at least one version of the game?

    I also found these music menu entries that doesn't seem to be used in Samba de Amigo ver. 2000 (perhaps some were old files and others work-in-progress that didn't make to the final cut):
    • Are You Gonna Go My Way
    • Bailamos
    • Cafe
    • Can't Take My Eyes Off Of You
    • E Uma Partida De Futebol
    • El Mambo (available on DC & Wii)
    • Gonna Fly Now (same as "The Theme of Rocky"?)
    • Here Comes The Hotstepper
    • I Got A Girl
    • Lupin The 3rd
    • Mambo Mambo (Wii DLC)
    • Mas Que Nada (on arcade, DC & Wii)
    • Ob-la-di,ob-la-da
    • One Week
    • September
    • Shake Hip
    • Sonic A Go Go!!
    • Suavemente
    • Synchronized Love
    • The Theme Of Hige
    Coincidentally, I always thought that "É Uma Partida de Futebol" would be a perfect song for the game! Unfortunately, there are no ADX (audio) nor AMG (beatmap) files for those songs (except for "Gonna Fly Now"). I wonder if those songs were dropped for gameplay or licensing issues (if they were even worked on at all)...
     
  18. Borman

    Borman Digital Games Curator

    Joined:
    Mar 24, 2005
    Messages:
    9,559
    Likes Received:
    2,217
    Ob-la-di,ob-la-da seems like wishful thinking, The Beatles didn't really do much for licensing at that point, particularly for games. Would be fun though!
     
  19. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    21
    Likes Received:
    28
    Wow, nice findings! There are to reasons why the songs might not have made the cut - could be licensing issues, or maybe they were having fun at the office testing out tracks and however well music genres could work with the concept :)
     
    fafadou likes this.
  20. Anthaemia.

    Anthaemia. The Original VF3 Fangirl™

    Joined:
    Jun 4, 2004
    Messages:
    1,654
    Likes Received:
    221
    I suspect that one song would have been a cover rather than the original version, similar to the soundalike tracks used in Elite Beat Agents... Alternatively, maybe it was included as wishful thinking by the developers and dropped early into production because Sega's legal team just knew the licensing wouldn't be affordable or perhaps even possible at all?
     

Share This Page