DSHack.org Archive
This is a read-only archive from DSHack.org, as seen in 2008-2015.
Click here to join our newer Forum.
Page: 1
Szymmy_Saurus.cia
Posted 2014年09月21日 - 6:35 JST #16850

GRAWR :3

Admin
2359 Posts

Can we start with BCSTM? They seem to be equivalent to MKWii's BRSTM and they also appear to share some common stuff.
http://wiki.tockdom.com/wiki/BRSTM_(File_Format)
oaWbD3r.png That would be the first part of that file.
Let's cut it to sections...
D7gyDGH.png
That one is obvious...
wewgGZz.png
That has to be the endian one from MKWii, also same values.

PPjwFXb.png
To be honest, I have no idea what this might be as Tockdom doesn't mention anything in this place. But, is it the length of the header in bytes? It IS 64 bytes long after all, but when we look at the next step...

sDuh1SV.png

It shows 498,540,546, so it can't possibly be the filesize as it would have been 500MB big... Hmmm... If we don't reverse it, it becomes 35,698,461, if we split into two bytes, we get 7607 and 8194... That last value looks kinda "right", but the first one...?
6vDmLbW.png

That could be the HEAD section offset, in this case "INFO".

sLMHu8B.png
Length of SEEK

Anyway, the rest of the whole file seems pretty similar to BRSTM with other names - we have 256-byte INFO, we have ADPCM file, can you figure out how to listen to tracks from this file?


N64 Arctus
Posted 2014年09月21日 - 7:25 JST #16851



Members
635 Posts
This would be great to add to the wiki, unless, is that a bad idea? O_o

MKGirlism
Posted 2014年09月21日 - 7:34 JST #16852

I'm cutely evil, aren't I?

Führer
8388607 Posts
(B)CSTR and (B)RSTM are both made, using the same Framework, of which I just forgot its name, so it's very likely, that these are similar.

Gericom
Posted 2014年09月21日 - 16:52 JST #16860

Feature-Length Nut Expansion Pak

Moderator
1377 Posts

Can we start with BCSTM? They seem to be equivalent to MKWii's BRSTM and they also appear to share some common stuff.http://wiki.tockdom.com/wiki/BRSTM_(File_Format)oaWbD3r.png That would be the first part of that file.
Let's cut it to sections...D7gyDGH.png
That one is obvious...wewgGZz.png
That has to be the endian one from MKWii, also same values.
PPjwFXb.png
To be honest, I have no idea what this might be as Tockdom doesn't mention anything in this place. But, is it the length of the header in bytes? It IS 64 bytes long after all, but when we look at the next step...
sDuh1SV.png
It shows 498,540,546, so it can't possibly be the filesize as it would have been 500MB big... Hmmm... If we don't reverse it, it becomes 35,698,461, if we split into two bytes, we get 7607 and 8194... That last value looks kinda "right", but the first one...?6vDmLbW.png
That could be the HEAD section offset, in this case "INFO".
sLMHu8B.png
Length of SEEK
Anyway, the rest of the whole file seems pretty similar to BRSTM with other names - we have 256-byte INFO, we have ADPCM file, can you figure out how to listen to tracks from this file?

Every File explorer can convert them already.

N64 Arctus
Posted 2014年09月23日 - 6:19 JST #16922



Members
635 Posts

Every File explorer can convert them already.


Does that mean they can be converted into midis or other audio files?

Gericom
Posted 2014年09月23日 - 14:35 JST #16933

Feature-Length Nut Expansion Pak

Moderator
1377 Posts

Does that mean they can be converted into midis or other audio files?


Into wav. It is as easy as opening it, and going to File->Save As

N64 Arctus
Posted 2014年09月23日 - 22:44 JST #16934



Members
635 Posts

Into wav. It is as easy as opening it, and going to File->Save As


Wish there was an easy way to convert .bcstm to midi though, then I could get the music for Piranha Plant Slide(Pipeway) and put it into mkds as a music hack(yes, I know I would need to change the instruments first).

Gericom
Posted 2014年09月24日 - 0:15 JST #16937

Feature-Length Nut Expansion Pak

Moderator
1377 Posts

Wish there was an easy way to convert .bcstm to midi though, then I could get the music for Piranha Plant Slide(Pipeway) and put it into mkds as a music hack(yes, I know I would need to change the instruments first).

bcstm is a streaming music format, while midi and sseq are note based. You can't convert from a streaming format to a note based format.

