GithubHelp home page GithubHelp logo

brian151 / openshockwave Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 8.0 19.66 MB

attempt at reverse-engineering and possibly re-implementing Macromedia Shockwave

License: Apache License 2.0

HTML 13.90% JavaScript 60.94% CSS 0.19% Haxe 7.28% Python 17.69%

openshockwave's People

Contributors

brian151 avatar djsrv avatar mrbrax avatar tomysshadow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openshockwave's Issues

lscrtoscript broken after last merge ?

Hey guys,

I saw the huge merge, was like got to try it out.
Only to get a error. disabling that part gave way to more and more errors.
Might wanna check the merge out.. and see whats wrong.

Communication

I don't currently have any way of contacting you (Brian151) so that we can collaborate on this project.

8-bit BITD issues

So the converter doesn't work properly for the files i have, it skips a third of the height, and the length of the files does not correspond to (width*height) so there has to be some kind of compression (RLE?).

I've almost completed a python script that can extract text, WAV & AIFF, and BITD is the one i'm stuck on, been working on this thing almost every wake hour for a couple of weeks now, and just found this project. Really interesting stuff!

Since the converter only has 24 & 32 depth selectable, I'm assuming the format hasn't been deciphered yet?

oh and also, exported bmp's from director all have the same palette (in-game images always have palette set to -1) so i'm thinking the bytes aren't corresponding to colors but palette positions?

Thank you!

I don't really know how else to post this, so I'm sorry if it bugs y'all. But the one thing that kept me reverse engineering a server for my favorite online game, "Spineworld", were the thanks and appreciation from fellow players who longed for its return. And I want this project to be appreciated in the same way.

The first game I ever played was Junkbot, around age 4, no doubt. Then there was Spybot, then "Spineworld", and Habbo. I was really worried that these games and their technical secrets would be lost as their plugin faded into obscurity. I can't tell you how excited I am to think that people are working hard on a project that could open them up a little.

I can't do much in the way of decompilation, nor am I very good at low-level things like this, but I have some good knowledge of the way Spineworld's client operated, as well as a few versions of it on hand. I feel like it's a good project to sample a lot of functionality from (i.e. external cast/data/sound loading, networking, xtra usage). If it helps I'm happy to provide any resources and intel on it, should you choose to use it to explore certain aspects of Shockwave.

MCsL / cast lists

Due to this: https://github.com/Brian151/OpenShockwave/blob/master/docu/FormatNotes.txt#L334
and me getting some kind of success reading the format, is the spec there correct, or is it just guessing?

Here's some progress I've made:
1499341843023

(albeit it breaks if casts are external and uses paths)

But i can't figure out how it assigns the cast members to the cast library, i think this is where you people are stuck too, yeah?

One interesting note is that on some of the CAS* entries, the first integer more often than not matches up with what cast number the first member has.

Is it possible to get where the scripts exactly come from ?

Hey guys,

So once i run a .dir file thru it i can get bits and pieces of code here and there.
Some seem to be exactly like it should be, but now the problem is.
It does't say where from what script it actually comes from it only has like a number.

LctX 129
Lscr 134
Handlers

But no clue if it comes from a script Called Init or Loop etc.
And what is the best way to report the missing codes getting a lot of ERROR or UNK_?

Sample File i get this with
load_play.zip
Sample File that simply wont load unprotecting no error what so ever, but it refuses to.
Could it be diff version director or something ?
game_v440.zip

i might be wrong, but it seems to work..
probably a better way..
projectorrays.js
"unk_72": () => { translation = new AST.SYS('player'); script.stack.push(translation); }, "unk_b2": () => { if(this.obj == 305) var name = 'system'; if(this.obj == 307) var name = 'global'; else if(this.obj == 309) var name = 'key'; else if(this.obj == 311) var name = 'mouse'; else if(this.obj == 313) var name = 'movie'; else if(this.obj == 303) var name = 'sound'; translation = new AST.SYS(name); script.stack.push(translation); },

ast.js

class SYS extends Node { constructor(value) { super(); this.value = value; } toString() { return "_" + this.value; } } AST.SYS = SYS;

