[Technical][DC] Samba de Amigo 2000

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

  1. fafadou

    fafadou Gutsy Member

    Joined:
    Aug 3, 2016
    Messages:
    454
    Likes Received:
    178
    Wonderfull !
    We can almost do our music stage for samba de amigo with your tools :)
     
  2. FunKing

    FunKing Member

    Joined:
    Sep 23, 2013
    Messages:
    14
    Likes Received:
    42
    Thanks - but I think I'm halfway there.

    I believe I've completely documented the "Amigo"blocks (difficulty levels) EASY, NORM, HARD, SUPR. One could create a level editor for this (with audio sync and player movements) without problems.

    Amigo blocks DA_E, DA_N, DA_H and DA_S are the equivalent in hustle mode, and very similar in format, but I'm not sure about the meaning of a few bits (probably related to the speed of the movements). Still, creating / editing hustle mode levels should not be difficult.

    I didn't spend much time with HEAD, CAM_ and ACT_ blocks, though. They seem to handle camera position and movements, as well as "actors" and "extras". There's some debug code in the game that could shed a light on this - I've seen mentions of "stand, jump, side_step, fr_bk_step, act_bakuten, act_object" (BTW, "bakuten" is "backflip" in Japanese). To create/edit the background animations, these blocks must be understood.

    I noticed that for the same song in both DC & Wii (Bamboleo):
    • Amigo blocks are almost identical (at least in format)
    • HEAD blocks are identical
    • half of the ACT_ blocks are identical, the others have a few bits slightly different
    • CAM_ blocks are VERY different (at least in content)
    So, to complete the reverse engineering of Amigo files, we need to understand a few bits of Amigo blocks and the meaning of HEAD, CAM_ and ACT_ blocks. My current workflow is:
    • Dump an Amigo file with amigo_explorer.py
    • Play & record the gameplay
    • Trim the video so it will start at "frame 0" (which is the 1st frame after fading to black)
    • Play the video with ffplay and follow along with the dump (timing on both is in the same format)
    • Notice what happens in the video and correlate with the values in the dump
    If anyone wants to help with that, I'd be grateful. :)

    P.S.: I also would love to have native Python libraries to read & write files (such as AFS, PVR, TPL, ...) to automate file conversions and thus translation of the game. I could do it all manually with currently available tools, but that's not fun - and such libraries would help in other projects as well.

    If anyone is interested, check out the Kaitai Struct Web IDE, where you can load a .ksy file (defining a file structure), load a file (such as a DC .AMG Amigo file) and see the data being mapped to the structure that you can edit in real time. It would be a great reverse engineering tool just for that, but it also can create code to parse the structure in many different languages as well! So if anyone could contribute with a Kaitai Struct file format as well, it would be awesome! :D

    [​IMG]

    P.P.S.: I tried using the Null DC debugger, but the debugger seems to be buggy! Does anyone recommend another emulator with a debugger (that works)?
     
    Last edited: Jan 12, 2019
    Renard, fafadou and americandad like this.
  3. FunKing

    FunKing Member

    Joined:
    Sep 23, 2013
    Messages:
    14
    Likes Received:
    42


    As you can see in the video above, I replaced "Tubthumping" with "Arriba Allez" with v. 0.2 of amg_explorer, and even the animations work correctly! :D

    I described (almost) completely the .AMG format, both in text format and in Kaitai Struct files. Please see https://github.com/AltoRetrato/samba-de-amigo-2k_modding for details.

    This means that song conversion is basically done! I didn't test anything besides what's in the video, though, so bug reports, bug fixes and suggestions are welcome.

    Edit: First bug report is from me. Only afterwards I noticed the game seems to be a bit out of sync, and hustle mode crashed the emulator. :( Oh well, back to the drawing board (but only when I get some free time)...
     
    Last edited: Jan 21, 2019
    MetalliC, Renard, MastaG and 3 others like this.
  4. fafadou

    fafadou Gutsy Member

    Joined:
    Aug 3, 2016
    Messages:
    454
    Likes Received:
    178
    You are working very well :)
     
  5. Renard

    Renard Member

    Joined:
    Aug 10, 2014
    Messages:
    14
    Likes Received:
    21
    I've finally been able to play around a bit with Kaitai. I'm really impressed, this is a fantastic tool. Combined with the documentation you already wrote, this is absolutely bonkers!

    Edit: also, Hustle mode (raw import from the Wii data) crashes the real hardware too in my tests, not just the emulator.
     
    Last edited: Feb 25, 2019
    americandad and fafadou like this.
  6. fafadou

    fafadou Gutsy Member

    Joined:
    Aug 3, 2016
    Messages:
    454
    Likes Received:
    178
    Please show us when you can :)
     

Share This Page