Jump to content


Photo

Qwinn is retire?


  • Please log in to reply
99 replies to this topic

#21 Gumby

Gumby
  • Member
  • 18 posts

Posted 02 February 2011 - 05:10 AM

Last July. Somebody published a punctual bug fix for an issue in Zevran's dialogue, and she got very angry about the fact that Qwinnn's DA Fixpack independently corrected the same bug, thus obsoleting her mod without giving credit in the readme.


Thanks for the link. I was aware of DA fixpack but didn't yet have the opportunity to try it out.


@paulo: I don't understand- is the problem you describe a consequence of the modified torment.exe?

#22 ThunderPeel2001

ThunderPeel2001
  • Member
  • 74 posts

Posted 02 February 2011 - 05:21 AM

Last July. Somebody published a punctual bug fix for an issue in Zevran's dialogue, and she got very angry about the fact that Qwinnn's DA Fixpack independently corrected the same bug, thus obsoleting her mod without giving credit in the readme.


If you read the whole thread, that issue got sorted out ages ago to everyone's satisfaction.

#23 -paulo-

-paulo-
  • Guest

Posted 02 February 2011 - 09:41 PM

@paulo: I don't understand- is the problem you describe a consequence of the modified torment.exe?

It's a consequence either of a gcc optimization bug, or a fixpack ASM assembly bug that doesn't get expressed on normal windows (which ofcourse, can be considered a bug in gcc or wine too, depends on your perspective - i just want to narrow it down so it works).

Regardless, it doesn't happen on the "pure" game.

But, for the game even to work here (on this computer), for it not to lock up right at the beginning movie, it should have the sound set to "emulation" and "emulate a virtual desktop" on winecfg. Only after those two parameters are enabled will you be able to see the difference. On regular wine from the repositories (i imagine compiled with O3 or O2), and without the fix pack it works fine. With it, it crashes on the sleep movie.
On the other hand, if you compile wine yourself, without gcc optimizations ( O0 ), it wont crash.

I'm trying to narrow down what optimization crashes this.

#24 -paulo-

-paulo-
  • Guest

Posted 02 February 2011 - 10:56 PM

Is scient still around? I'm pretty sure that i will find the optimization that goes wrong soon (only 4 to be tested so two more compiles). The next step would be to list the parts of the patch that alter the executable and deselect them one by one. When i find the hack that goes wrong, if he can reproduce it on a smaller testcase, we can report it to gcc. If we can't reproduce it on a small testcase, then at least he will know what part of the patch goes wrong and be able to better debug it.

The fixpack seems to install all it can and has no atomic install :\

#25 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3327 posts

Posted 03 February 2011 - 04:20 AM

