• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

SSBB Snapshot files. We need to crack em!

Ondo

Smash Apprentice
Joined
Jun 20, 2007
Messages
160
I finally uploaded my tools here. That's the DeLZSS tool and SplitStage, both with source.

Generally speaking, I do something like this:

bindecrypt stage.bin Decrypted\stage.bin
DeLZSS Decrypted\stage.bin Decompressed\stage.bin
SplitStage Decompressed\stage.bin Header\stage.bin.header Data\stage.bin.data Thumbnail\stage.bin.jpeg
 

Wiwiweb

Smash Journeyman
Joined
Feb 28, 2007
Messages
309
Location
Europe
Well, now that you know how a stage file works, I guess all I have left to do is creating a stage with one of every element, so you can see which value equals which element.
 

Ondo

Smash Apprentice
Joined
Jun 20, 2007
Messages
160
Well, now that you know how a stage file works, I guess all I have left to do is creating a stage with one of every element, so you can see which value equals which element.
I think seeing stages with pieces that have been flipped would still be nice, as well as enlarged pieces.

(While it's only slightly related to the issue at hand, I'd love to see screenshots showing every available piece, ideally at all three sizes.)

Heinermann - based on your info, I'm guessing Block Struct Byte 2 may be related to the size of the piece. The high 3 bits for one dimension, then next 3 bits for the other, and then 2 other bits. Very not sure about this, though.
 

Heinermann

Smash Apprentice
Joined
Jul 31, 2007
Messages
80
That's exactly what we need to do. Which is why I want to double check my new music references.

Can you post a stage with music "Sonic CD - Sonic Boom" and a couple of others with some other random songs(but tell me what they are? :p). If the values match up with the list I've made, then we're almost done with that until we get a re-compress & re-encrypt tool.
 

NGPixel

Smash Rookie
Joined
Feb 29, 2008
Messages
3
Is there a working LINUX version of the bin decryptor? So that screenshots and stages previews can be converted from BIN to JPEG completely on a Linux box?
 

Heinermann

Smash Apprentice
Joined
Jul 31, 2007
Messages
80
We were just talking about the decoding process for images and stages in this thread. Do you guys think we should make a new one specific to further image decoding/processing developments + stage developments? And if anyone wants to post a replay .bin I'll look at it, even though we're basically certain that it's a series of commands.
I found this youtube video suggesting replays, in fact, are just a recording of game actions.
http://ca.youtube.com/watch?v=iLv9d2tRUuo

Bugs like this also happen in the game Starcraft. The format goes something like this:

