ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Last Crusade (Amiga version): Corrupt IQ points counter! Goto page Previous  1, 2, 3
Last Crusade (Amiga version): Corrupt IQ points counter!
  Author    Thread Reply to topic
fingolfin
Retired


Joined: 21 Sep 2005
Posts: 1466
 

If you provide details about the precise script bugs, we might be able to modify ScummVM to workaround those script bugs, without requiring any patching of game data files. We did that for various other script bugs in the past.

 Reply with quote  
Post Wed Oct 28, 2009 12:32 pm 
 View user's profile Send private message
JohnnyWalker2001



Joined: 16 Oct 2006
Posts: 76
Location: London, UK
 

Wow, great job guys!

Let me know the bugs you've found and I might actually add them to my guide... one day. (I'm not great at updating it, but it is pretty comprehensive.

http://indyguide.mixnmojo.com

 Reply with quote  
Post Wed Oct 28, 2009 9:16 pm 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
 

I used your guide to map the puzzles, it's the best walkthrough available. It would be great if you find the time to update it. You already seem to have had a few suggestions for improvements.

In fact, bluntly using your guide, updating it and putting it somewhere is one of the thoughts that crosses my mind. However if you update it, that's even better. Let me know if I can help.

 Reply with quote  
Post Thu Oct 29, 2009 7:00 am 
 View user's profile Send private message Visit poster's website
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
anyone feel up to make a patch 

Sorry for raking up this old thread, but I found the discussion again when cleaning up my mail. I remember I had the intention to make a nice patch for the bugs but (insert favorite excuse here)...