Error: "argsList.shift() is not a function"

I'm sure it's because the project isn't complete yet, and it can't pull bytecode from_every_ DIR, but here's a DIR that I wanted to get bytecode for but couldn't.
t
I thought it was a little odd that I got that error instead of another. I'd research this further but I really don't know how to debug JavaScript correctly.

The DIR is attached in a ZIP, along with the original DCR. I used a special tool made by a friend, so I guess it's possible that the file isn't 100% converted.

chat_799.zip

Question not really issue.

Hey guys,

So as you know from director itself you can easily load a .dcr file.
Read all the images and sound no problem all with a small piece of code.

So i been doing just that but for some reason all script i read and write to the .dir obtained are empty.
Obvious its because the code itself is empty as well..
aka scriptText

How would i go about creating a .dir with that intact with the bytecode aka only unreadable in the director itself ?

Edit:
Btw .cst files working just fine as well.
I have some .cst i made in the past so no converting needed and getting the code outputted ofcourse not complete but meh good enough.

edit2:
This
NumberOfMembers = winRef.movie.member.count

turns into this :).

-- UNK_70 5
NumberOfMembers = #member.count()

DCR DEFLATE Compression

Did you guys ever figure out the exact compression format of the DCR files?

On branch IN001 of my project (/hqkirkland/DcrDecompressor/) I began using the DeflateStream in .NET. But it keeps telling me "Block length does not match it's complement." on an unusually-long chunk of data.

Suggestions regarding the error indicate that you should skip the first two bytes (0x78, 0xDA, in most of the blocks of my file). And while this works for most of the blocks, except for the 4th one on a particular file.

For the record, I also tried using the .NET wrapper library Zlibnet, but vshost.exe crashes after the third block. I'm guessing that the dll wasn't set up with a good enough structure for tracebacks.

I know that the chunk offsets I'm using are correct, because the programs do get some of the data uncompressed.

In the end I just want to get a handle on how to inflate those DCR chunks. The programs work fine for smaller files.

The mystery of strings

Yet another "thread", but this applies to more than one file format.
So there's definitely something weird about strings, which causes trouble when i try to parse different games (most likely different director versions):

Game 1

49 46 57 56 9F 00 00 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00 00
00 00 00 00 00 00 00 15 00 00 00 40 00 00 00 57 00 00 00 59 00 00 00 59 00 00 00 59 00 00 00 59 13 4D 61 67 6E 75 73 20 4C 75 6E 64 65 6E
20 2D 20 45 4C 44 00 29 4D 61 67 6E 75 73 20 4C 75 6E 64 65 6E 20 2D 20 45 4C 44 20 49 6E 74 65 72 61 6B 74 69 76 20 50 72 6F 64 75 6B 74
69 6F 6E 00 15 43 3A 5C 64 6F 6B 5C 4D 75 6C 6C 65 5C 4D 76 4E 6F 50 72 6F 74 00 00 00 00

1499931721396

Game 2

49 46 57 56 5F 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 0C 00 00 00 1F
00 00 00 2F 00 00 00 31 0B 4C 69 6E 75 73 20 2D 20 47 43 44 11 4C 69 6E 75 73 20 46 65 6C 64 74 20 2D 20 47 43 44 00 0E 43 3A 5C 53 65 6E
70 65 74 74 5C 64 69 72 00 00 00 00

1499931738682

Game 1 is consistent and always has a null byte after strings, with the length preceding it all.

Game 2 however, doesn't seem to have any logic behind it as far as I've gotten, sometimes it has a null byte, sometimes it doesn't, regardless of where it's used. Even/odd text lengths with padding doesn't match up either.

I'm still not very used to binary stuff, is this a common technique with a really simple function to it?

Unable to open up any dcr

Hey, it seems to only properly show where it go's wrong on chrome,
But on 709
throw PathTooNewError("Codec " + this.chunkArray["RIFX"][0].codec + " unsupported.");

It keeps throwing this as it says pathtoonew i tried different dcr files from 2001 august even..
And it still says its to old, perhaps state what director version is supported with this.
But yes i do know its no where close to finished but still i like that at least somebody is trying this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.