Igor engine

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

User avatar
NoiZje
Posts: 24
Joined: Wed May 25, 2011 6:17 pm
Location: Antwerpen

Post by NoiZje »

Cyx recently added the source code to github https://github.com/cyxx/igor
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

That's cool! Is it possible to play the spanish voiced version with english subtitles?
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

Do note that the engine in its current state is treating the exe as a game script, and it's basically a (very) lightweight binary executable parser.

cyx says so himself:
"This program is mostly a proof of concept. Since the original game executable contains both hardcoded logic and assets, the idea was to extract the datafiles and write a x86 decoder and interpreter. Only higher level functions (palette, display, inputs) have been rewritten (these are referred as 'traps' in the source code)."

IMHO, this approach is totally different to what ScummVM is trying to achieve, so with the approach taken, this engine isn't a viable candidate to be added in ScummVM, as we aim to rewrite the original executable of each game, not implement an x86 interpreter - there's DOSBox for such an approach.
zorbid
Posts: 66
Joined: Sun Nov 27, 2005 6:41 pm

Post by zorbid »

I find it strange to discriminate between bytecode and machine x86 language.

Cyx's implementation is much closer to ScummVM than DOSBox in that the VM is extremely primitive, and all IO is performed by higher level functions.

The igor "script logic" only uses 37 opcodes. The VM totals 1400 LOCs including memory management.

There are more complex VMs in the tree at the moment. Saga is ~3 times as big, for example.
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

zorbid wrote:I find it strange to discriminate between bytecode and machine x86 language.

Cyx's implementation is much closer to ScummVM than DOSBox in that the VM is extremely primitive, and all IO is performed by higher level functions.

The igor "script logic" only uses 37 opcodes. The VM totals 1400 LOCs including memory management.

There are more complex VMs in the tree at the moment. Saga is ~3 times as big, for example.
Read what I wrote once more. The logic in Igor has not been reimplemented, the code parses the x86 bytecode like a script. Of course, the engine is simple enough, the hardcoded logic is all read from the executable. But this isn't a reimplementation, per se. It's a bytecode parser. There are other engines like ringworld and lastexpress where all of the logic is hardcoded as well, and they have been reversed and rewritten into C++.
User avatar
john_doe
ScummVM Developer
Posts: 117
Joined: Fri Nov 04, 2005 8:25 pm
Location: Stuttgart, Germany

Post by john_doe »

Without having extensively studied the Igor code, maybe it's possible to convert the bytecode to C++ code as a starting point for a "real" reimplementation, similar to what was done with Dreamweb.
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

john_doe wrote:Without having extensively studied the Igor code, maybe it's possible to convert the bytecode to C++ code as a starting point for a "real" reimplementation, similar to what was done with Dreamweb.
Nice idea :) That might be doable, hopefully
Post Reply