Mario and Luigi: Dream Team/Dream Team Bros./3 F/BMes.bin

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Mario and Luigi: Dream Team/Dream Team Bros./3 F/BMes.bin

Post by LolHacksRule »

I was looking at the binary files for the message data. Most binary text files from Nintendo's localization tool are in the F/BMes.dat file with no file names. The bin files is read by the game, which describes offsets and bytesizes of the message files in the .dat file, but I'm not sure about the unk value in the header. I attempted to document the format. Anyone want to help finish off this template? Being able to make QuickBMS read the file would help with extraction of the message files from the dat files and even modification of the in-game text. Thanks so much.

Code: Select all

struct ML3MsgBin
{
    struct Hdr
    {
        int16 dummy;
        int32 messageBinFileCnt;
        int16 unk;
        int32 messageMetaBinByteSize;
        int16 dummy2;
        int16 messageBinFileCntMinus1;
    } header;
    struct MsgMeta
    {
        int32 nextMsgFileOffset;
        int32 msgFileByteSize;
    } msgMeta[header.messageBinFileCnt];
} ML3MesBin;
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Mario and Luigi: Dream Team/Dream Team Bros./3 F/BMes.bin

Post by aluigi »

You can use this script:

Code: Select all

open FDDE "bin"
open FDDE "dat" 1

get ZERO short
get FILES short
get ZERO long
get BIN_SIZE long

get ZERO short
get FILES short # -1 instead

for i = 0 < FILES
    get OFFSET long
    get SIZE long
    if SIZE != 0
        log "" OFFSET SIZE 1
    endif
next i

The files have a custom format ("MsgStdBn") and they seem to contain unicode text and other information
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Mario and Luigi: Dream Team/Dream Team Bros./3 F/BMes.bin

Post by LolHacksRule »

Thanks so much.