It's more likely than not that the EXE patches use non-standard ASM tricks to save space, so that's the likely cause of the Wine crashes (it finds non-standard code and doesn't know what to do with it). If you know ASM, you can disassemble a fixpacked and a non-fixpacked torment.ini and diff the result.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#26 -paulo-

-paulo-
  • Guest

Posted 03 February 2011 - 09:50 PM

I've been unable to reduce it to a single optimization pass yet.
I only found that it's one (or combination) of the O2 opt that does it.
I was thinking i was closer based on this pic:
http://www.linuxjour...7269/7269t1.jpg
That supposedly lists all. I compiled with O2 (crashes) and with Os (doesn't crash) and was hoping it was one of the 4 differences in that pic.

Compiling a O0 with those optimizations enabled still worked, so i don't know anymore.

I don't know ASM. I only knew enough ever to do some homebrew no-cds for some simple old games that had none. But that is easy, just find the getDriveTypeA calls and monkey around with NOP's.

Diff-ing is a possibility though.

#27 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3327 posts

Posted 04 February 2011 - 01:24 AM

Even if you don't know ASM, you're bound to find somebody who knows what's going on if you post your diffs over at WineHQ.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#28 -i30817-

-i30817-
  • Guest

Posted 25 April 2011 - 01:22 PM

I'd like to attempt this again. Is anyone here able to edit the fixpack exe edits so that they are selectable? (so i can test it one by one, to find the problematic one).

#29 aqrit

aqrit
  • Member
  • 132 posts

Posted 26 April 2011 - 03:29 PM

the patch at file offset 00337ACE to 00337BC0
seems to be the cause of the "hang after playing resting movie" problem

trmt110:
33 C9 8A 0D 6D BA 8D 00 3B C1 0F 84 D5 00 00 00 8B 45 08 D1 E8 8B 95 58 FC FF FF 8B 8A CA 0C 00 00 6B C9 0F 33 D2 F7 F1 89 45 D4 8B 95 58 FC FF FF 33 C0 8A 82 27 07 00 00 83 F8 0A 7E 48 8B 8D 58 FC FF FF 33 D2 8A 91 27 07 00 00 83 EA 0A 81 E2 FF 00 00 00 3B 55 D4 77 0F 8B 85 58 FC FF FF C6 80 27 07 00 00 0A EB 1B 8B 8D 58 FC FF FF 8A 91 27 07 00 00 2A 55 D4 8B 85 58 FC FF FF 88 90 27 07 00 00 EB 5D 8B 8D 58 FC FF FF 33 D2 8A 91 27 07 00 00 83 FA 0A 7D 4A 8B 85 58 FC FF FF 33 C9 8A 88 27 07 00 00 BA 0A 00 00 00 2B D1 81 E2 FF 00 00 00 3B 55 D4 77 0F 8B 85 58 FC FF FF C6 80 27 07 00 00 0A EB 1B 8B 8D 58 FC FF FF 8A 91 27 07 00 00 02 55 D4 8B 85 58 FC FF FF 88 90 27 07 00 00 EB 0D 8B 8D 58 FC FF FF C6 81 27 07 00 00 0A 

pst-fix:
83 F8 02 3B C2 0F 84 DB 00 00 00 81 C1 94 04 00 00 51 E8 89 55 08 00 83 F8 FF 8B 8D 58 FC FF FF 0F 85 C0 00 00 00 8B 45 08 D1 E8 8B 89 CA 0C 00 00 6B C9 0F 33 D2 F7 F1 89 45 D4 8B 95 58 FC FF FF 0F BE 82 27 07 00 00 0F BE 8A 5C 05 00 00 3B C1 7E 25 2B C1 25 FF 00 00 00 3B 45 D4 77 08 88 8A 27 07 00 00 EB 0F 8A 82 27 07 00 00 2A 45 D4 88 82 27 07 00 00 EB 7A 7D 78 2B C8 81 E1 FF 00 00 00 3B 4D D4 77 0E 8A 8A 5C 05 00 00 88 8A 27 07 00 00 EB 0F 8A 82 27 07 00 00 02 45 D4 88 82 27 07 00 00 EB 4C 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 8A 91 5C 05 00 00 88 91 27 07 00 00


#30 -i30817 aka paulo-

-i30817 aka paulo-
  • Guest

Posted 27 April 2011 - 05:41 AM

Now we only need to bug scient. Isn't he on the civilization fanatics forum?

#31 aqrit

aqrit
  • Member
  • 132 posts

Posted 27 April 2011 - 04:11 PM

I'm too lazy to figure out how to use winedbg

Edited by aqrit, 30 April 2011 - 11:28 AM.


#32 -i30817-

-i30817-
  • Guest

Posted 29 April 2011 - 02:02 AM

It's strange that it only hangs in wine. A hang and not a crash is normally a symptom of a infinite cycle. Since the code is the same...

Winedbg is the same as the gcc dgb, i believe (i'm also too lazy to figure it out).

#33 aqrit

aqrit
  • Member
  • 132 posts

Posted 30 April 2011 - 11:33 AM

(edited my prev post)

//VA: 0x00737ACE
CMP EAX,2
// <-- MISSING jxx ( possibly: je 00737BB4 )

CMP EAX,EDX // ALWAYS not equal ( edx is NOT sanitized )
// al == dl so what is the point of this cmp anyways?
// the un-sanitize part of edx is the 'this' pointer


---

The patch in question is described in EngineFixes.tph

SPRINT "Q_Patch_Name" ~4g. Morale: Make function that resets morale every 8 hours use Maximum Morale.~


Edited by aqrit, 30 April 2011 - 03:10 PM.


#34 -i30817-

-i30817-
  • Guest

Posted 03 May 2011 - 03:08 PM

Is the executable the same size? what worries me is that as it is a missing part it might be something he did while relocating functions to create more space that was simply wrong there but he didn't notice and the other fixes depend on now.

Also if you could make a edited version of the patch it would be great.

#35 -i30817-

-i30817-
  • Guest

Posted 03 May 2011 - 03:10 PM

Also the point of making a not equal if might be just to fail the next JE

#36 aqrit

aqrit
  • Member
  • 132 posts

Posted 04 May 2011 - 08:36 AM

I'll fix it eventually, but first I need a test case...

I installed the tweakpack and I see the GOOD/LAW values but NOT the 'morale value' inside the 'Alignment' profile window
am I missing something?

Space was not an issue with this patch ( as per the ~40 nops )
I'm wondering if it was just a copy and paste error and the first instruction should have been
MOV EDX,2
which would still be a little odd since obviously EAX could be compared to 2 directly

of course, if "Qwinn is retire" who will update the patch with a new fix?

( you can just snip the '4g' patch from your tp2 file as a temporary fix )

Edited by aqrit, 04 May 2011 - 08:38 AM.


#37 Turambar

Turambar
  • Modder
  • 935 posts

Posted 18 May 2011 - 02:11 PM

I'll fix it eventually, but first I need a test case...

If I have understood the problem, it has to do with PS:T on linux.
I have just installed it on linux (I had problems with my display drivers until recently), so I still have to see if it works, but if I notice any problem while resting (is that the problem about?), I could try to help you.
The thing is, I don't know assembly, so I could only test your patch if you can tell me which bytes I must change in the .exe.

I installed the tweakpack and I see the GOOD/LAW values but NOT the 'morale value' inside the 'Alignment' profile window
am I missing something?

IIRC, the good/law value should be for TNO only. The morale should only exist for NPCs, and not for TNO. So, you should check for example if Morte has his morale displayed.

of course, if "Qwinn is retire" who will update the patch with a new fix?

( you can just snip the '4g' patch from your tp2 file as a temporary fix)

I hope he'll come back, as he has really done a lot for this game, and I think it's also thanks to him if we still play this game; anyway, if he's really retired, everyone can update his mod. The most difficult thing is actually to understand what he did, and to be able to continue his work; I think all weidu mod are under GPL license, so, as long as you specify all credits and people who have contributed, you can still update it (I think you can ask a moderator for the permission to update this file).
Otherwise, you could initially upload a new, separate "fix for the fixpack" mod (as I did for DSotSC and NTotSC for BGT), and wait for him to come back; if he does not turn up again, someone could ask a moderator to upgrade the fixpack itself.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg


#38 -i30817-

-i30817-
  • Guest

Posted 18 May 2011 - 08:58 PM

on wine, linux 64 bits. I think 32 bit works... somehow.

#39 aqrit

aqrit
  • Member
  • 132 posts

Posted 18 May 2011 - 11:39 PM

thanks, Morale appears on the NPC's character sheets.

the patch doesn't seem to be working for windows either
morale remains at 10 after resting

is there a "morale" and a "current morale" ?

Dak'kon's Zerth Blade was supposed to transform when gaining certain fighter levels depending on Dak'kon's morale. This usually wouldn't work due to the morale reset. Now it will! You can now see Dak'kon's Streaming Blade or Kinstealer, depending on how you treat him.

resetting morale to a higher value does that?

Is maximum morale a constant value? ( 20?) or does it change?

Edited by aqrit, 18 May 2011 - 11:55 PM.


#40 Turambar

Turambar
  • Modder
  • 935 posts

Posted 19 May 2011 - 05:38 AM

on wine, linux 64 bits. I think 32 bit works... somehow.

I do have linux 64 bit, with the latest version of wine (1.3.20?), and the hang does occur to me, both if I rest normally or after talking to those NPCs which allow you to do that. So, if you need someone to test your fixes, here I am.

BTW, thanks to whoever mentioned emulating the sound drivers, to prevent all movies from hanging (it didn't always occur to me, but sometimes that was really annoying).
Anyway, I haven't found any explanation of wine audio hardware emulation. Can it have problems with other applications? Do you know if there's a way to set sound emulation in the wine command which calls a single program, instead of setting it for wine in general? I mean, I've seen that you can emulate a desktop by running, for instance,
wine explorer /desktop=Planescape:Torment,1280x943 torment.exe
Is there a way to change sound options for that particular program through command line?

thanks, Morale appears on the NPC's character sheets.

the patch doesn't seem to be working for windows either
morale remains at 10 after resting

is there a "morale" and a "current morale" ?


Dak'kon's Zerth Blade was supposed to transform when gaining certain fighter levels depending on Dak'kon's morale. This usually wouldn't work due to the morale reset. Now it will! You can now see Dak'kon's Streaming Blade or Kinstealer, depending on how you treat him.

resetting morale to a higher value does that?

Is maximum morale a constant value? ( 20?) or does it change?

I think there is a maximum of 20 for the morale (and perhaps a minimum of 0 as well?), but I don't have any AD&D manuals, so I can't be sure.

In my game, the morale does not appear to be reset when I rest (at least, the character sheet shows a morale of 20 for both annah and da'kkon; his blade got upgraded some times, and he has several bonus spells thanks to that). Or is that issue related to your new patch?

edit: I tried to remove that particular patch from the fixpack and to reinstall, and the hang did disappeare, so that must be the correct origin of the bug.
But the morale was reset to 10, so that patch IS useful, and it'd be really great if you managed to get that to work on linux. Actually, you don't even need your patch to be able to work on windows; you can leave the original patch for win users and make a different patch for wine only, if that makes things easier.
Moreover, I don't know if that patch is linked to any other, and removing just that from the fixes can make other things crash

BTW, I think there are two different morales, the "permanent" one and the temporary one (although the permanent can be modified, just as maximum and current HPs).
I think the temporary one should be reset every 8 hrs and/or when you rest. The original game reset the wrong one, so that's why the fix was intended. On windows, the patch from the fixpack did work for me as intended, and the morale was never reset.

I'm sorry if I'm just repeating already said things, but they were quite scattered through the topic, and it wasn't so easy to follow them.

Edited by Turambar, 20 May 2011 - 11:00 AM.

Turambar

Currently supporting: DSotSC for BGT, NTotSC - forum

Turambar's fixes and tweaks for BG2, BGT, DSotSC, NTotSC, SoBH and more!

 

Before posting questions (even regarding posts written by myself), please look at Jarno Mikkola's FAQs for the Megamods!
(how to correctly report CTDs)

 


vipersig.jpg