Archive for May, 2008

First steps: French language and dead code

2008-05-29 (Thursday)

Got the disassembly of the French version of Operation Stealth (There was already some work done on it by another person so I’m not starting totally from scratch here) and also the disassembly of the French version of Future Wars (Les Voyageurs du Temps) so I’ve got another version of the Cinématique engine to compare functions with. Luckily enough I know at least a little bit of French (I studied French as a fourth language in elementary school and gymnasium) – although I’ve forgotten most of it ;-). Learned that échec in French means failure btw.

Found where in the Operation Stealth’s disassembly the opcode list was and named the functions according to the current namings in the ScummVM’s cinE-engine. Also commented a couple of small functions in the disassembly (readScriptU8 and readScriptU16) and found out that Turbo C wasn’t so hot on dead code elimination back in the day. Look at this code from readScriptU16:

seg002:0035 mov al, es:[bx]
seg002:0038 mov ah, 0
seg002:003A mov si, ax
seg002:003C mov ax, si
seg002:003E mov cl, 8
seg002:0040 shl ax, cl
seg002:0042 mov si, ax

Now isn’t that beautiful?-). I mean, bouncing stuff around without any meaning. They could’ve just done:

mov ah, es:[bx]
xor al, al
mov si, ax

7 instructions boiled down to 3. That’s quite a reduction I’d say. But well, don’t know what compiler optimization settings they used for compiling Operation Stealth and to be fair computer horsepower back when Turbo C was hot stuff was mildly different than today :-D.


And so it begins!

2008-05-26 (Monday)

Hi! It’s time for GSoC to start! Just installed my licensed copy of IDA Pro and getting ready for some reading up on the disassembly and on the cinE-engine characteristics. Let the games begin!