Road To El Dorado reversing video
Moderator: ScummVM Team
Road To El Dorado reversing video
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.
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.
Re: Road To El Dorado reversing video
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?
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?
Re: Road To El Dorado reversing video
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.
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.
Re: Road To El Dorado reversing video
Thanks for the video. It's always interesting to see how fellow reversers proceed. I'd be interested in seeing more.
Re: Road To El Dorado reversing video
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.
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.
Re: Road To El Dorado reversing video
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.
- JohnnyWalker2001
- Posts: 405
- Joined: Mon Oct 16, 2006 1:27 pm
- Location: London, UK
Re: Road To El Dorado reversing video
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!
Also, it'd be great if we got IN COLD BLOOD, too. That was an underrated game!
Re: Road To El Dorado reversing video
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.
* 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.
Re: Road To El Dorado reversing video
You could add the CLU extractor to your own fork of residualvm/residualvm-tools.
Keep up the good work!
Keep up the good work!
- JohnnyWalker2001
- Posts: 405
- Joined: Mon Oct 16, 2006 1:27 pm
- Location: London, UK
Re: Road To El Dorado reversing video
Great job!
Re: Road To El Dorado reversing video
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.
I am now focusing on the 3d formats and I'm hoping that soon we may have something to test in residualVM.
Re: Road To El Dorado reversing video
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.
- JohnnyWalker2001
- Posts: 405
- Joined: Mon Oct 16, 2006 1:27 pm
- Location: London, UK
Re: Road To El Dorado reversing video
Hardly spam. Keep them coming! (Where are the links?)
Re: Road To El Dorado reversing video
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.
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.
Re: Road To El Dorado reversing video
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.
Antia-aliasing on those models would be fantastic.