Making a preloader for awc.dll?
Posted 29 June 2013 - 05:54 AM
Every time i try to start the game it begins to start, then a small popup appears that says awc.dll load failed, so i looked it up and i figured out that awc.dll is drm and has very little to do with the game itself. I figure that if it weren't failing the game would run. so i looked it up some more...and i found this.
Seems like a very similar problem to me and i think it may be related. It suggests a preloader as a solution. Im not very familiar with this terminology, what exactly is a preloader? and if it really is a possible solution to my problem, how might i go about setting one up?
Posted 27 July 2013 - 04:43 PM
When DLL's load into memory, they have predefined memory addresses at which they plan to load. In some instances, they cannot load directly to these addresses as something else is occupying it, or it is elsewise reserved. This is fine, as the loader will then make use the DLL's relocation table and move it elsewhere in RAM.
The problem here is that awc.dll is a file that is there as an anti-piracy measure, and has had its relocation table stripped from it in order to make it more difficult to screw with.
This would not be a problem on a windows or even linux system - the DLL loads to its normal location and everything is well with the world. However, on Mac that location is reserved for something else. Assuming that it's the same as with the activation.dll issue in Sim City, that address - 0x40000000 - is reserved by wine on Mac for WINE_DOS, which takes up 0x00075000-0x40075000.
When the loader tries to load the DLL to that area, it finds WINE_DOS has reserved it - and then when it tries to move it somewhere else, it finds no relocation table within the file with which to do so - and it fails.
So, what's the solution then? Well, someone has mentioned using a preloader. I'm not sure what that would do, but presumably it would... establish some sort of relocation table for the DLL so that it can then be moved? I don't know.
However, someone hacked up a workaround in the aforementioned thread. They modified a line of the WINE loader's code so that there is less memory reserved for WINE_DOS. In doing so, it causes the default address for the DLL to be free upon loading, and the relocation table is never needed to move it.
Said modification - specifically to the file "a/loader/main.c" - can be found here. I do not have the resources to build it into a custom WINE engine; perhaps someone else here could?
In fact, Camthayne7 - if you're up for it, it would be entirely awesome if you could build an engine with that modification, implement it in the wrapper you have going and share it... :3
Posted 29 July 2013 - 08:24 PM
Ok, if i can figure out how to make the modification ill try at it. It might take me a while though as i'm a total newb, But ill give it a go...so the modification is a line of add on code for a certain file that makes it more memory efficient in a sense?
Guess ill start by finding the file "and where in that file" ill be putting this new code...im looking for "a/loader/main.c" ?
Posted 24 May 2014 - 12:53 AM
Posted 20 December 2015 - 04:32 PM
there appears to be a fix from skidrow that doesn't give the Awe error, but unfortunately it gives another error. It's saying that the software is altered ;(
and what gdeamon31 says is true, even to mac the game run on steam, you'll have to use the crack fix
it is the only way the game will run
Ape is High (Mandrill 1972)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users