I still have all the details about this so an average programmer should be able to create a patch for it. I gladly forward the details to anyone interested in making scummvm handle the scriptbugs. (Assuming this isn't fixed yet)

 Reply with quote  
Post Wed Apr 27, 2011 5:23 pm 
 View user's profile Send private message Visit poster's website
ssdsa



Joined: 01 Nov 2005
Posts: 42
Location: Cologne, Germany
Re: anyone feel up to make a patch 

quote:
Originally posted by icanntspell
I still have all the details about this so an average programmer should be able to create a patch for it. I gladly forward the details to anyone interested in making scummvm handle the scriptbugs. (Assuming this isn't fixed yet)

Why don't you just post your findings right here?
 Reply with quote  
Post Wed Apr 27, 2011 6:18 pm 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
Re: anyone feel up to make a patch 

Ok, here come my findings. I compared the amiga version to the PC/Steam version. The thing to look out for is

startScript(125,[30,15]);

This script 125 is the one responsible for giving the IQ points. First parameter is the puzzle number (here 30), 2nd one is the amount if IQ points you get.


Last edited by icanntspell on Tue May 17, 2011 6:08 pm; edited 1 time in total

 Reply with quote  
Post Thu Apr 28, 2011 4:20 pm 
 View user's profile Send private message Visit poster's website
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
Bug #1 : Escape through fireplace 

I quote "adalsgaard" on this comment about this bug.


quote:
About the points error leaving Castle Brunwald: It seems to "reversed"! When you get caught, free yourself and escape, you get 25 IQ points even though you're not supposed to. However if you escape WITHOUT getting caught, you get 0 IQ points (supposed to get 25 IQ points). Weird stuff...

Once I managed to dump the scripts using the build-in dump-resource option in ScummVM it all became obvious.

First the PC version :
code:
root@gateway:/home/ftp/incoming/dumps# ../scummvm/tools/trunk/descumm -u -3 Steam/roomobj-25-363.dmp
Events:
  43 - 0A17
  21 - 0000
  66 - 7269
  65 - 6C70
  61 - 6563
[0000] (C9) faceActor(VAR_RESULT,??Local??[3840]);
[0005] (43) Var[363] = getActorX(15616);
[000A] (06) VAR_NUM_ACTOR = getActorElevation(38);
[000E] (02) startMusic(93);
[0010] (00) stopObjectCode();
[0011] (43) ??Var??[2583] = getActorX(33);
[0016] (00) stopObjectCode();
[0017] (66) ??Local??[617 + ??Local??[101]] = getClosestObjActor(24940);
[001E] (63) Var[101] = getActorFacing(15);
[0022] (6C) Var[257] = getActorWidth(161);
[0026] (00) stopObjectCode();
[0027] (A8) if (Var[92 Bit 15]) {
[002C] (40)   cutscene([]);
[002E] (0F)   if (getState(367) == 0) {
[0034] (0A)     startScript(125,[36,25]);
[003D] (**)   }


and this is the Amiga version :
code:
root@gateway:/home/ftp/incoming/dumps# ../scummvm/tools/trunk/descumm -u -3 Amiga/roomobj-25-363.dmp
Events:
   A - 001F
[001F] (0F) if (getState(364) == 1) {
[0025] (A8)   if (Var[92 Bit 15]) {
[002A] (40)     cutscene([]);
[002C] (0F)     if (getState(367) == 1) {
[0032] (0A)       startScript(125,[36,25]);
[003B] (**)     }




Apart from the leading rubbish in the PC version (haven't fot a clue on why this happens) there is a tiny difference

PC : [002E] (0F) if (getState(367) == 0) {
Amiga : [002C] (0F) if (getState(367) == 1) {

The Amiga version tests for the wrong value which explains the "reversed" behaviour. To fix this bug I edited 25.LFL and changed the "1" into a "0". Loaded my savegame, went through the fireplace and got the expected 25 points.
 Reply with quote  
Post Tue May 17, 2011 5:59 pm 
 View user's profile Send private message Visit poster's website
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
Bug #2: No points for defeating the security officer 

For the 2nd bug (not getting the points for KO of the security officer a.k.a. puzzle 29) :

Amiga :

code:
[0038] (48) if (Var[115] == 2) {
[003F] (40)   cutscene([]);
[0041] (0A)   startScript(125,[30,15]);
[004A] (1A)   VAR_EGO = 8;
[004F] (36)   walkActorToObject(8,465);
[0053] (3B)   ??Var??[3848] = getActorScale(209);
[0057] (01)   putActor(0,9,281);
[005D] (D1)   animateCostume(VAR_EGO,??Local??[3072]);
[0062] (80)   breakHere();
[0063] (80)   breakHere();
[0064] (5D)   setClass(8,[150]);
[006B] (1E)   walkActorTo(8,78,80);
[0071] (3B)   ??Var??[3336 + 8] = getActorScale(26);
[0077] (BC)   stopSound(Var[512]);
[007A] (00)   stopObjectCode();
[007B] (1A)   VAR_EGO = 1;
[0080] (C0)   endCutscene();
[0081] (18) } else {
[0084] (13)   ActorOps(8,[Costume(33),Palette(6,14)]);
[008C] (48)   if (Var[180] == 403) {
[0093] (13)     ActorOps(1,[Costume(30)]);
[0098] (48)   } else if (Var[180] == 406) {
[00A2] (13)     ActorOps(1,[Costume(35)]);
[00A7] (48)   } else if (Var[180] == 405) {
[00B1] (13)     ActorOps(1,[Costume(36),Palette(6,0)]);
[00B9] (18)     /* goto 00BC; */
[00BC] (**)   }
[00BC] (0A)   startScript(62,[4]);
[00C2] (1A)   Var[222] = 70;
[00C7] (1A)   Var[223] = 258;
[00CC] (0A)   startScript(35,[8,0,1,1]);
[00DB] (80)   breakHere();
[00DC] (68)   VAR_RESULT = isScriptRunning(35);
[00E0] (28)   unless (!VAR_RESULT) goto 00DB;
[00E5] (0A)   startScript(52,[]);
[00E8] (0A)   startScript(120,[8,11]);
[00F1] (1A)   Var[188] = 1;
[00F6] (0A)   startScript(125,[30,15]);
[00FF] (**) }


Steam
code:
[0038] (48) if (Var[115] == 2) {
[003F] (40)   cutscene([]);
[0041] (0A)   startScript(125,[30,15]);
[004A] (1A)   VAR_EGO = 8;
[004F] (36)   walkActorToObject(8,465);
[0053] (3B)   ??Var??[3848] = getActorScale(209);
[0057] (01)   putActor(0,9,281);
[005D] (D1)   animateCostume(VAR_EGO,??Local??[3072]);
[0062] (80)   breakHere();
[0063] (80)   breakHere();
[0064] (5D)   setClass(8,[150]);
[006B] (1E)   walkActorTo(8,78,80);
[0071] (3B)   ??Var??[3336 + 8] = getActorScale(26);
[0077] (BC)   stopSound(Var[512]);
[007A] (00)   stopObjectCode();
[007B] (1A)   VAR_EGO = 1;
[0080] (C0)   endCutscene();
[0081] (18) } else {
[0084] (13)   ActorOps(8,[Costume(33),Palette(6,14)]);
[008C] (48)   if (Var[180] == 403) {
[0093] (13)     ActorOps(1,[Costume(30)]);
[0098] (48)   } else if (Var[180] == 406) {
[00A2] (13)     ActorOps(1,[Costume(35)]);
[00A7] (48)   } else if (Var[180] == 405) {
[00B1] (13)     ActorOps(1,[Costume(36),Palette(6,0)]);
[00B9] (18)     /* goto 00BC; */
[00BC] (**)   }
[00BC] (0A)   startScript(62,[4]);
[00C2] (1A)   Var[222] = 70;
[00C7] (1A)   Var[223] = 258;
[00CC] (0A)   startScript(35,[8,0,1,1]);
[00DB] (80)   breakHere();
[00DC] (68)   VAR_RESULT = isScriptRunning(35);
[00E0] (28)   unless (!VAR_RESULT) goto 00DB;
[00E5] (0A)   startScript(52,[]);
[00E8] (0A)   startScript(120,[8,11]);
[00F1] (1A)   Var[188] = 1;
[00F6] (0A)   startScript(125,[29,10]);
[00FF] (**) }




In plain english ; in the Amiga version you get the 15 points for puzzle 30 if you give the book or KO the guy. The PC version correctly gives 10 points for puzzle 29 for KO and 15 for puzzle 30 when giving the book. I changed the file 31.LFL to give the 10 points for puzzle 29 in case of a KO as the PC version does and tested it.
 Reply with quote  
Post Tue May 17, 2011 6:06 pm 
 View user's profile Send private message Visit poster's website
fingolfin
Retired


Joined: 21 Sep 2005
Posts: 1466
 

For the newer 256 color (VGA) PC versions, they changed the disk format and some opcodes, so instead of -u you have to pass -n in order to get sensible output out of descumm for indy3.

All in all, the descumm options are a bit messy, and they don't cover all possibilities, so for some scripts in certain games, the current descumm is not able to 100% correctly decompile them.

 Reply with quote  
Post Tue May 17, 2011 9:07 pm 
 View user's profile Send private message
fingolfin
Retired


Joined: 21 Sep 2005
Posts: 1466
 

Oh, and in all versions of indy3 I have, for the first bug you report, the script has
getState(364) == 1

This includes my Indy3 FM-towns, and both an english and a german VGA version of the game, as well as an english EGA version. So I guess the PC version you got from steam received fixes from LucasArts ?

It shouldn't be too hard to override both script bugs from within ScummVM, too. Very nice catches, both!

EDIT: Oops, my mistake. Of course the relevant line is the one with
if (getState(367) == 1)
resp.
if (getState(367) == 0)

I get "1" in the EGA version, and 0 in the VGA + TOWNS versions. So, it is exactly as you described, and there is no weird steam-only fix Smile

 Reply with quote  
Post Tue May 17, 2011 9:12 pm 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
 

Thanks. It would be great if it would make it into ScummVM at some time. If it ever does, please drop me message. I don't have the time to track all patches that make it into ScummVM anymore Wink

 Reply with quote  
Post Wed May 18, 2011 6:12 pm 
 View user's profile Send private message Visit poster's website
fingolfin
Retired


Joined: 21 Sep 2005
Posts: 1466
 

If you (or somebody else) wants to ensure these are not forgotten, then please file a bug report on our website, with the information you included here.

 Reply with quote  
Post Thu May 19, 2011 5:57 am 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
Bug reported 

OK, posted a bug report for it.

https://sourceforge.net/tracker/?func=detail&aid=3306145&group_id=37116&atid=418820

Thanks for your time.

 Reply with quote  
Post Mon May 23, 2011 6:51 am 
 View user's profile Send private message Visit poster's website
fingolfin
Retired


Joined: 21 Sep 2005
Posts: 1466
 

I posted a patch on your bug tracker item which should cure the bugs. But I currently don't have the time to properly test it, so it's not (yet?) in our code repository.

 Reply with quote  
Post Tue May 24, 2011 11:36 am 
 View user's profile Send private message
icanntspell



Joined: 18 May 2009
Posts: 88
Location: The Netherlands
 

I updated and tested your patch and it is working as expected. It would be nice if it was merged at some point.

In case somebody is interested, I uploaded my other ScummVm patches at my website. I didn't enter them in the patchtracker since they are not really into the spirit of ScummVM.

 Reply with quote  
Post Mon Jul 11, 2011 12:27 pm 
 View user's profile Send private message Visit poster's website
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2, 3


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge