rhythm-game-formats icon indicating copy to clipboard operation
rhythm-game-formats copied to clipboard

I don't think BG scripts are actually part of the SSQ format...

Open travelsonic opened this issue 6 years ago • 11 comments

And this seems to be further re-enforced as I look into how the game selects data to load, and the mechanics as to how that works.

You see, on the song select screen, there is an underlying array of data values (the specific length and arrangement depending on what you have unlocked or not, the current sort, as well as if the songwheel has a random slot on top of having a roulette slot, or not) .

For slots not belonging to either a Roulette slot, or a Random slot, those array values will range from 1 to the total number of songs in the game. For example, in DDRMAX2 -DanceDanceRevolution 7thMIX- PS2, from 1 to 74 (0x01-0x4A in hex). For another example, Dancing Stage EuroMIX 2's values would be 1 to 34 (or 0x01 - 0x22 in hex). Values of 199 (0xC7 in hex) and 112 (0x70 in hex) are used for the Roulette and Random slots (when there is a Random slot, at least) respectively. The actual songs these indexes reference are in the same order as data stored on disk (that is, while BG music, background images, stepdata, and background movie scripts are in separate areas in filedata.bin, they all have the same song order. This is important a little later on.

The game also tracks which index in the array you are in, the index being incremented or decremented depending on which direction you traverse the wheel.

When you select a song from the wheel (as opposed to hitting Random, or Roulette), the game will pull the value located at the present index in the array. From there, the game will fetch filedata entries from separate arrays containing entries for song BGMs, song static backgrounds, song stepdata, and song BG movie scripts. Going about it this way requires just one index, since each of these subsequent arrays have their respective data stored in the same order, and thus, you can reuse the same index to get the correct data from each array.

travelsonic avatar Jan 27 '19 19:01 travelsonic

Just remembered that a while back, I noticed while trundling around in MAME, that the AC mixes I've looked at (MAX2 and DS EuroMIX 2 respectively at least) does this too, hence my editing the title to remove the "at least in PS2 mixes" bit

travelsonic avatar Jan 27 '19 19:01 travelsonic

The SSQ specification could be edited to not suggest that it's video script. So then, that data type remains a mystery!

SaxxonPike avatar Jan 28 '19 15:01 SaxxonPike

Heh, hope I haven't been too much of a pain in the arse with my recent commentary and the like - as opposed to expression of passion, as reverse engineering these games is quite a passion of mine. ^u^

travelsonic avatar Jan 29 '19 02:01 travelsonic

All input is welcome!

SaxxonPike avatar Jan 29 '19 19:01 SaxxonPike

A mystery that I am also looking at is how the game interprets the stepdata itself in a song, whether it be in a normal single/versus/doubles stage, or in edit mode. This seems (but I could be mistaken) a bit independent from the mechanisms which allow you to work on edits, but where this code lies I cannot yet say. Kind of annoying, really, as I have figured out how to enable adding 3 arrows (in any combination of freeze arrows, and non-freeze arrows) on a beat, but that data is not interpreted correctly when playing the song despite the hexadecimal value representing said combination(s) existing. This seems, to me at least, to support the idea that editing data, and playing the data back, have different mechanisms. Odd, really, as it seems like it'd be perfectly doable to adapt the same sort of interpretation system that is used on edit mode editing on the systems that interpret stepdata in game, not to mention cut down on redundant code.

Slight tangent: I was wondering if you were ever considering making compression tools for the variation of LZ and LZSS2 that scharfrichter can decompress - mainly because it'd be cool to have tools that compress the data, as none of the other tools I could find online produce a file that the game will actually load correctly w/o crashing* (plus, in general, the possibilities that are added in terms of modding are IMO substantial).

travelsonic avatar Jan 31 '19 15:01 travelsonic

Hi,

Are you sure the 0x05 chunk isn't simply lighting data? Apart from the timing track, there's only 0x80 and 0xFF every other time, which would seem to match well with turning the lights off and on.

sesse avatar Nov 21 '19 11:11 sesse

I mean 0x04 chunk, of course, not 0x05 chunk.

sesse avatar Nov 21 '19 14:11 sesse

In at least DDR Extreme AC, chunk 0x05 contains background scripts.

sesse avatar Nov 29 '19 20:11 sesse

I always thought lighting data for old mixes came from the medium stepchart difficulty. Is that incorrect?

SaxxonPike avatar Jan 29 '20 17:01 SaxxonPike

Without having checked on real hardware: I would suppose it is both correct and incorrect. Ie., most likely, there is a separate lighting chunk, but the data is always identical to the timing of one given set of steps.

I've never checked what the story is for challenge-only songs…

sesse avatar Jan 29 '20 21:01 sesse

In at least DDR Extreme AC, chunk 0x05 contains background scripts.

Interesting.

I wonder, seeing how the chunk number seems to differ in AC and CS mixes (on top of other storage differences I've noticed in CS mixes specifically) if it is really correct to classify the way the data is stored (with regards to the chunk format, not the specific data stored within each chunk) as belonging to the SSQ format. Granted, this will require more research, but I have a hunch that what we are looking at is more a general container format that happens to be used to store the game's SSQ file data.

Pardon me if this doesn't make as much sense as it could, really just woke up (and am utterly sleep deprived, par for the course of me though I suppose haha)

travelsonic avatar Feb 05 '20 13:02 travelsonic