[1.11] DLL Memory Map and Tool

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12100
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U
United States of America

Hand-picked

[1.11] DLL Memory Map and Tool

Post by Myhrginoc » Wed Aug 03, 2005 7:26 am

Patch 1.11 hit us out of the blue with some significant changes in how code appears in the dlls. Here is the memory map as it appears on my machine:

Code: Select all

Base       Size       ImageBase  Top+1      File
00400000   0020A000   00400000   0060A000   Game.exe
01F90000   0001A000   10000000   1001A000   smackw32.dll
01FB0000   00041000   10000000   10041000   binkw32.dll
60000000   0002E000   60000000   6002E000   ijl11.dll
........   0001A000   6F850000   6F86A000   D2glide.dll
........   0000E000   6F870000   6F87E000   D2gdi.dll
6F880000   00036000   6F880000   6F8B6000   D2Direct3D.dll
........   00013000   6F8C0000   6F8D3000   D2DDraw.dll
6F8E0000   000CE000   6F8E0000   6F9AE000   d2win.dll
6F9B0000   00019000   6F9B0000   6F9C9000   D2sound.dll
........   0003F000   6F9D0000   6FA0F000   D2multi.dll
6FA20000   00014000   6FA20000   6FA34000   d2mcpclient.dll
6FA40000   0002D000   6FA40000   6FA6D000   D2Launch.dll
6FA80000   00021000   6FA80000   6FAA1000   D2gfx.dll
6FAB0000   00135000   6FAB0000   6FBE5000   D2Client.dll
0BD10000   0000D000   6FBF0000   6FBFD000   D2Net.dll
6FBF0000   00060000   6FBF0000   6FC50000   storm.dll
003E0000   00014000   6FC00000   6FC14000   D2Lang.dll
02770000   00122000   6FC20000   6FD42000   D2Game.dll
6FD50000   000A9000   6FD50000   6FDF9000   D2Common.dll
6FE10000   00107000   6FE10000   6FF17000   D2CMP.dll
6FF20000   00022000   6FF20000   6FF42000   Bnclient.dll
6FF50000   0005C000   6FF50000   6FFAC000   fog.dll
One big annoyance is Storm.dll, which moves from the end of the list to a place where it bumps other dlls around. I found that rebasing Storm.dll allowed all the other Blizzard modules to load at their preferred addresses. You can get the rebased Storm in our File Center. (A rebased executable is not changed in any way except for the image base and addresses affected by the relocation table.)

Another observation is the VC++ Runtime Library now is jammed into the beginning or middle of some dlls, instead of appearing reliably at the end as before. That means known game code based on previous compilations will be a poor indicator of where to look in the new version. I don't know if this is the difference between compiler settings used by different programmers, or a deliberate attempt by Blizzard to discourage code editing. But it does make creating new dll plugins more complicated.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
Joel
Moderator
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay

Hand-picked

Post by Joel » Wed Aug 03, 2005 8:16 am

I don't know if this is the difference between compiler settings used by different programmers, or a deliberate attempt by Blizzard to discourage code editing.
Seeign how the txt part of the patch has been done, some incompetent has taken the place of Isolde .... and that's not for good :s

I assume most ordinal has changed too no ?
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

User avatar
kingpin
Retired Admin
Cherub
Posts: 10954
Joined: Sat Jan 11, 2003 12:51 pm
Sweden

Hand-picked

Re: [1.11] DLL Memory Map and Tool

Post by kingpin » Wed Aug 03, 2005 9:21 am

I assume most ordinal has changed too no ?
They have, D2Common #10519 is no longer what we are used it is by example.

User avatar
Myhrginoc
Retired Admin
Cherub
Posts: 12100
Joined: Sat May 25, 2002 7:28 am
Location: Percussion U
United States of America

Hand-picked

Re: [1.11] DLL Memory Map and Tool

Post by Myhrginoc » Thu Aug 04, 2005 1:24 am

I remember Isolde warning us a major patch could recompile with different ordinals for the same functions. It looks like we'll need to build a cross-reference.

I bet ptGame and ptUnit are all screwed up too.
Do the right thing. It will gratify some people and astonish the rest.
~ Mark Twain
Run Diablo II in any version for mods: tutorial
The Terms of Service!! Know them, abide by them, and enjoy the forums at peace.
The Beginner's Guide v1.4: (MS Word | PDF) || Mod Running Scripts || TFW: Awakening

User avatar
SVR
Retired staff
Arch-Angel
Posts: 1449
Joined: Sat Nov 02, 2002 11:04 pm
Location: Texas
United States of America

Hand-picked

Post by SVR » Thu Aug 04, 2005 1:32 am

What ???
That's just not right :P

Seems like they just lost their minds. (and their compiler settings ;-)
A quick check of several ordinals, all different. :cry:

oh well boys & girls, welcome back to square 1 (.11) :mrgreen:

EDIT: Ok Myhr, just saw you posted ahead of me ;-)

Here's the first installment to the crossref ...

10575 11061 Unload Bins (Leave game)
10576 10149 Initialize Bin Files Creation (EnterGame)
10578 10653 Create .bin from Txt
10579 Not Exported Remove bin image


10579 may still be exported, just 11061 doesnt use it. It frees the mem itself through fog.10046 (Wow, is that actually still the same? just noticed :P )


EDIT: AARRGGGHHHH .....

They changed local calling conventions !

The functions use arbitrary registers to pass args. This *is* wrong.

Param1 in EAX
Param2 in EDI
Param3 in EBX ???