The replay is a compressed file that can be split into three; a header, containing player information (controllers, AI levels, colours, the randomizer for the AI, etc), a map(a complete copy of the map that was played on), and the actions table(which only stores human players' actions, the AI runs its standard routine).

Even though replays wouldn't be of much use, we could still create a replay -> Stage converter, What would be interesting would be modifying them, ordering characters to initiate actions that aren't native to them, or maybe if text above taunts aren't stored in the header file, people could create fan videos or something.


Well, I guess it's time we throw one of each block on a stage and get their ID. :p
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Is there a working LINUX version of the bin decryptor? So that screenshots and stages previews can be converted from BIN to JPEG completely on a Linux box?
Can people with Linux systems try this? It was compiled on a Redhat box, but I'm not sure which systems it'll work on. This is just the bindecrypt, also.

http://www.mediafire.com/?ymdubtvwmug

You would do, from the command line:

bindecrypt whatever.bin whatever.out

And see if it runs, generating the whatever.out file, or if it gives you errors instead. Thanks!
 

Heinermann

Smash Apprentice
Joined
Jul 31, 2007
Messages
80
OK. This is everything we have on stage files:

http://www.mediafire.com/?d2zxxuycg5g

I did a lot of updating on the tile format and I think I'm getting close to something. <3
I threw everything in that zip, including GTCoder's bin-decrypt and Ondo's tools, as well as created a Batch file by copying GTCoder's batch previously posted(which really does make things easier) called bin2stg. I also included references I've made previously(unrelated to this project) which you might want to take a look at. The character and stage references are the final public lists, meaning they are for event/classic/allstar data files, debug menu, and any other methods that the game uses to record or read characters/stages. They should apply to replay files if anything useful(meta ridley vs master hand? You'll get to see it actually if you can hack replay data properly :p).
 

Kirby King

Master Lameoid
Premium
BRoomer
Joined
Feb 8, 2002
Messages
7,577
Location
Being a good little conformist
Can people with Linux systems try this? It was compiled on a Redhat box, but I'm not sure which systems it'll work on. This is just the bindecrypt, also.

http://www.mediafire.com/?ymdubtvwmug

You would do, from the command line:

bindecrypt whatever.bin whatever.out

And see if it runs, generating the whatever.out file, or if it gives you errors instead. Thanks!
I got segmentation faults on all 4 Linux machines I tried. I have a core dump if you'd like it.
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Also, I'm going to be gone for a day or two, and then school is returning with a vengeance before spring break. Over the next day or two if I work on stuff, I guess it'll be either on a very simple Windows GUI or on an encryptor, to see if I can get it where we could change a byte or two of stage data, for instance, and copy it right back to SSBB.
 

Kirby King

Master Lameoid
Premium
BRoomer
Joined
Feb 8, 2002
Messages
7,577
Location
Being a good little conformist
Actually, I totally take that back--looks like I overwrote a .bin file with 0 bytes at some point, and used that on all the machines I tried without realizing. I just ran it without issues. Sorry for the false alarm.
 

Ondo

Smash Apprentice
Joined
Jun 20, 2007
Messages
160
I found one thing to add to the stage format: 0x40 is the length of the JPEG data.
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
OK. This is everything we have on stage files:

http://www.mediafire.com/?d2zxxuycg5g

I did a lot of updating on the tile format and I think I'm getting close to something. <3
I threw everything in that zip, including GTCoder's bin-decrypt and Ondo's tools, as well as created a Batch file by copying GTCoder's batch previously posted(which really does make things easier) called bin2stg. I also included references I've made previously(unrelated to this project) which you might want to take a look at. The character and stage references are the final public lists, meaning they are for event/classic/allstar data files, debug menu, and any other methods that the game uses to record or read characters/stages. They should apply to replay files if anything useful(meta ridley vs master hand? You'll get to see it actually if you can hack replay data properly :p).
Ondo/Heinermann, would you mind including the source for your tools as well? If you don't mind people (like me) looking at it. :p
 

NGPixel

Smash Rookie
Joined
Feb 29, 2008
Messages
3
I can confirm that the scripts work perfectly on Linux! Thanks a lot GTCoder!
 

Kirby King

Master Lameoid
Premium
BRoomer
Joined
Feb 8, 2002
Messages
7,577
Location
Being a good little conformist
GTCoder -- Ondo's tools are here. He posted them a little while ago, and they're working perfectly for me. Really good job all around.

EDIT: Alright! The Stage Browser now makes use of bindecrypt and Ondo's stage tools to extract all important information out of stage files. (I wrote a quick script that returns a human-readable version of this information.)

For the interested, here's my stageinfo.c (apologies in advance for poor error checking, it's meant to be a quick script). In order, it prints stage description, stage style, stage size, number of blocks used, the music ID (as a hex), and the name of the stage. Call as stageinfo stagefile.bin.data (make sure it's a data file generated by StripStage):
Code:
#include &lt;stdio.h&gt;

char brawlChar(unsigned char c1, unsigned char c2)
{
    if (c1 == 0xFF)
    {
        return (char) (c2 + 0x20); 
    }
    else if ((c1 == 0x30 || c1 == 0x00) && c2 == 0x00)
    {
        return ' ';
    }
    else
    {
        return (char) NULL;
    }
}

int main(int argc, char *argv[])
{
    /* assume proper usage */
    int i;
    unsigned char printc = (char) NULL;
    unsigned char printc2 = (char) NULL;
    FILE *fp_i = fopen(argv[1], "rb");

    if(fp_i == NULL) {

        printf("Error opening input file %s.\n", argv[1]);

        exit(-1);

    }
    
    // Drop the first 10 bytes
    for(i = 0; i < 0x0A; i++) {

        fgetc(fp_i);

    }
    
    // Print the stage description
    for(i = 0; i < 21; i++) {

        printc = fgetc(fp_i);
        printc2 = fgetc(fp_i);
        printc = brawlChar(printc, printc2);
        if (printc != (char) NULL)
        {
            printf("%c", printc);
        }

    }
    printf("\n");
    
    // Drop the next several bytes
    for(i = 0; i < 20; i++) {

        fgetc(fp_i);

    }
    
    // Print stage style
    // 0 = nature
    // 1 = factory
    // 2 = remains
    printf("%d\n", fgetc(fp_i));
    
    // Print stage size
    // 0 = small
    // 1 = medium
    // 2 = large
    printf("%d\n", fgetc(fp_i));
    
    // Print number of blocks
    printf("%d\n", fgetc(fp_i));
    
    // Skip unknown byte
    fgetc(fp_i);
    
    // Print music ID

    printc = fgetc(fp_i);
    printc2 = fgetc(fp_i);
    printf("%x%x\n", printc, printc2);
    
    // Skip unknown bytes
    fgetc(fp_i);
    fgetc(fp_i);
    
    // Print the stage name
    for(i = 0; i < 16; i++) {

        printc = fgetc(fp_i);
        printc2 = fgetc(fp_i);
        printc = brawlChar(printc, printc2);
        if (printc != (char) NULL)
        {
            printf("%c", printc);
        }

    }
    printf("\n");
    
    // For our purposes, we are done here (block placement info follows)
    return 0;
}
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
FINALLY. I made a very simple website that I plan to keep updated. If I find a free webhosting place that I can upload ZIP files too and edit them, instead of having to replace them with mediafire/rapidshare/whatever, I'll switch to that. Anyway, you can follow this for program updates now, if you so desire. Thanks for all the interest in the program, and to Ondo, Heinermann, segher, and others for information and hard work!

Ondo and Heinermann, do you mind if I also include/link to your stage tools, and a possible stage editor if you produce it? I'm giving credit of course.

http://freewebs.com/gtcoder/index.html
 

Kakkoii

Smash Apprentice
Joined
Jan 29, 2008
Messages
89
Location
CANADUH!
FINALLY. I made a very simple website that I plan to keep updated. If I find a free webhosting place that I can upload ZIP files too and edit them, instead of having to replace them with mediafire/rapidshare/whatever, I'll switch to that. Anyway, you can follow this for program updates now, if you so desire. Thanks for all the interest in the program, and to Ondo, Heinermann, segher, and others for information and hard work!

Ondo and Heinermann, do you mind if I also include/link to your stage tools, and a possible stage editor if you produce it? I'm giving credit of course.

http://freewebs.com/gtcoder/index.html
Well your getting what ya want :)

Moved your site onto my server.

You have a server here at http://kakkoister.com/GT
 

Xane

Smash Journeyman
Joined
Sep 19, 2007
Messages
335
Location
Germany
NNID
XaneFeather
3DS FC
3866-8124-2065
Huge thanks for enlighten me in LZSS, GT! Your source really helped me there. :>
Here's an online screenshot decrypter with experimental widescreen support:

http://xane.gamez-interactive.de/Brawl/Decrypter/

Still in testing phase, but should work most of the time.
Mac and Linux users are now able to decrypt their shots.
But please do not hotlink the images from my space, I'll most likely delete them from time to time to save space. :x
If anyone can offer me a space for this service, I'd greatly appreciate it.
 

milind4

Smash Apprentice
Joined
Feb 29, 2008
Messages
105
Location
Bangalore, India
xane, its really good

just one suggestion. how about you implement a simple javascript script to make sure that the input files are .bin?

Code:
<script language="javascript">
function check() {
  var ext = document.*name of form*.screen.value;
  ext = ext.substring(ext.length-3,ext.length);
  ext = ext.toLowerCase();
  if(ext != 'bin') {
    alert('You selected a .'+ext+
          ' file; please select a .bin file instead!');
    return false; 
}
  else
    return true; 
}
</script>
just add a name to your form and put it in the required place (*name of form*). hope this helps! then just call this function with onsubmit in the form. that's all.

btw i did not write the script, i just changed some of the values from http://www.cs.tut.fi/~jkorpela/forms/file.html
 

Xane

Smash Journeyman
Joined
Sep 19, 2007
Messages
335
Location
Germany
NNID
XaneFeather
3DS FC
3866-8124-2065
xane, its really good

just one suggestion. how about you implement a simple javascript script to make sure that the input files are .bin?

(...)
I know JavaScript, I'll implement something like that later.
But it's not limited to just *.bin, it also supports GT's *.out files aswell.
 

Kirby King

Master Lameoid
Premium
BRoomer
Joined
Feb 8, 2002
Messages
7,577
Location
Being a good little conformist
Huge thanks for enlighten me in LZSS, GT! Your source really helped me there. :>
Here's an online screenshot decrypter with experimental widescreen support:

http://xane.gamez-interactive.de/Brawl/Decrypter/

Still in testing phase, but should work most of the time.
Mac and Linux users are now able to decrypt their shots.
But please do not hotlink the images from my space, I'll most likely delete them from time to time to save space. :x
If anyone can offer me a space for this service, I'd greatly appreciate it.
You can probably set things up so that your server sends the image as a download immediately after being uploaded and decrypted. That way you won't have to store it on your server at all.
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Huge thanks for enlighten me in LZSS, GT! Your source really helped me there. :>
Here's an online screenshot decrypter with experimental widescreen support:

http://xane.gamez-interactive.de/Brawl/Decrypter/

Still in testing phase, but should work most of the time.
Mac and Linux users are now able to decrypt their shots.
But please do not hotlink the images from my space, I'll most likely delete them from time to time to save space. :x
If anyone can offer me a space for this service, I'd greatly appreciate it.
Nice, Xane. But yeah, you're going to run into space issues if a ton of people use that. ;p
*edit* What KirbyKing said.

If you don't mind me asking, what utilitiy/whatever did you use to resize the images? I've started a Windows GUI version (if you fast people don't beat me to it, grr... :chuckle:)...
 

GaryCXJk

Smash Lord
Joined
Jun 2, 2006
Messages
1,809
Maybe the wide screen detection should be done during decryption, seeing as I've heard the wide screen identifier is already inside the screenshot file.
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Maybe the wide screen detection should be done during decryption, seeing as I've heard the wide screen identifier is already inside the screenshot file.
Yeah, I think my program has been printing the screen ratio when it decodes for a while now. :p I just need to find a good way to resize.
 

qwertyuiop098

Smash Rookie
Joined
Mar 1, 2008
Messages
2
Is there a program that can convert the .jpg files BACK to .bin? (so i can edit the screens and put them back on the wii)
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Is there a program that can convert the .jpg files BACK to .bin? (so i can edit the screens and put them back on the wii)
Not yet (this would be primarily useful for stages, especially since I'm not sure of all the image data), but may try to make one over the weekend.
 

Xane

Smash Journeyman
Joined
Sep 19, 2007
Messages
335
Location
Germany
NNID
XaneFeather
3DS FC
3866-8124-2065
(...)
If you don't mind me asking, what utilitiy/whatever did you use to resize the images? I've started a Windows GUI version (if you fast people don't beat me to it, grr... :chuckle:)...
Standard PHP GD-Libary.


Maybe the wide screen detection should be done during decryption, seeing as I've heard the wide screen identifier is already inside the screenshot file.
The widescreen identifier doesn't work for every file.. I tested it. :x
And that way it is right now enables the user to save the widescreen image in it's original state.
 

GTCoder

Smash Apprentice
Joined
Feb 18, 2008
Messages
77
Standard PHP GD-Libary.



The widescreen identifier doesn't work for every file.. I tested it. :x
And that way it is right now enables the user to save the widescreen image in it's original state.
:( I guess I needed more files to test. I think that identifier worked for every image I got from this thread...
 

Heinermann

Smash Apprentice
Joined
Jul 31, 2007
Messages
80
Ondo and Heinermann, do you mind if I also include/link to your stage tools, and a possible stage editor if you produce it? I'm giving credit of course.
Sure. But it may be a bit messy, I'm newb to C/C++. :p

And yeah, you should host everything on that web space.
 

Xane

Smash Journeyman
Joined
Sep 19, 2007
Messages
335
Location
Germany
NNID
XaneFeather
3DS FC
3866-8124-2065
As for the Stage Editor.. I could try to create one as close as possible to Brawl's Stage-Creator (Same graphical GUI style + SFX).
I'm more into programming (Game)-Logic than reverse engineering.
But since I don't own Brawl I need MANY Stage-Creator videos... does anyone know some?
I need to know all the different blocks and whatnot~

But this can wait. :>
 

Heinermann

Smash Apprentice
Joined
Jul 31, 2007
Messages
80
That would be great Xane! Do you have MSN or AIM? I don't know the Stage Builder either but I've seen many videos on Youtube and have gotten to know it by anazlying its file format.

We don't know all the blocks though, we still need to analyze some more stages and get the block IDs, but we know the Standard block ID, so we can at least start.
 

Gennie

Smash Apprentice
Joined
Oct 19, 2007
Messages
122
As for the Stage Editor.. I could try to create one as close as possible to Brawl's Stage-Creator (Same graphical GUI style + SFX).
I'm more into programming (Game)-Logic than reverse engineering.
But since I don't own Brawl I need MANY Stage-Creator videos... does anyone know some?
I need to know all the different blocks and whatnot~

But this can wait. :>
I think is better to wait for the release, this is something that can wait, besides, if it's done well then it will be an amazing job for sure :3
 
Top Bottom