Heap Overruns are a thing of the past!
Incredible discovery by CarLuver69
- dummiesboy
- MM2X Super Active User
- Posts: 2430
- Registered for: 16 years 1 month
- Location: USA
- Been thanked: 1 time
- Contact:
Heap Overruns are a thing of the past!
Last night, CarLuver69 discovered how to modify the EXE to increase the heap memory size, effectively eliminating heap overrun errors for good!
If you open your exe in a hex editor and go to offset 15DB, you should see a value of 02. This is your heap size, and 02 represents the default of 32MB. You can change this to any size you want within reason, and MM2 will go with it!
Sizes up to 1 GB have been confirmed stable, with 2 GB causing crashes.
32 MB = 02
64 MB = 04
128 MB = 08
256 MB = 10
512 MB = 20
1024 MB = 40
This is the result of 256 MB, which is more than enough for anything currently released for MM2. I'm able to run MC1 London with Riva's Traffic Pack set to full density, all while driving a high poly addon car!
Aaro4130 further tested this by downloading the same traffic mod, setting it to full density, and running a race with the NFS Undercover mod!
Finally, we had the idea to increase traffic density to ludicrous levels with Riva's mod, just to see how far it would go. Once again, rock steady! Although with an understandable impact to framerate...
The sky is the limit now, guys!
If you open your exe in a hex editor and go to offset 15DB, you should see a value of 02. This is your heap size, and 02 represents the default of 32MB. You can change this to any size you want within reason, and MM2 will go with it!
Sizes up to 1 GB have been confirmed stable, with 2 GB causing crashes.
32 MB = 02
64 MB = 04
128 MB = 08
256 MB = 10
512 MB = 20
1024 MB = 40
This is the result of 256 MB, which is more than enough for anything currently released for MM2. I'm able to run MC1 London with Riva's Traffic Pack set to full density, all while driving a high poly addon car!
Aaro4130 further tested this by downloading the same traffic mod, setting it to full density, and running a race with the NFS Undercover mod!
Finally, we had the idea to increase traffic density to ludicrous levels with Riva's mod, just to see how far it would go. Once again, rock steady! Although with an understandable impact to framerate...
The sky is the limit now, guys!
Last edited by dummiesboy on Wed May 11, 2016 8:15 pm, edited 3 times in total.
- Franch88
- MM2X Admin
- Posts: 15759
- Registered for: 17 years 3 months
- Location: Italy
- Been thanked: 1 time
- Contact:
Oh wow, that's an awesome discover! This limit had to be absolutely hardcoded in the game EXE, and in fact it's so, great work to have found it! What those screenshots are showing is impressive. I'm going to try it.
This game never fails to astonish us.
This game never fails to astonish us.
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|
|Franch88's MM2 Releases|
- The_Most_Wanted
- MM2X Active User
- Posts: 960
- Registered for: 11 years 11 months
- Location: Egypt
- dummiesboy
- MM2X Super Active User
- Posts: 2430
- Registered for: 16 years 1 month
- Location: USA
- Been thanked: 1 time
- Contact:
Hehe, I noticed that. Too bad I can't take credit for this one.Is it a coincidence that the adress is 15 D B?
You're telling me. With all of these guys coming in to mod the EXE, we could be seeing some more improvements soon enough.This game never fails to astonish us.
Lol. Well at least you remembered.You missed the best picture
Franch, do you think this topic is worth a sticky? That online play topic is outdated, it could be replaced.
- FXANBSS
- MM2X Active User
- Posts: 686
- Registered for: 11 years 6 months
- Location: Midtown Club, Discord
- Been thanked: 4 times
Holy...
I just hope that a EXE will released, for now, i will do it myself.
BTW, that highway screenshot...
It has the traffic density over %100? Is that possible?
OK, LETS PUT ENTIRE WEBSITES OF MODS ON IT
I just hope that a EXE will released, for now, i will do it myself.
BTW, that highway screenshot...
It has the traffic density over %100? Is that possible?
OK, LETS PUT ENTIRE WEBSITES OF MODS ON IT
Last edited by FXANBSS on Wed May 11, 2016 9:31 pm, edited 1 time in total.
-
- MM2X Super Active User
- Posts: 2405
- Registered for: 16 years 3 months
- Location: Canada
- Been thanked: 1 time
Actually it technically is 1.0. The game by default , will multiply your traffic density by 0.2. I just set the multiplier to 1 for funHoly...
I just hope that a EXE will released.
BTW, that highway screenshot...
It has the traffic density over %100? Is that possible?
OK, LETS PUT ENTIRE WEBSITES OF MODS ON IT
[img]https://i61.tinypic.com/25zrngo.jpg[/img][color=white]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer
[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]
- Most creative active member
- Most smart active member
- Best MM2 innovation of the year
- Best programmer
[img]https://i60.tinypic.com/2m4c2h5.jpg[/img]
- Most helpful active member[/color]
- dummiesboy
- MM2X Super Active User
- Posts: 2430
- Registered for: 16 years 1 month
- Location: USA
- Been thanked: 1 time
- Contact:
- Franch88
- MM2X Admin
- Posts: 15759
- Registered for: 17 years 3 months
- Location: Italy
- Been thanked: 1 time
- Contact:
Yeah, impressive screenshot, Aaro.
However, I can't seem to find that offset value. I've looked for the one named 00015DB0 and there's no "02" value in the row. I'm using HxD tool.
However, I can't seem to find that offset value. I've looked for the one named 00015DB0 and there's no "02" value in the row. I'm using HxD tool.
I've done more setting it as announcement.Franch, do you think this topic is worth a sticky? That online play topic is outdated, it could be replaced.
The idea of a patcher is perfect because of this reason, and to make this discover easily applicable.An EXE wouldn't be ideal since there are alot of versions out there. A patcher though, that could work...I just hope that a EXE will released.
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|
|Franch88's MM2 Releases|
- dummiesboy
- MM2X Super Active User
- Posts: 2430
- Registered for: 16 years 1 month
- Location: USA
- Been thanked: 1 time
- Contact:
-
- MM2X Occasional User
- Posts: 321
- Registered for: 12 years 8 months
- Location: London
- Been thanked: 2 times
- Franch88
- MM2X Admin
- Posts: 15759
- Registered for: 17 years 3 months
- Location: Italy
- Been thanked: 1 time
- Contact:
Ok, I've found the way: I had to look at the offset row 000015D0 and at the column 0B (it's the way HxD tool displays them, apparently).
With a value of 10, the game is able to load at the first loading more than 30 high polygons add-on cars (I've added various made by HQTM-Team). Higher values doesn't seem to give a change about the first game loading, as it always crashes with more add-on vehicles added (at least 40).
No problems with loading the MC London with Riva's Traffic Mod V4, the maximum amount of traffic and pedestrians densities, and playing an high polygons vehicle (more than 60000).
Spectacular!
With a value of 10, the game is able to load at the first loading more than 30 high polygons add-on cars (I've added various made by HQTM-Team). Higher values doesn't seem to give a change about the first game loading, as it always crashes with more add-on vehicles added (at least 40).
No problems with loading the MC London with Riva's Traffic Mod V4, the maximum amount of traffic and pedestrians densities, and playing an high polygons vehicle (more than 60000).
Spectacular!
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|
|Franch88's MM2 Releases|
- BUGATTIMAN253MPH
- MM2X Very Active User
- Posts: 1296
- Registered for: 13 years 6 months
- Location: Ireland
- Contact:
Would '04' be the one or does it definitely have to be 02?
Best Midtown Madness 2 car converter of the year
Best Midtown Madness 2 car converter of the year
Author of the best Midtown Madness 2 car add-on of the year
Best active member Midtown Madness 1 screenshot-er
Best active member avatar
Best Midtown Madness 2 breakout of the year
Funniest active member
- Franch88
- MM2X Admin
- Posts: 15759
- Registered for: 17 years 3 months
- Location: Italy
- Been thanked: 1 time
- Contact:
You're doing my same error, BUGATTIMAN253MPH.
As I've said in the above post, look at the row called 000015D0, and not 00015DB0; then, looking at the very top row next to "Offset (h)", see the crossing value at the column called 0B. You'll find the value 02 to change.
As I've said in the above post, look at the row called 000015D0, and not 00015DB0; then, looking at the very top row next to "Offset (h)", see the crossing value at the column called 0B. You'll find the value 02 to change.
Fiat 500 = Italian motorization. Franch88, MM2 eXtreme forum and website Administrator.
|Franch88's MM2 Releases|
|Franch88's MM2 Releases|