Last Crusade (Amiga version): Corrupt IQ points counter!
Moderator: ScummVM Team
- JohnnyWalker2001
- Posts: 405
- Joined: Mon Oct 16, 2006 1:27 pm
- 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
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
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
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.
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.
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
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)
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)
Re: anyone feel up to make a patch
Why don't you just post your findings right here?icanntspell wrote: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)
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
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.
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.
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
Bug #1 : Escape through fireplace
I quote "adalsgaard" on this comment about this bug.
First the PC version :and this is the Amiga version :
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.
Once I managed to dump the scripts using the build-in dump-resource option in ScummVM it all became obvious.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...
First the PC version :
Code: Select all
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] (**) }
Code: Select all
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.
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
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 :Steam
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.
Amiga :
Code: Select all
[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] (**) }
Code: Select all
[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.
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.
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.
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
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
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
Bug reported
OK, posted a bug report for it.
https://sourceforge.net/tracker/?func=d ... tid=418820
Thanks for your time.
https://sourceforge.net/tracker/?func=d ... tid=418820
Thanks for your time.
- icanntspell
- Posts: 95
- Joined: Mon May 18, 2009 12:14 pm
- Location: The Netherlands
- Contact:
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.
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.