Interested to learn reverse-engineering

Talk about games or general tech issues that are not Sierra related.
Post Reply
Rakeesh
Sierra Obsessed
Posts: 176
Joined: Sun Jul 04, 2010 7:34 am

Interested to learn reverse-engineering

Post by Rakeesh » Wed Mar 07, 2012 5:48 am

I am still beginner/novice in programming. I know a few things about assembly programmng and hex editors.

I wonder how simple it can be to delve into an .exe file of a Sierra game, open it into a human readable form and understand the inner mechanics of the game files. Which files contain graphics, which contain sounds, and how are those data 'isolated' by programs such as rippers and SCI editors?

Can someone who knows educate me (and perhaps others who are interested) about the philosophy of reverse engineering? are there some relevant blogs or tutorials online? can I learn the process from step 0?

I don't wish to re-invent the wheel; I don't have the ambition to re-write a SCI editor/ripper. My interest is pure curiosity and of course education :)

User avatar
Collector
Grand Poobah
Posts: 11542
Joined: Wed Oct 08, 2008 12:57 am
Location: Sierraland
Contact:

Re: Interested to learn reverse-engineering

Post by Collector » Wed Mar 07, 2012 6:34 am

You won't find any resources in the executable. That is just the interpreter. What you are after are in the RESOURCE.00* files. Additional resources may be found in the game's base folder or "PATCHES" folder. These are the raw resource files, scripts, backgrounds, sprites, sound files, messages, etc. The EXE will check the RESOURCE.MAP for the offset where the resource is packed in side the main resource file. If it finds a resource with the same name in the patches path, it will use that over what is packed. This is by design to make patching as easy as dropping the updated resource in the game's folder.

If you want to explore the resources more, you can check the Free SCI documentation on the Wiki

http://sciwiki.sierrahelp.com/index.php ... ifications

The Sierra Resource Viewer is a great way to find, view and extract any of the resources. SCI Companion and SCI Studio are good tools for editing some of the resources, at least for SCI0 games. Keep in mind that the scripts will not be that useable, but you can extract them as is and play with them in a hex editor.
01000010 01111001 01110100 01100101 00100000 01101101 01100101 00100001

Image

User avatar
gumby
Oldbie
Posts: 937
Joined: Sun Sep 26, 2010 9:55 pm
Gender: M
Location: The Great Underground Empire

Re: Interested to learn reverse-engineering

Post by gumby » Wed Mar 07, 2012 9:16 am

It may also be helpful from a reverse engineering standpoint to create your own game using SCI Studio or Companion and then delve into the resource files. It wouldn't have to be a complex game, just use the included 'template' game. Then you could make very minor changes, recompile, and examine the resulting differences in the resouce files.

User avatar
Collector
Grand Poobah
Posts: 11542
Joined: Wed Oct 08, 2008 12:57 am
Location: Sierraland
Contact:

Re: Interested to learn reverse-engineering

Post by Collector » Wed Mar 07, 2012 5:33 pm

Or at least download one of the fan games that includes the source.
01000010 01111001 01110100 01100101 00100000 01101101 01100101 00100001

Image

User avatar
gumby
Oldbie
Posts: 937
Joined: Sun Sep 26, 2010 9:55 pm
Gender: M
Location: The Great Underground Empire

Re: Interested to learn reverse-engineering

Post by gumby » Wed Mar 07, 2012 10:02 pm

Yes - that would work too. I re-read my post & I think I made it sound like some effort is needed to be put into creating a game before 're-engineering'. Not at all. I would just use the template game and compile it. Then make minor changes from there.

User avatar
Collector
Grand Poobah
Posts: 11542
Joined: Wed Oct 08, 2008 12:57 am
Location: Sierraland
Contact:

Re: Interested to learn reverse-engineering

Post by Collector » Wed Mar 07, 2012 10:36 pm

Although, creating a short game may give Rakeesh a better understanding of what the various resources are doing. But just working with the template game would be a good starting point. Lots of information to be found on the Wiki and SCI Studio or SCI Companion and SCI syntax questions can be asked on the SCI Programming Community.
01000010 01111001 01110100 01100101 00100000 01101101 01100101 00100001

Image

Post Reply