ROM Hack Translation .mdig file format (Jet Impulse NDS)

MegalithAce

Active Member
Newcomer
Joined
Jan 25, 2021
Messages
42
Reaction score
32
Trophies
1
Age
23
XP
346
Country
Peru
Hello, I remember asking previously for help, but I would like to have a hand on this matter.
Basically, there are several files with the ".mdig" format which Jet Impulse uses for the character speeches in-between and before missions.

1766350099903.png


My analysis was done by using CrystalTile, as it's the best Hex editor for Shift-JIS format I had available. The file consists on several bits that define the behavior of the speeches. It isn't a hard format to follow, it's just a lack of understanding which I'll explain below properly.

Here's a snippet of 2 of those strings, I could deduce it's Little Endian because getting decimal values through a calculator using Big Endian gave me values that literally have no sense.

  • The Red section of the file indicates the string itself. Originally its in Japanese, which I already did a translation for it.
  • The Green section indicates the audio file it's going to use when the line shows up. There are cases like 59 03 5B 03, and a more curious one being 0F 27, which means it wouldn't play any audio (270F in decimal is 9999, 00 00 is a normal audio being played as well by one of the characters.)
  • The Orange section indicates the portrait being used by the string, which has around 10 or more.
  • However, the purple section is where my head gets empty. I have no idea what are those bits used for, and I know they affect the script negatively when edited, but I can't seem to understand the exact behavior it has on the file, and the pattern between each string

1766350596631.png


If anyone could be capable of helping me analyzing those files as well, I would be very grateful. I could even develop a tiny program in order to properly edit/add strings and etc.

If case of anything else being necessary, dont hesitate to send a message to the thread.

1766351205972.png
 
Hello, I remember asking previously for help, but I would like to have a hand on this matter.
Basically, there are several files with the ".mdig" format which Jet Impulse uses for the character speeches in-between and before missions.

View attachment 546832

My analysis was done by using CrystalTile, as it's the best Hex editor for Shift-JIS format I had available. The file consists on several bits that define the behavior of the speeches. It isn't a hard format to follow, it's just a lack of understanding which I'll explain below properly.

Here's a snippet of 2 of those strings, I could deduce it's Little Endian because getting decimal values through a calculator using Big Endian gave me values that literally have no sense.

  • The Red section of the file indicates the string itself. Originally its in Japanese, which I already did a translation for it.
  • The Green section indicates the audio file it's going to use when the line shows up. There are cases like 59 03 5B 03, and a more curious one being 0F 27, which means it wouldn't play any audio (270F in decimal is 9999, 00 00 is a normal audio being played as well by one of the characters.)
  • The Orange section indicates the portrait being used by the string, which has around 10 or more.
  • However, the purple section is where my head gets empty. I have no idea what are those bits used for, and I know they affect the script negatively when edited, but I can't seem to understand the exact behavior it has on the file, and the pattern between each string

View attachment 546837

If anyone could be capable of helping me analyzing those files as well, I would be very grateful. I could even develop a tiny program in order to properly edit/add strings and etc.

If case of anything else being necessary, dont hesitate to send a message to the thread.

View attachment 546838
I'm busy with another DS game but I suspect it's some ID in a table that holds the file locations of the face portraits or perhaps the character name, or perhaps both.
 
I'm busy with another DS game but I suspect it's some ID in a table that holds the file locations of the face portraits or perhaps the character name, or perhaps both.
Afaik, the green and orange section I've mentioned are the ones that handles such IDs, audio and portrait accordingly, there are no calls for the character names, as they're controlled by other files which I have no problems editing.
Also, don't worry! I'll still try to analyze on my own and write here whatever thing I might find. I'll still be grateful if there's a helping hand to understand that whole file format itself, as aside of those bits, there are a few others that I am clueless about, close to the bottom of the file.
Post automatically merged:

I still haven't found the use of those 4 bytes i've mentioned, but I've also found something.
The strings have a certain limit of around 64 bytes before reaching something I call "Control Bytes", which are the group of 8 bytes I've previously mentioned.
If the strings surpass the 64 byte limit, either by adding more data to the file or passing through the "Control Bytes", the whole file becomes unusable for some reason.

Green contains the mentioned control bytes which handles the text's audio ID to use, the portrait to use and other 4 bytes of data that are still unknown for me.
Red contains the strings itself, which i believe they're hard-coded to 64 bytes, Ig not a big problem since the textbox in-game is small.
I guess the only dilemma remaining is to understand what those 4 bytes remaining mean, and those bytes located in Purple

1766438259789.png
 
Last edited by MegalithAce,
  • Like
Reactions: NitroShell
I've found the functionality of those bytes, the thing is how stupidly dumb those files work.
Basically, the first 2 bytes control the text bubble appearance based on an specific time, imagine this as if you were handling a video player. The decimal representation of those 2 bytes indicate it's being controlled in seconds? No, can't be, but neither can be milliseconds because it's too fast for such.

the next 2 bytes control the "end" time of the text bubble, but based on some experimentation, there are some instances on which it indeed controls such speech bubble (works alongside the first 2 bytes) and in some other files, it just controls the sprite animation duration, and if using a weird value in hex, the whole script gets messed up.

There is also part of the strings that show up on the lower screen of the DS, those strings have no bytes to control that aspect, in any part of the file itself. I believe it's handled somewhere else?

Anyways the translation is soon to be over.
 
Last edited by MegalithAce,
  • Like
Reactions: NitroShell

Site & Scene News

Popular threads in this forum