Author Topic: Recreating complete QFG1 EGA source code  (Read 4123 times)

0 Members and 1 Guest are viewing this topic.

Offline OmerMor

Re: Recreating complete QFG1 EGA source code
« Reply #45 on: July 06, 2018, 09:29:25 AM »
Very nice Charles!
I'll need to clear up some time and go over the code.

Have you considered putting it over github? That way you would be able to get comments and pull requests. I know you don't own the code, but I don't think anyone would bother - especially if you don't include any resource other than scripts (e.g. PICs and VIEWs).

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #46 on: September 03, 2018, 04:55:34 PM »
Has anyone started any kind of repository of working decompiled game scripts?
KQII Remake Pic

Offline Kawa

Re: Recreating complete QFG1 EGA source code
« Reply #47 on: September 03, 2018, 06:46:45 PM »
Do you mean "working" as in if you do a Recompile All the result is playable?

I'd love to set something like that up, but I can never seem to get Git to let me push stuff, and I think Bitbucket has a limit on the amount of repos I can have so... best I could do is a read-only thing on my own server.

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #48 on: September 03, 2018, 09:52:18 PM »
Yes, that is what I meant. Bitbucket is limited to five users for free, but allows unlimited private repos. Of course a repository could be public, even if it only had 5 contributors. GitHub is free for public and open source projects. I could do something with one of the Wikis, too, but it may not be as convenient for someone to update bug fixes or add comments.
KQII Remake Pic

Offline EricOakford

Re: Recreating complete QFG1 EGA source code
« Reply #49 on: October 06, 2018, 08:14:09 PM »
Great work on this decompilation effort! I've been working to adapt this code for the QFG1EGA release (version 1.200). After downloading the code, I used the SCO files to help me in decompiling the newer version. Between the first and last releases, a lot has changed, not just the title.

As noted here at TCRF, the High Speed Hero option was removed. The Kobold's cave scripts were also massively overhauled. The Tavern added an additional note for earlier in the game. Finally, a lot of the game's text was revised.

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #50 on: October 07, 2018, 12:26:35 AM »
OK, I have added a page on the Wiki for decompiled scripts. So far I only have one, King's Quest IV version 1.006.004, int. 0.000.502. This is just to start working on a repository page design. One advantage to the Wiki over a static page is that there can be multiple contributors. Users with Wiki accounts can upload updated/modified versions and add notes or more info to an entry. Any vandalism can be easily rolled back. There is also a discussion sub-page.

http://sciwiki.sierrahelp.com//index.php?title=Source_Repository

Not as ideal as a git, but it can be private or at least some what obscured. I can look into restricting access to only members. Not sure how important this would be to do these days.
« Last Edit: October 07, 2018, 12:29:00 AM by Collector »
KQII Remake Pic

Offline Kawa

Re: Recreating complete QFG1 EGA source code
« Reply #51 on: October 07, 2018, 09:38:51 AM »
It's a good source dump. I just felt it could use more gRoom where it has global2 now. Also went ahead and named almost everything in Class_255 but the script file itself. How do I get this to you?

Oh and there was something really weird about the copy protection script. I couldn't help myself, sorry. I think maybe it had a particularly messy skip patch? If you want to skip the CP, you really ought to just change KQ4::init to go to room 700 instead of 701 :D

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #52 on: October 07, 2018, 10:24:11 AM »
You can attach it here. Also, if you want to contribute to repository I can add a Wiki account for you.

As to the CP script I forgot to remove the patch from the game's folder when I decompiled, so the decompiler used it instead of the original. It is messy because it was created with a hex editor many years ago. I am a bit torn about it. Since the archivist in me wants preserve the original, but CP annoys the f**k out of me. I guess the way to handle it is to decompile the original and just change the KQ4::init. That way the CP could easily be switched on or off.
KQII Remake Pic

Offline Kawa

Re: Recreating complete QFG1 EGA source code
« Reply #53 on: October 07, 2018, 10:54:14 AM »
just change the KQ4::init. That way the CP could easily be switched on or off.
That's what I was thinking, yeah.

Edit: missed a bit in rewriting the print statement.
« Last Edit: October 07, 2018, 11:41:23 AM by Kawa »

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #54 on: October 07, 2018, 04:18:59 PM »
That is throwing a bunch errors. I had it down to no errors. And now there is a TheMenuBar and a MenuBar? Looks like you changed proc255_ to Print and Class_255_0 to MenuBar. Is there possibly some confusion between proc255 and Class_255?
KQII Remake Pic

Offline Kawa

Re: Recreating complete QFG1 EGA source code
« Reply #55 on: October 07, 2018, 04:46:27 PM »
Possibly, possibly. I did neglect to check if it compiled, doing this all from my favorite text editor instead of SCI Companion...


Okay, I fixed it!
« Last Edit: October 07, 2018, 05:04:58 PM by Kawa »

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #56 on: October 07, 2018, 06:01:01 PM »
Just typing "Hello" results in errors and then gives the expected result:

KQII Remake Pic

Offline Collector

Re: Recreating complete QFG1 EGA source code
« Reply #57 on: October 07, 2018, 06:15:36 PM »
Here is a decompile that does not include the CP skip patch. It is also using the name MenuBar instead of TheMenuBar. It does not include the changes you did, but there is no difference the print, so the problem must be elsewhere.
KQII Remake Pic

Offline lskovlun

Re: Recreating complete QFG1 EGA source code
« Reply #58 on: October 07, 2018, 07:36:10 PM »
Just typing "Hello" results in errors and then gives the expected result:
Well, the message pretty much says what is happening, doesn't it? There's a said spec somewhere that's been corrupted. What the cause is, I can't say just from looking at it, but since these are only individual Said calls failing, the rest will surely work.(Or fail, and eventually pass execution to the pragmaFail routine, I believe, where an error is printed "You've left me speechless" or whatever the game chooses)

EDIT: Aaaaand, the first error is this, in TheMenuBar.sc:

                (SetMenu 513 109 ',[/game]')

the number 500 (decimal; SCI Companion uses hex numbers, so it's 1f4 in the vocab view) resolves to 'game'.

The second error is this, in Main.sc (in one of the assembler parts):

                        lofsa    'chew/['

again, the number says so. Four things:

  • Why do these broken said specs occur in the first place?
  • Apparently, you can't sort by column in the vocab view (or maybe that's Wine's fault).
  • Is it better to have the vocab view use hex or decimal?
  • Both the corrupted words, save and bone, have a value of 240<=x<=255. Because of point 2, I can't tell if these are the only two problematic words.
« Last Edit: October 07, 2018, 09:09:02 PM by lskovlun »

Offline lskovlun

Re: Recreating complete QFG1 EGA source code
« Reply #59 on: October 07, 2018, 11:17:01 PM »
So the problem really is that Companion carries a said spec around as a vector of uint16. This fails if a group number happens to fall within the range 240..255. Otherwise it works well. It would have to be a vector of tuples <uint16, bool> with the bool set to true if this is actually a word, false if it is an operator.


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

Page created in 0.12 seconds with 23 queries.