Author Topic: Decompilation Archive  (Read 1388 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Re: Decompilation Archive
« Reply #15 on: November 24, 2018, 09:31:01 PM »
So, an SCI01 template game?
Brass Lantern Prop Competition

Offline EricOakford

Re: Decompilation Archive
« Reply #16 on: December 10, 2018, 11:06:29 PM »
Here is my work on QFG1VGA.

With the exceptions of a few scripts, everything seems to compile okay. I even enabled the hidden "Where to, Hero?" dialog at startup, so you can test each individual room!

I was thinking of doing a patch that would fix various script bugs in the game, and restore some unused messages and interactivity. This source could work well as the basis.

This code is best compiled without any SCR and HEP patch files in the directory, so you can be sure that the game only uses the RESOURCE files. The scripts, of course, were decompiled from the patches to ensure that all official bug fixes are present.

Here is the compile log:
Code: [Select]
Error: (WizardGame.sc) Duplicate label 'code_0448'  Line: 145, col: 0
Error: (WizardGame.sc) Duplicate label 'code_0453'  Line: 152, col: 0
Error: (inputBox.sc) Undeclared identifier '--UNKNOWN-PROP-NAME--' .  Line: 1281, col: 32
Error: (egoFight.sc) Undeclared identifier '--UNKNOWN-PROP-NAME--' .  Line: 332, col: 32
252 scripts compiled.
--------------------------------
Time elapsed: 7.56 seconds.

Offline EricOakford

Re: Decompilation Archive
« Reply #17 on: December 14, 2018, 09:52:30 PM »
Here we go again, my new and improved decompile of QFG2! This time, I used 1.105 from the QFG Anthology, to be sure that I had the latest code. The only difference I could see is that the import patch was integrated into the resource files. The game seems to compile and run okay, but going into the actual game, it freezes when attempting to enter the maze of alleys! This might be a tough one for us to crack, but thankfully, "suck blue frog" and the EGA 1990 Christmas interpreter's internal debugger are there to help us.
Credit goes to Omer Mor for unearthing the original import and export scripts for the game. This helped me identify quite a bit of the original defines for the game, and the export script even has the original "saveHero" (which SCI Companion can't decompile).

Offline EricOakford

Re: Decompilation Archive
« Reply #18 on: January 14, 2019, 09:27:07 PM »
Here is a decompile of the Slater and Charlie demo. Surprisingly, it has nearly all of the system scripts! Which is odd, since it's a demo version of an interactive storybook, and would have no use for all of them. So I nabbed the original system scripts from the SCI16 archive, adapted them for Companion, and compiled them. Everything seems to work okay.

The only script I couldn't adapt for Companion was SMOOPER, since it frequently uses equational defines, which Companion doesn't support.

Offline Collector

Re: Decompilation Archive
« Reply #19 on: January 14, 2019, 10:18:48 PM »
The only script I couldn't adapt for Companion was SMOOPER, since it frequently uses equational defines, which Companion doesn't support.

Perhaps make a mention of this in the Companion thread for Phil?
KQII Remake Pic

Offline EricOakford

Re: Decompilation Archive
« Reply #20 on: January 27, 2019, 05:42:20 PM »
Here are decompiles of the demos for SQ1VGA, PQ3, Conquests of the Longbow, and Ms. Astro Chicken. They seem to be good stock for a possible SCI1.0 template. Ms. Astro Chicken's main script even seems to have been largely taken from the full floppy version of SQ4!

Offline MusicallyInspired

Re: Decompilation Archive
« Reply #21 on: January 27, 2019, 10:37:24 PM »
Somewhat off-topic possibly, but I decided to look for the text in SQ4EGA (the alternate floppy version) that gives different text dialogue for the Monochrome Bikers on your appearance whether you're playing with the EGA, CGA, or Hercules Monochrome drivers. Strangely, while the VGA floppy version lists the text in the Display kernel function as strings right in the script (620), in the EGA version the string doesn't appear at all and just shows up as "LOOKUP_ERROR". Now, I haven't searched through all the TEXT resources yes to find the actual line if it wasn't a string like in the VGA floppy version, and I couldn't find if LOOKUP_ERROR was a mislabeled variable for a TEXT resource (it didn't seem to be defined in the 620 script), or if it's some kind of error that Companion returns on trying to decompile. Now, the fact that in the VGA floppy version it's a fixed string (not included in any TEXT resources, from what I can tell) and that in the EGA version it's possibly some kind of variable makes sense because it's based on what driver you're running.

Any ideas on how to find these text strings?
Brass Lantern Prop Competition

Offline Kawa

Re: Decompilation Archive
« Reply #22 on: January 28, 2019, 03:47:27 AM »
Decompilation error. The text is in the scripts like in the VGA version but it messes up. It's there in the script's string pool. The logic goes like this:
Code: [Select]
register 1:
  global105 > 16: "Well, lookee here! If it ain't Mister Look-at-me-I'm-in-VGA."
  else: "Well, lookee here! If it ain't Mister Look-at-me-I'm-in-EGA."
register 2: "Whatsamatter, monochrome not good enough for you?"
register 3:
  global105 > 16: "What's dis? 256 colors all for one little bitmapped WIMP?! Whatta waste of VGA. Har, har!"
  else: "What's dis? 16 colors all for one little bitmapped WIMP?! Whatta waste of EGA. Har, har!"
Even though by all means the EGA version should never have global105 be higher than 16.

Offline EricOakford

Re: Decompilation Archive
« Reply #23 on: March 22, 2019, 08:45:32 PM »
And here we go again! A decompile of the Freddy Pharkas floppy demo! Everything compiles without error, and the game has been tested to completion  without any problems that I could see.


SMF 2.0.14 | SMF © 2017, Simple Machines
Simple Audio Video Embedder

Page created in 0.173 seconds with 24 queries.