Looks like some sort of global optimization.
Totally will hose D2Mod hook concepts.
:x
Last edited by SVR on Thu Aug 04, 2005 4:38 am, edited 2 times in total.

User avatar
Joel
Moderator
Dominion
Posts: 6921
Joined: Mon May 27, 2002 7:19 am
Location: Orsay

Hand-picked

Post by Joel » Thu Aug 04, 2005 8:14 am

smells -O2 to me ....
"How much suffering, mortal, does it take before you lose your grace?"
Shadow Empire (coming soon) | forum

Jarulf
Junior Member
Champion of the Light
Posts: 346
Joined: Sun May 26, 2002 9:20 am

Hand-picked

Post by Jarulf » Mon Aug 15, 2005 12:57 pm

Joel";p="236459" wrote:
Seeign how the txt part of the patch has been done, some incompetent has taken the place of Isolde .... and that's not for good :s
Ehh, what do you mean, I seem to not understand what you are refering to. (And no, I have not even downloaded the new patch yet...)

User avatar
lord_james
Junior Member
Paladin
Posts: 141
Joined: Sat Mar 06, 2004 10:35 pm
Location: Maine

Post by lord_james » Mon Aug 15, 2005 6:20 pm

Jarulf";p="238230" wrote:
Joel";p="236459" wrote:
Seeign how the txt part of the patch has been done, some incompetent has taken the place of Isolde .... and that's not for good :s
Ehh, what do you mean, I seem to not understand what you are refering to. (And no, I have not even downloaded the new patch yet...)
They "forgot" to fill in a number of EOLs (End of Lines)
I have nothing to say down here.

User avatar
Vendanna
Hosted Forum Moderator
Arch-Angel
Posts: 1387
Joined: Sun Nov 24, 2002 4:55 pm
Location: Cartagena (Spain)

Post by Vendanna » Mon Aug 15, 2005 9:32 pm

Yup, but they also destroyed most of the chains in monstats, so unless you fixed them (like Joel already did) you will not be able to add new monsters, and probably it may be buggy.

I consider 1.10 superior to what 1.11 would give me, I was rather happy at first trying they fixed the Single player Fire enchanted bug, but alas they didn't. :cry:
"Mysteries are revealed in the light of reason."

Black Omen's production

User avatar
ChaosEnergy
Forum Regular
Angel
Posts: 677
Joined: Wed Dec 03, 2003 3:48 pm
Location: NRW

Re: [1.11] DLL Memory Map and Tool

Post by ChaosEnergy » Sun Sep 04, 2005 3:37 pm

After conversion of my files to 1.11 I started with the DLLs, and looked for already found code edits...

hmm...ok and now, I stop the conversion...

Chaos Empire wont ever come in 1.11

See the reason...

change the port which tcp/ip multiplayer games connect on
switch -actX LvL of character
Resistance Display Limit
FindPotion Items (each 3 per act and difficulty, so 15 entries)
Crushing Blow not dependend on player amount
move Exp behaviour with lvl 25 to higher values
set PlayersX Mininum
restrict PlayersX max up to 127
Runewords in items above magic type
more skills per lvlup
loose gold only from inventory, not stash
increase carry of gold in Inventar and stash
Fix cost of gambling/read from GambleCost
more items in gamble screen
change player titles
cain always get 100gold per ident
Screen Range for party
Calculation of party exp(limit to prevent overflows)
The ancients will give max exp instead of max 1lvlup
Akara quest reward
charsi items instead of rare in unique
Ormus Ring reward instead of rare now unique
Quest 1 in act3 (potion of life)
LAM Esen Status points
Hellforge Quest Drop
Quahl-Kehk Quest reward
Malah Quest reward (resis)
Skill Amount of Quests: book of skills, den of the evil, izual
activate registe MAGIC in stores
telekinese works as in classic
inscribe /name items without anya quest
hireling items
change of superunique aura
book of lore

a long list, and after I saw this..I stopped my conversion...
but i saw i need to edit my sticky collection thread for 1.10...
Chaos Empire Net
chaosenergy(a)chaosempire.net
Chaos Empire ® is a registered Trademark of Hans-Jürgen Ohler
Copyright by Hans-Jürgen Ohler (aka ChaosEnergy)2003 - 2015

User avatar
Nefarius
Retired Admin
Cherub
Posts: 11607
Joined: Sat Jun 15, 2002 8:13 pm
Location: Where the blood forever rains

Hand-picked

Re: [1.11] DLL Memory Map and Tool

Post by Nefarius » Sun Sep 04, 2005 4:55 pm

Ahem, You obviously didn't look carefully, I rediscovered a bunch of things for 1.11:

> Res and Res Display caps
> Runewords in everything.
> Fixed Gamble Cost
> EXP Tables, Party-2screen radius-
> Telekinesis fix.
> Socket code re-found for 1.11. (in the original thread)
> Defense while running.
> DR cap.
> ABS cap.

viewtopic.php?t=33266

* change player titles - you can still edit the titles in d2win.dll as usual.
* change of superunique aura - search for the structure I posted for 1.10.
* Hellforge Quest Drop - look for the item codes in the dll...
* FindPotion Items (each 3 per act and difficulty, so 15 entries) - as above
* Quest rewards that give runes/rings etc, search for the item codes and compare structure with 1.10.

^These are easy to find/do, I never even bothered re-discovering them.
Last edited by Nefarius on Sun Sep 04, 2005 5:00 pm, edited 2 times in total.
''(...) The game can basically be considered unhackable. '' - Blizzard Entertainment (30th May 2000)
Black Omen Productions | MetalStorm: Progress Report | Screenshots

Return to “Code Editing”