ResidualVM logo Forum Index - ResidualVM website - Contact us - Rules Login    Register     Search curved edge
It is currently Sat Apr 04, 2020 9:50 pm

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Fri Jan 09, 2015 2:03 am 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Hi guys,
I've had an idea of making a video tutorials on reverse engineering a game and adding it as a new engine for ResidualVM. So I've started a video series on youtube about reversing The Road To El Dorado game by Revolution Software, I'll be happy to hear you comments and suggestions about this.

Thanks.


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 11:53 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
Thanks for the video.
I only had the time to watch the first twenty minutes so far, but could you add a rough table of contents (ideally with time stamps) to the description?


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 6:26 pm 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Botje, thanks for the comment. I'll try to add some links in the description. I'm sorry if the videos are too long, but I'm trying to keep about 1 hour, because I've noticed that this is about the right amount of time to cover a single step of the process and there is a lot of work to cover.

By the way a little bit off topic. I have a game called "In Cold Blood" also by Revolution software, which was released about the same year that "Road To El Dorado" was and I've noticed, that the engine there is the same, so as a bonus in reversing the Road To El Dorado we might be getting "In Cold Blood" running in Residual also.


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 7:22 pm 
Offline

Joined: Tue Feb 12, 2013 6:10 pm
Posts: 58
Thanks for the video. It's always interesting to see how fellow reversers proceed. I'd be interested in seeing more.


Top
 Profile  
 
PostPosted: Fri Jan 09, 2015 7:58 pm 
Offline
ResidualVM Developer
User avatar

Joined: Wed Nov 24, 2010 2:44 am
Posts: 323
I just sat through the entire thing, and I found it a good and steady introduction. You were mostly carefull to mention the hotkeys you used (which of course is important as the viewers can't see your keyboard), and corrected yourself when you forgot to mention them.

The first part, where you looked through the files to get an overview, was a bit interesting, and had a very nice flow in it, which became a bit less easy to follow when you jumped into IDA, I think that was a bit because you weren't completely sure how much you wanted to cover various things. Covering the few functions you did there was a good start though, demonstrating how far you can get with renaming and function prototype modification in IDA/Hex Rays, and how much help that information is when it "trickles back up" to the calling functions.

Two small things I noticed:
The while-loop you were looking at in Set_string seems to be a search for the '\0'-character, I was tripped up a bit by the decompiled code when I saw it, so I stared at it a bit while you talked (specifically the -1), it is counting down from -1, and counting the pointer up, comparing the dereferenced pointer to 0. Anyhow, the result is visibly used in the last few lines. I do wonder why the strlen-result wasn't used for this purpose though.

Also, I noticed that those memory-allocated variables you named, shouldn't really have kB behind them, they are shifted in the argument to the function, so the actual content in the variables would be in bytes, but the value passed to debugPrint would be kiloBytes.

I really appreciate your effort in creating such videos, thanks a lot.


Top
 Profile  
 
PostPosted: Sun Jan 11, 2015 12:59 am 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Thank you for your comments, I really appreciate them. I've tried to follow your advices and I think my second video is better structured. It got longer than the first one, but I think I've managed to cover a lot of stuff there, so I've just uploaded it as it is. I've fixed the issues somaen mentioned, and I've tried to follow Botje advice to have a table of contents overview of the video.


Top
 Profile  
 
PostPosted: Sun Jan 11, 2015 5:11 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 327
Location: aka ThunderPeel2001
I also watched the first 20 mins. Very interesting stuff. I really like that you took the time to mention the keyboard commands you used, as it helps people like me who are new to IDA.

Also, it'd be great if we got IN COLD BLOOD, too. That was an underrated game!


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 10:32 am 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Hey guys. I just want to share that In my 4th video I've managed to reverse the CLU files format, so I now have some tools for extracting the data files from the game. So if anyone is interested here's a command line tool for extracting the game data files: https://gist.github.com/idimiter/8e9c6c987b3862c920eb/

* First argument is CLU archive and the second is the index of the file you need extracted.
* Also in there I've included make_hash.c which is a tool implementing the strings hashing algorithm used for the engine. Its based on the make_hash subroutine in the reversed code

This is for the CLU file format used in both Road To El Dorado and In Cold Blood games.

Next time maybe I want to focus are the image formats used there. From first glance I can see that most of the 2dart files have .bitmap_pc file extension, and they start with the magic sequence "PCB" (Which I'm guessing stands for PCBitmap or something like that). If someone knows something about those please let me know. For now I see they contain a colour palette in the header.


Top
 Profile  
 
PostPosted: Fri Jan 16, 2015 11:27 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
You could add the CLU extractor to your own fork of residualvm/residualvm-tools.
Keep up the good work!


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 12:56 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 327
Location: aka ThunderPeel2001
Great job!


Top
 Profile  
 
PostPosted: Mon Jan 19, 2015 10:11 pm 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Hey guys, sorry if this looks like a spam, but I go too excited, and I want to share it with you that I now have the bitmap_pc format fully reversed and the scripting system almost reversed. I've updated the gist repository with an pcb2ppm.c converter (In my 5th video you can see the steps I took to reverse the PCB format) . And of course once I'm done with those I'll send a PR for the ResidualVM tools. I want to tank all of you for your support here and in the irc chat.

I am now focusing on the 3d formats and I'm hoping that soon we may have something to test in residualVM.


Top
 Profile  
 
PostPosted: Wed Jan 21, 2015 8:17 am 
Offline

Joined: Tue Apr 26, 2011 7:21 pm
Posts: 27
Thanks for posting this. I always enjoy reading about people reverse engineering games, and I really enjoy how you've taken it a step further by detailing the process in video. Congratulations on how far you've come so far, and do keep us updated. It's been a fascinating glimpse into your process.


Top
 Profile  
 
PostPosted: Wed Jan 21, 2015 4:48 pm 
Offline
User avatar

Joined: Tue Jul 19, 2011 2:51 am
Posts: 327
Location: aka ThunderPeel2001
Hardly spam. Keep them coming! (Where are the links?)


Top
 Profile  
 
PostPosted: Thu Jan 22, 2015 6:48 pm 
Offline

Joined: Mon Aug 18, 2014 5:34 am
Posts: 8
Hey guys. Thanks for the nice comments, I really appreciate them. I think I've managed to reverse most of the graphic formats now.The nice thing is that the fonts are also in PCB format, so with the pcb2ppm.c we can extract those too.

I've updated my gist files file with the rtx2ppm.c and pcb2ppm.c files used to convert them to a known format (PPM).

I'm working on the 3d formats now, before returning to the script logic and the code reversing.


Top
 Profile  
 
PostPosted: Thu Jan 29, 2015 8:49 am 
Offline

Joined: Mon May 04, 2009 8:06 am
Posts: 66
Thank's for working on this, I love Gold and Glory and never in my wildest dreams imagined it might be included in ResidualVM!

Antia-aliasing on those models would be fantastic.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Forum design by ScummVM team, icons by raina, adopted for ResidualVM
curved edge   curved edge