N64 Arctus
Posted 2014年09月24日 - 1:33 JST #16941



Members
635 Posts

bcstm is a streaming music format, while midi and sseq are note based. You can't convert from a streaming format to a note based format.


At least not without it being a garbled mess after conversion. I have converted a .wav to a .mid, and it turned out terribly, so it can be done, just not very accurately.

Tomix
Posted 2014年09月24日 - 7:53 JST #16948

MKDS Kart Connoisseur

Moderator
4229 Posts

That's because it randomly generated the midi from the wav file, it didn't really convert anything.


Haruhi Ermiiworth
Posted 2014年09月24日 - 19:04 JST #16949

ERLLUMINATII CONFIRMED

Moderator
9234 Posts

Arctus, converting wav into midi would require a such heavy algorithm. Transcript the song by yourself, don't let the computer do that! :D xD


N64 Arctus
Posted 2014年09月24日 - 21:38 JST #16952



Members
635 Posts

Transcript the song by yourself, don't let the computer do that! :D xD


Hm, okay, so create my own midi by listening to the mp3/wav/bcstm/etc and compose it myself. As tedious as that sounds, I'll try it, rather than trying to convert it, thanks.

Jesse
Posted 2014年09月25日 - 5:11 JST #16976



Members
41 Posts

one question, where can I get these files without doing magic with my 3ds?


MKGirlism
Posted 2014年09月25日 - 5:17 JST #16977

I'm cutely evil, aren't I?

Führer
8388607 Posts
Extract the ROM, maybe?

Szymmy_Saurus.cia
Posted 2015年01月24日 - 5:57 JST #19685

GRAWR :3

Admin
2359 Posts

Hullo everyone :3
This time I opened Common.szs on root of RomFS and guess what I found? Tons of physics files! Why so many? It looks like every of them has certain purpose, as far as I'm concerned, there are two types of files inside of it:

Part/Character Files and Big Stats Files. Despite their differences, both of these files share a common structure.
Let's begin with Part/Character Files:
First 12 bytes contain the information about file:
6RN6ufx.png
The very first byte, currently at 00, changes to 01 when you're in Big Stats File.
The next bytes is the amount of parts/characters that appear in this file, the second one is the amount of different stats that will be determined in this file. In this case, 12=18, 0C=12.
Now if we check the second section, there are 18 characters and 12 types of stats, as seen over here:
Nv0vXCr.png
Each of these names is exactly 32 bytes long, which can be proven by deleting 12 bytes at the start. Note, that's not how the file looks like, it has additional 12 bytes at the beginning, that's why I don't embed it.
http://i.imgur.com/OhGqAgc.png

Before the main value section begins, there is some amount of multiplier. Float and hex, each cell is 8 bytes long and the amount of them is always exact to the amount of names, in this case type names.
myvpcdi.png
Or here:
ApKPtIS.png
Or here:
UzqVxX7.png

The last part, values, is basically a two-dimensional array. One of the dimensions is the name of the character, the other one of stats.
DgWbfMF.png
And if I were to demonstrate how it works in Excel, it would be:
Ig4arLB.png
<profesionally made chart in Excel and Paint>

Each cell in here is EXACTLY 4 bytes long. In this case, every character uses 48 bytes, because we have 12 types multiplied by 4 bytes. It can be any number, as long as it's in certain boundaries. These numbers get added afterwards towards the total stat of a combo, which is determined in Big Stats Files. Each number is a 0.25 step in a stat. Like Metal Mario, B-Dasher and Red Monster have 5.25 in Speed stat, so this combination would have total of 18 or 19.

Big Stats Files have only minor differences. They look like this:
tMh5hOo.png
Instead of character names, they have level names, which are just 0.25 steps in every stat. Levels are total combination values that were calculated in previous files. Like if a value total for the complete combination is 18, the kart is level 18.
The most important thing however is that stat values are much bigger and float. These are global values, so they don't apply to just one part, they apply every kart which has the following stats.

And that's it. Looks fun enough :D


Haruhi Ermiiworth
Posted 2015年01月24日 - 6:07 JST #19686

ERLLUMINATII CONFIRMED

Moderator
9234 Posts

Awesome. I'll try tweaking it tomorrow!


pabloh&g
Posted 2015年05月04日 - 15:17 JST #20872

On 26/09/2014, at 9:25 pm, Yamilla Hoshi wrote:> ????

Members
167 Posts
I didn't know that you already researched this, and I researched again. ;_;

Page: 1