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!
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)?