I made some progress on writing the new interpreter for Lectures Enjeu games today!
Got a simple (and ugly) GUI up, implemented rendering of hyperlinks and the global OK button. Implemented a few opcodes in the interpreter so I can move around between different screens and rooms.
I'll continue this over the weekend!
Conversation
Notices
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:49 JST PulkoMandy - cool_boy_mew likes this.
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:51 JST PulkoMandy There are still some parts of the file I don't understand: the 80 first bytes, the first two bytes at the start of the object chunk (they encode a decimal 1000 in both games), 3 words in each global button (always with the values 0, 1, 7) and 4 words in each object (the first one always 1, the others vary in one of the games)
The second game also has several more bytecode opcodes that I'll have to guess. Maybe I should start writing an interpreter/debugger to experiment with the bytecode
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:52 JST PulkoMandy Let's continue the reverse engineering of the Lectures Enjeu #InteractiveFiction engine today!
Looked at the INIT file for another game today. Now that I have a rehex script that easily separates each chunk in the file, it is a lot easier. Found that chunk 6 defines which "compass" buttons (N,S,E,W, up, down and exit) are available in each room, and can also hide the compass entirely.
Objects have up to 3 actions when they are carried by the player, and 3 others when they are found in a room -
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:54 JST PulkoMandy I had a train trip today so I started writing a parser in C++. It can show the text and the scripts side by side, which helped a lot in analyzing how things work. It allowed me to identify several more opcodes! So things are starting to make sense.
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:55 JST PulkoMandy I made some progress on reverse engineering the game. I now have a good understanding of most of the datafiles, and start to see some patterns in the COND files which seem to contain several small chunks of some kind of bytecode?
Also, I made a wiki about it:
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:56 JST PulkoMandy However, I have no idea yet how this is all wired together. How to change variable values? Howare objects associated with their descriptions and possible actions? What to do when a button is clicked? How to hide and show buttons? (for example the objects button is visible only in rooms where there is something to pick up)
-
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:57 JST PulkoMandy I spent the evening looking at the adventure files in rehex.
The text displayed can include buttons, hyperlinks, and also print variables. It uses an escape sequences system. For example %p is the player name, \o puts an Ok button centered on thelast line, %c1 shows some counter (health points in that case), and {%c1|%m1|%m2~%m3} isa switch-case, with values in ordersand the ~ being for the default case.
Games can also define custom buttons with X/Y hosition and color (from the EGA palette) -
PulkoMandy (pulkomandy@mastodon.tetaneutral.net)'s status on Saturday, 19-Aug-2023 06:19:58 JST PulkoMandy Some of the games are apparently adaptations of choose your adventure books written by schoolchildren. We acutally wrote one when I was in school but I think it never was turned into a computer game. Might not be too late, I still have a printed copy!