| brian151 Banned The administration (as well as a few users) have decided that you're creepy/weird enough that it's time to activate the sploded clause. Laters. Level: NaN Posts: 20/-249 EXP: NaN For next: 0 Since: 08-09-16 From: USA Since last post: 4.7 years Last activity: 4.7 years |
|
||
WIPSo, as I recently announced/published, I've been trying to clone the old LEGO Spybotics game. In the midst of this, I did some research along the lines of completely decompiling or reverse-egineering the format. I've done this because I want a non-adobe tool that can read/[maybe modify] shockwave movies. perhaps play them (EXTREMELY unlikely, won't be my project to succeed, if it should happen) So, I discovered a huge cache of information concerning the bytecode in particular, in addition to learning why that "XFIR" header appears on all the shockwave movies I presently have. It seems odd this was there, I never understood it. Well, Macromedia had used a special variant of the Resource Interchange File Format, not an in-house one. From there, I started diving deeper. For the last week or so, I've been combing through one of the files of interest (the diropened spybotics: nightfall incident) in a hex editor, trying to peace together how in the hell it's structured. Recently, while searching for the actual chunks that SWA contain audio (found the files/data) , and bitmap cast members (neither header nor data), I discovered the way the mmap chunk works (mostly) It's essentially an offset table for EVERYTHING in the file (even itself, and the other main header chunks!) It also demystified why I was seeing so many of the supposed "interesting" chunks, that weren't at ALL their proper length or structure. These were all entries in the mapping chunk. With that knowledge in hand, I can find basically ANYTHING in the file (manually, RIFF viewers can't read jack, they say file is invalid) I used this information to identify a bit more, including the chunks containing text (and/or text fields) and flash .swf files... I managed to extract three chunks related to the compiled bytecode (that diropener can recover...lol) , but I'll get back to that, later. More recently (last two days) I created an XFIR-compatable JS RIFF parser, and have started building a tool to basically decompile the [uncompressed/unprotected] director/shockwave movie files. Currently, it can parse the mmap chunk to get a list of chunk types in a given .dir I have used this to indentify what I think are the palettes, and early today, I did manage to make headway in figuring-out how casts and cast members all fit together. (as it stands, I could make a tool to dump basically the whole file, and even disassemble the bytecode, but not yet link it all together) Now, let's talk about the bytecode. I have never messed much with any programming language that uses a stack, or implements other low-level memory management (except a few tries at assembly, which I have a LOOOOOOONG way to go, should I even continue) the bytecode is used for a stack-based system. I could disassemble it to a human-readable form, but too fully decompile it down to javascript/lingo (both are actually valid for shockwave) , I'd need to understand how to turn stack-based code to something like function foo(bar) { return ("foo.bar : " + bar); } I don't get how to do THAT at all... One of my goals is to successfully de-compile the scripts, so does ANYONE here understand how to use a stack-oriented language (and transcribe it to something with more formally declared functions/objects)? (also, IDK a REASONABLE name for the opcodes, so that'd be helpful, too) goals: parse a .dir/.dcr/.dxr and get literally EVERYTHING out of it, in the way of assets* decompile the bytecode to at the very least, have some understanding how the devs did something* perhaps convert the movie to a custom (and totally open format) fully (or almost fully) document the shockwave movie format* open the door to preserving/porting or ripping from one hell of a lot of old games* map-out a given movie, showing how it was structured by its devs possibly an open-source player/editor *primary concerns, ideal to complete entirely I seriously need help with this, though, IDK how far I can get before calling it quits, or hitting something I just cannot solve. current Target games (that I can remember right now): Spybotics: The Nightfall Incident (goal: complete port to JAVA or HTML5, complete: most currently do-able ripping, certain key parts of research into how code part might work [without aid of any original code]) WorldBuilder 1 & 2 (goal: re-create mapping system, maybe port, complete: tile rips) Junkbot and Junkbot Undercover (goal: complete rip, complete: [not done by me] presumably 'hard-rips' of everything or close to it, on TSR) Sorry this is such a LONG post, and I also apologize if this is entirely the wrong section. |





