Welcome Guest!

Did you know you that by registering, you can gain access to new special powers? You’ll be able to reply to Topics, create your own Topics, talk in our Chatbox, message members, manage your profile, access extra content and much more! Best of all, this message & ads will vanish!

Sign in to follow this  
Followers 0
bobsayshilol

Got bored, made a thing

10 posts in this topic

Hi! Newbie here, but I got bored and made a thing:

eWSCOmc.jpg

I used to love this game as a kid, and recently I found the disk buried under a pile of, well, other disks. (I used to love Please login or register to see this link.  before I'd started working on this, but ah well.

 

Almost all of this is from reverse-engineering/guesses (no copy-pasta of libLR1 or anything else, except possibly the BMP format) and I prefer to work out and implement stuff myself rather than rely on other peoples implementations, so everything you can see I've written in C or C++ (it originally started in C as a JAM dumper but then expanded into a full C++ project with a single C file that doesn't want to change into C++ (Logging.c)). It relies on LEGO.JAM being in the same folder (although it also searches the parent folder as it makes the build folder setup easier) and the .tun files being in the same folder if you want audio. If it finds the folders "MENUDATA" and "GAMEDATA" next to it then it'll read from them and ignore the JAM file since that's what posts on here seem to suggest happens (note that I haven't been running the actual Please login or register to see this attachment.

10 people like this

Share this post


Link to post
Share on other sites

Thought I'd update this since it's been a while since I posted. Been busy with work so not much progress has been made, however I can now view GDB models (with the occasional index going OOB for some reason, still need to work out why), SDB files look like skeletons, I've seen some basic ADB files in action/animated (test track's door :P), MDB's parse but I don't know how to translate their output into anything useful (although GARAGE.MDB definitely looks like screenshots of the build room), BVB is for bounding volumes and seems to have a BSP tree encoded in it, TMB parses but I can't remember what it does, and WDB files are strange but I've managed to get some info out of them. It's becoming harder to guess what these do only from inspection, so I might have to start reading through libLR1 and copying it or testing modified data on windows (2001 version ftw!).

Oh and I got it compiling and linking on my Pi (takes 3 and a half minutes to build natively), but because it's currently running headless I don't have a way to see if it draws :( I'll probably plug it into a screen when I go home for xmas and report back with screenshots.

3 people like this

Share this post


Link to post
Share on other sites

Please login or register to see this link.  (sorry for the crappy quality, and yes that's running without X started).

No video of the skeletons or maps since that used GL's immediate mode as a hack to show it on Linux, although thinking about it I think the rpi actually supports immediate mode... maybe another day since it's back to being a server for the moment.

Share this post


Link to post
Share on other sites

I remenber your popular roblox places, glad you are moving on to bigger and better things.

Share this post


Link to post
Share on other sites

I remenber your popular roblox places, glad you are moving on to bigger and better things.

I've never played roblox before so I think you might be confusing me with someone else :P

Share this post


Link to post
Share on other sites

I remenber your popular roblox places, glad you are moving on to bigger and better things.

I've never played roblox before so I think you might be confusing me with someone else :P

oh, ok.

Share this post


Link to post
Share on other sites

How did you run LL on Mac? Isn't LL for Windows only?!

Share this post


Link to post
Share on other sites
On 12/24/2015 at 5:13 AM, Firedude34 said:

How did you run LL on Mac? Isn't LL for Windows only?!

He is on Linux from the looks of it. Also it is possible to run LR on Mac. That's what I run it on. Put the disc into the computer. Download Crossover. Run disc with Crossover. Done.

Share this post


Link to post
Share on other sites
On 12/24/2015 at 10:13 AM, Firedude34 said:

How did you run LL on Mac? Isn't LL for Windows only?!

 

On 12/26/2015 at 7:12 PM, LegoRacersFanForever said:

He is on Linux from the looks of it. Also it is possible to run LR on Mac. That's what I run it on. Put the disc into the computer. Download Crossover. Run disc with Crossover. Done.

^ This. Until this holiday I'd only been working on this by reading through the data with xxd on Linux (can't use WINE for reasons). But over the holiday I made a simple script that rebundles the JAM file and I've been playing with the files. I even put up some christmas decorations:

6daU7Zj.png

 

I've also noticed that reading back through my posts makes me look like a bit of a <insert curse word here> since I'm not using any of the tools or info you lot have discovered and just heading off on my own, but that's only because I enjoy a challenge and not because I'm a <insert curse word here>.

 

I don't see any sort of wiki so I'll just dump some info I've found out that may or may not be new to anyone (note that all of these are for the 2001 re-release data since I don't own any other version, although I guess I could look at the demo's data at some point):

  • The executable opens the String Resource File (purely a guess at the acronym) "/MENUDATA/MENUNAME.SRF" and preloads the files inside. The first few are all Menu Interface Binary (MIB) files (which is what I was concerned with for the menu stuff). It then loads the *second* MIB in the list (splash) which then tells it to cd into the "LEGAL" directory and load up the Cutscene Data Binary file "SPLASH1.CDB". This then says to load the empty World Data Binary file "EMITTER.WDB" and the effects. I can't remember how but the CEB (Cutscene Effect Binary?) also gets loaded and that loads the Image Data Binary. The image that is going to be displayed must be 640x480 and RLE compressed, although I did find a way to turn it upside down which suggests that we can also change the compression it looks for (it's part of the bitmap header to have the upside-down flip thing, so I'd guess there are more too. To anyone that wants to try it out swap the 0x29 for a 0x28 inside the IDB file).
  • Then the main menu loads. It should be noted that swapping the "splash" and "mainmenu" strings in the list (or swapping their data) causes the game to hang. I expect it expects a "cutscene" MIB in the second string, and similarly an "interactable" MIB in the third. I don't know what the first index wants (says "testmenu", might be another file type, don't know). If a file wasn't able to be preloaded from the list in the SRF then it will carry on as if nothing happened, but it won't be there for MIB's that need it: ie if you remove "GARAGE.MIB" from the data folder it'll still show the main menu but the button will be missing to go to "BUILD".
  • The XXB files seem to be more stateful than I had previously assumed - I found a file ending in the byte sequence "0x14 0x04 0x00 0x06" to close 4 0x05's rather than the expected (or at least what I expected to see) "0x06 0x06 0x06 0x06". Obviously the first sequence expands to the second, but this implies a lot more state is kept than a simple pass through and interpreting bytes as they come along. It should be noted that swapping the first sequence for the second didn't break anything. The same is also true of any dynamic structs (0x16), ie rather than doing "0x16 0x17 0x03 0x03 0x03 0x03" then later using "0x17 <float> <float> <float>" you can instead skip the 0x17 registration and do "0x03 <float> 0x03 <float> 0x03 <float>". This also explains the huge mess at the top of the Animation Data Binary's (ADB's). For now I just have a ton of hacks lying around, but I'll probably need to fix that.

I can't think of any other points I've found, but if I do I'll update this post.

1 person likes this

Share this post


Link to post
Share on other sites

Huge, big thumbs up! :) Its fun to see how many ppl are working on something based off LR. Seriously if we throw together all I found here we almost have a complete remake :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0