don't click here

Samba de Amigo 2000 hacking

Discussion in 'Engineering & Reverse Engineering' started by Miles Prower, Oct 1, 2018.

  1. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    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, even by re-using the 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 Shakka to Tambourine, Shakka to Tambourine 2001, and MiniMoni Shakka to Tambourine Dapyon
    • 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 repack a .GDI for a gdemu (or a milCD .cdi). So far all tests failed, both on an emulator and the real hardware
    • ADX encoding seems to produce poor audio quality with the settings I tried so far
    • 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 looked into it. There's a chance it's hard-coded.

    If anyone want to send some pointers my way, or just help in general, I'd highly appreciate it. Thanks!
     
  2. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,214
    956
    93
    Long-term happiness
    For ADX encoding I've been using adxencd.exe for years, seems to make good quality files. http://overlord.digibase.ca/adxencd.exe

    Instructions:

    Example ADX files I have made:

    http://overlord.digibase.ca/shit_just_got_real.adx
    http://overlord.digibase.ca/GSC%20Rocket%20(anime).adx
    http://overlord.digibase.ca/Sega%20-%20Mega%20CD%20%28U%29%201.10%20BIOS.adx
     
  3. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    While not perfect, the audio conversion sounds MUCH better with this indeed. Thanks!
     
  4. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    Update: converted the endianess of a Wii-exclusive beatemap, and used it to replace a Samba 2K song. It mostly works as-is! The cameras are broken, the hustle mode crashes when it calls the first pose, but the regular mode works perfectly until the end of the song.
     
  5. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    [​IMG]

    Surprisingly enough, the game engine can handle tree-handed players just fine.
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    6,296
    475
    63
    italy
    I'd offer my help, but I never played this game and I didn't even know what it was about until 5 minutes ago when I looked for it on Youtube. From what I can see, it look like a DDR clone with maracas instead of arrows, correct me if I'm wrong.

    That said, writing programs which parse weird formats to make them editable is actually one of my favourite tasks, so I might be able to create an editor for those beatmap files if you manage to understand their format (and you provide me the beatmap files themselves; as I said, I don't have this game).
     
  7. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    Yes! This is a Naomi/Dreamcast rhythm game. You shake the maracas once when there is a single blue ball (eh), continuously when it comes to red balls, and hold a pose when prompted. Samba 2000 added a "hustle mode" as well, which are basically non-static poses.

    You can get a good idea of the game using the Wii version. Only, the wiimote gameplay sucks.


    Here's some gameplay of "Let's go away" (Daytona) played in NullDC:

    https://www.youtube.com/watch?v=Pp4vXpv3_1I

    This is a DLC song, exclusive to Samba 2000, and injected here in Samba de Amigo without any specific modifications. Hence the broken camera angles.

    AMG beatmap as-is: https://drive.google.com/file/d/1CZ8VHgbON8Owpyp8Ikz5m2MFAUxsyU9y/view

    The broken gameplay screenshot above was a simple experiment, copying and pasting the first few lines of a song in Easy mode, to repeat the associated pattern and try to get some hints. It does work somewhat, so I'm thinking there is no particular compression used in that file - it's a raw beat map. I guess it's missing some sort of "close" tag for a stream of red balls, they go on until the end of the song.
     
  8. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    A simple google search would have pointed you to the tool I wrote specifically for doing this:
    http://projects.sappharad.com/tools/gdibuilder.html

    I wrote it after I got a GDEmu board several years ago. Just make sure you're starting from an extracted GDI so that you have unmodified IP.BIN and 1ST_READ.BIN files for the game. (Although I believe someone over at assembler created a custom IP.BIN that auto-detects whether it's running on a CD-ROM versus GD-ROM and automatically does the right thing allowing you to use the same files for both types of media)
     
  9. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    Ah, yes. This tool was part of the failed tests, unfortunately. I used an untouched extracted GDI (well, tried with multiple ones, even) and tried to repack it that way, it could never boot.
     
  10. Are you able to look at the arcade version at all? I wonder if the code for those modes is portable or even still in the console version just disabled. I wouldn't know where to start with such an endeavor either as much as I'd like to poke around inside DOA2 on Naomi. Honestly, how would one go about doing a proper disassembly of an arcade ROM? Samba, DOA, whatever. If Samba has any beta leftovers, they'd be in the arcade version.

    Uh, shouldn't you know? You're the expert here and said the console port was the definitive version. I've never played the game, I just have a general interest in Naomi rom hacking.

    To get the disassembled code you can use mame's default disassembler. I just used it on DOA2 using these parameters and it worked okay. Obviously, nothing's notated and I don't know SH4 assembly so this does squat for me right now. Though, the prospect of completely modifying this game is fascinating. I don't know where to go from here.
    mame200-64>unidasm doa2verm.ic22 -arch sh4 > doa2verm.txt

    Uh for the Rev B version of Samba you'd use this I think. Apparently there's a ver2000 arcade version also? That has a different mainrom and there's also a Samba prototype in the wild, who knew?
    mame200-64>unidasm epr-22966b.ic22 -arch sh4 > epr-22966bic22.txt
     
  11. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    I'm not sure how that would work either. What are the gameplay differences with the home release?
     
  12. Sappharad

    Sappharad

    Oldbie
    1,413
    70
    28
    You must have done something wrong then. I've never encountered a game that didn't work, and even have used it to rebuild bad dumps that wouldn't boot so that they would boot.

    Does the original GDI Boot? If so, you use something like GD-ROM Explorer to extract Track03.bin to a data folder. Extract IP.BIN with it as well, somewhere outside the game data folder so you're not accidentally adding it to the game disc. Modify files in your data folder.
    Make a copy of the GDI and supporting files in another folder. Delete track03.bin. Select your data folder that you extracted disc files to in GDIBuilder along with the IP.BIN you extracted. (I'm assuming since the game used ADX audio that there is no CDDA) You may also want to use the Advanced window to set the disc name and other properties to exactly what they were on the original disc. (GD-ROM explorer can show you those) Let GDIBuilder build you a brand new track03.bin. This is used in place of track03.bin from the original GDI folder that you copied and deleted. Note that you can't just randomly rename whatever files you want. A GDI works just like .CUE sheet in bin/cue dumps, the file names of the tracks are specified in the .gdi. If you rename something you break the whole thing. This is why I keep GDI's in their own folders. The tool is also expecting your GDI file to be called disc.gdi, because that is what all of the dumping tools call it. It will automatically update a file called disc.gdi if necessary. If there is no disc.gdi, that doesn't get updated for you. In most cases the .gdi file itself does not actually need to be updated, that only changes if you're modifying a game with CDDA and your data is larger or smaller than the original such that the tracks need to move. On a game with only data, the track03 will always be the same size because GD-ROMs always end on the same sector.

    Just to re-iterate, GDIBuilder just builds track 3 and above, which is where all of the game data is. It doesn't rebuild track01 and track02, which are the PC readable tracks, just the data in the high density area (track03 and above). You leave those unmodified and let GDIBuilder create a replacement for the data track.
     
  13. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    @grap3fruitman For all I know, from a user-facing perspective at least, I'm not aware of significant differences between the arcade and home release when it comes to the music tracks. The list seems identical (both for Samba and Samba 2K), the beatmaps seem to be as well. The hardware is different but I4m not sure how the magnetic sensors of the arcade machine work (they don't use a sonar like on DC). But I've only seen the machine once or twice in the wild, so there might be stuff I'm unaware of. In any case yes, Samba 2K pretty much is the definitive home release of the game, considering the Wii controls are so poor and just plain not fun.

    @sonicblur SiZiOUS has been helping me out repacking the game, but I'll give your tool another try. Thanks for the details.

    Edit: tedious stuff here. The whole game seems to fit inside the 2mb 1stread.bin (and calls external textures, sounds, and music).


    I believe this is related to the VMU saves:
    [​IMG]

    This could be the song list:
    [​IMG]

    Interestingly, a few songs do not appear in the final game. "Mas Que Nada" still has its .amg file right there under our noses in the GD file system though, so it might be possible to restore its beatmap. No idea which version of the song was meant to be used with it though, and I haven't tried swapping the beatmap around yet just to check if it's still valid. Same goes for another song, called "One week", the .AMG beatmap is still on the disc. There's nothing on the disc for "Honoo No Fighter".
    EDIT: "Mas Que Nada" was actually published fully in JP Samba 1, and exclusive to the region. "El Mambo" was as well.
    EDIT: "Honoo no Fighter" is probably just "theme of Inoki".


    There's also "Sonic A GoGo" (but no beatmap, no music). Isn't that the theme song from Sonic X, which aired years later?
    Edit: the ADX file is still in the JP disc. It's actually the Sonic World music, from Sonic Jam: https://www.youtube.com/watch?v=VQiSqjjr3Ig


    The Dreamcast games also includes text direct from the Arcade version, such as "Insert Coin" (never shown anywhere in the home release afaik). There is also a "debug menu" string in there.
    Full album of some mildly interesting things in this file: https://imgur.com/a/w4dSDAu (PAL GDI)
     
  14. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    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:

    [media]https://www.youtube.com/watch?v=MtnWXoESzt4[/media]

    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.

    Thread on AssemblerGames: https://assemblergames.com/threads/technical-dc-samba-de-amigo-2000.69941/
     
  15. Miles Prower

    Miles Prower

    Renard Oldbie
    698
    0
    16
    FunKing (AssemblerGames) found a long list of unused menu entries within Samba de Amigo 2000:

    https://assemblergames.com/threads/technical-dc-samba-de-amigo-2000.69941/#post-978982
     
  16. So I don't know Samba De Amigo well enough to match any of these songs with any remaining prototype files, but I can at least give links to the song for some of them that weren't included in other games.
    • Are You Gonna Go My Way is definitely the Lenny Kravitz song.
    • Can't Take My Eyes Off Of You is originally a Frankie Valli and the 4 Seasons song, but it's also been covered many times. Given the cover's 1998 release, it may have been the Lauryn Hill version?
    • Gonna Fly Now is the official name for Rocky Balboa's theme. I can't think of anything else with that same name offhand.
    • Here Comes the Hotstepper is a song by Ini Kamoze according to Google. I'm not familiar with this one by title and I'm in a place where I can't un-mute my computer right now.
    • I Got a Girl may have been the Lou Bega song? The album it's from released in July 1999 and the game was released in December 1999. Alternatively, it may be a Tripping Daisy song from 1995. My gut says the Lou Bega song is more likely, but I'm not 100% sure.
    • Ob-La-Di, Ob-La-Da life goes on, brah. This is a classic Beatles song.
    • One Week is a Barenaked Ladies song from 1998.
    • September is one of Earth, Wind, and Fire's biggest hits.
    • Suavemente give an Elvis Crespo song from 1998. It doesn't look familiar from a glance at the lyrics.
    • Synchronized Love is a DDR song from 1995, if I'm following my sources correctly.

    The track by the Beatles is an interesting one. In 1999 the rights to the Beatles' catalog were owned Sony/ATV Music Publishing, a joined venture between Michael Jackson and Sony. Sony later bought out more of Jackson's contract and were known for being incredibly difficult to license Beatles songs from. Harmonix was able to license some of the catalog for The Beatles Rock Band in the late 2000s, but the restrictions Sony placed on them were absurdly draconian.