Week 6

This week I have fully implemented demo and started reversing dialogs.

Earlier the demo had problem with rendering 1-bit monochrome bitmaps because ScummVm doesn’t support them, I have made a little hack. All 1-bitmaps in those games are black, so instead of implemeting support for them the engine creates black surface.

The second problem was that some scripts hadn’t worked properly. This was due to handlers which had more than one PLAY opcode. When the PLAY opcode executes, the opcodes after it should wait. After animation ends END opcode is sended to object and it continues executing opcodes after PLAY.  The same algo is used when walk opcodes are used.

Also, this week I have added support for 5 new opcodes:

  3. SHOW
  4. HIDE

Now, the first game scene can execute startup scripts without dialogs.


Dialogs in game are the most complicated part. They are using bytecode.

I have fully reversed file format where dialogs text with sounds are stored.


The format is pretty simple and standard. The only trick is that strings are stored at the end of file rather than as pascal string. The same trick is used in the game archives.

carbon (2).png

This is structure of the file where the bytecode is stored. Each object in the game can have dialogues handlers which are selected by message opcode which was sended to them. These can be obj use, taking item, etc.

The bytecode part isn’t known to me. I only know that each code has 4 bytes and first byte seems to indicate kind of operation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s