VOGONS


Reply 20 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Nicknine wrote on 2025-04-05, 20:29:

Bleh, I spoke too soon. NFS: Carbon crashes with EmulateHeap again (usually in C:\Windows\SYSTEM32\AcGenral.DLL).

Do you have a general build number? I don't have the PC to access right now, else I would have shared the Win11 fixed heap module

UCyborg wrote on 2025-04-05, 21:29:

Crazy! TBH, it was never a good idea to rely on compatibility shims, always best to patch the bug out, though it can be difficult.

The most interesting part I find here is as to why BlackBox refused to use a (generic?) NT heap like they did on Most Wanted, instead of relying on something more XP specific

previously known as Discrete_BOB_058

Reply 21 of 56, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

It's just buggy memory management, there's no targeting of specific heap manager involved. These things happen when application writes data outside the memory range it allocated, which is likely to corrupt other data structures.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 22 of 56, by Nicknine

User metadata
Rank Newbie
Rank
Newbie
BEEN_Nath_58 wrote on 2025-04-05, 22:43:
Nicknine wrote on 2025-04-05, 20:29:

Bleh, I spoke too soon. NFS: Carbon crashes with EmulateHeap again (usually in C:\Windows\SYSTEM32\AcGenral.DLL).

Do you have a general build number? I don't have the PC to access right now, else I would have shared the Win11 fixed heap module

I assume you mean Win10 build number - 19045.5608.

Reply 23 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Nicknine wrote on 2025-04-06, 00:27:
BEEN_Nath_58 wrote on 2025-04-05, 22:43:
Nicknine wrote on 2025-04-05, 20:29:

Bleh, I spoke too soon. NFS: Carbon crashes with EmulateHeap again (usually in C:\Windows\SYSTEM32\AcGenral.DLL).

Do you have a general build number? I don't have the PC to access right now, else I would have shared the Win11 fixed heap module

I assume you mean Win10 build number - 19045.5608.

Okay nvm. It was being tested on Win10 1903 so that's besides the point. Give me a day

previously known as Discrete_BOB_058

Reply 24 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Nicknine wrote on 2025-04-05, 21:23:
UCyborg wrote on 2025-04-05, 20:44:

Why use EmulateHeap with NFS: Carbon? It's a XP era game. Though if idea is to test the shim itself, I get it. But who knows if some game doesn't work right with 9x's heap manager like some don't work with NT's heap manager. Some related reading (I didn't find the original link): https://mcpmag.com/articles/2010/07/27/trip-d … mulateheap.aspx

I remember trying EmulateHeap with Mafia I some time ago, tried to see if it would prevent crashing when exiting through menu, it slowed down the game instead. I probably only tried with some version of Win10. This game is supposed to run on Win98 as well (hence the idea to try EmulateHeap), and that crash didn't happen when ran on Linux via WINE. Supposedly the version without the patch doesn't crash on Windows either, but haven't experimented with that version.

Base NFS: Carbon (1.2) crashes after EA logo on Windows Vista and up, EA actually fixed that in 1.4 patch since Vista came out shortly after this game. Microsoft later updated their system compatibility database so it automatically applies EmulateHeap shim to 1.2 exe which also fixes this problem... or it did until they broke EmulateHeap a few years ago.

I sent you a PM....

previously known as Discrete_BOB_058

Reply 25 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t

Tested crazyc's fixed EmulateHeap hooker and module. Seems to be running well on Windows 11. All tested games work now (12 of them)

previously known as Discrete_BOB_058

Reply 26 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-08, 21:17:

Tested crazyc's fixed EmulateHeap hooker and module. Seems to be running well on Windows 11. All tested games work now (12 of them)

Have you a link with crazyc's fixed EmulateHeap hooker ? I didn't find a link with google search.

Reply 27 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-14, 21:24:
BEEN_Nath_58 wrote on 2025-04-08, 21:17:

Tested crazyc's fixed EmulateHeap hooker and module. Seems to be running well on Windows 11. All tested games work now (12 of them)

Have you a link with crazyc's fixed EmulateHeap hooker ? I didn't find a link with google search.

You won't find one yet.

Password is "heap".

TO use, load cmd and type earlyload.exe gamename.exe

Should be backword compatible with Windows XP as well, but since it is built on MSVC22, earlyload.exe doesn't work. On XP, using DxWnd with this file is currently the only options (still inferior) unless someone builds earlyloader.exe on an older MSVC

previously known as Discrete_BOB_058

Reply 28 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-14, 21:46:
You won't find one yet. […]
Show full quote
willow wrote on 2025-04-14, 21:24:
BEEN_Nath_58 wrote on 2025-04-08, 21:17:

Tested crazyc's fixed EmulateHeap hooker and module. Seems to be running well on Windows 11. All tested games work now (12 of them)

Have you a link with crazyc's fixed EmulateHeap hooker ? I didn't find a link with google search.

You won't find one yet.

Password is "heap".

TO use, load cmd and type earlyload.exe gamename.exe

Should be backword compatible with Windows XP as well, but since it is built on MSVC22, earlyload.exe doesn't work. On XP, using DxWnd with this file is currently the only options (still inferior) unless someone builds earlyloader.exe on an older MSVC

Thanks.
Has the author intended to make it publicly available in the future? If so, will it be released as a command-line tool or with a more accessible user interface?

Reply 29 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-15, 09:01:
BEEN_Nath_58 wrote on 2025-04-14, 21:46:
You won't find one yet. […]
Show full quote
willow wrote on 2025-04-14, 21:24:

Have you a link with crazyc's fixed EmulateHeap hooker ? I didn't find a link with google search.

You won't find one yet.

Password is "heap".

TO use, load cmd and type earlyload.exe gamename.exe

Should be backword compatible with Windows XP as well, but since it is built on MSVC22, earlyload.exe doesn't work. On XP, using DxWnd with this file is currently the only options (still inferior) unless someone builds earlyloader.exe on an older MSVC

Thanks.
Has the author intended to make it publicly available in the future? If so, will it be released as a command-line tool or with a more accessible user interface?

To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard part to handle, and also make it portable across XP to 11

The Detours based command line utility was just based for testing it and it just worked better than DxWnd hooking. Other devs can implement a GUI based tool for the same.

Did you test it ?

previously known as Discrete_BOB_058

Reply 30 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-15, 09:11:
To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard […]
Show full quote
willow wrote on 2025-04-15, 09:01:
BEEN_Nath_58 wrote on 2025-04-14, 21:46:
You won't find one yet. […]
Show full quote

You won't find one yet.

Password is "heap".

TO use, load cmd and type earlyload.exe gamename.exe

Should be backword compatible with Windows XP as well, but since it is built on MSVC22, earlyload.exe doesn't work. On XP, using DxWnd with this file is currently the only options (still inferior) unless someone builds earlyloader.exe on an older MSVC

Thanks.
Has the author intended to make it publicly available in the future? If so, will it be released as a command-line tool or with a more accessible user interface?

To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard part to handle, and also make it portable across XP to 11

The Detours based command line utility was just based for testing it and it just worked better than DxWnd hooking. Other devs can implement a GUI based tool for the same.

Did you test it ?

not yet but I wanted to test with pitfall mayan adventure.

Reply 31 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-15, 09:40:
BEEN_Nath_58 wrote on 2025-04-15, 09:11:
To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard […]
Show full quote
willow wrote on 2025-04-15, 09:01:

Thanks.
Has the author intended to make it publicly available in the future? If so, will it be released as a command-line tool or with a more accessible user interface?

To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard part to handle, and also make it portable across XP to 11

The Detours based command line utility was just based for testing it and it just worked better than DxWnd hooking. Other devs can implement a GUI based tool for the same.

Did you test it ?

not yet but I wanted to test with pitfall mayan adventure.

I don't really remember where the game needed EmulateHeap. I think it was the Autorun application which plays some intro video then proceeds to the game.

You can also throw it any Win98 compatible random program (like San Andreas) and it should be working

previously known as Discrete_BOB_058

Reply 32 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-15, 13:35:
willow wrote on 2025-04-15, 09:40:
BEEN_Nath_58 wrote on 2025-04-15, 09:11:

To be honest I don't know. It just passed my testing and other than that, we never had conversations of it. The DLL was the hard part to handle, and also make it portable across XP to 11

The Detours based command line utility was just based for testing it and it just worked better than DxWnd hooking. Other devs can implement a GUI based tool for the same.

Did you test it ?

not yet but I wanted to test with pitfall mayan adventure.

I don't really remember where the game needed EmulateHeap. I think it was the Autorun application which plays some intro video then proceeds to the game.

You can also throw it any Win98 compatible random program (like San Andreas) and it should be working

What games heve need emulate heap ?

Reply 33 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-15, 13:57:
BEEN_Nath_58 wrote on 2025-04-15, 13:35:
willow wrote on 2025-04-15, 09:40:

not yet but I wanted to test with pitfall mayan adventure.

I don't really remember where the game needed EmulateHeap. I think it was the Autorun application which plays some intro video then proceeds to the game.

You can also throw it any Win98 compatible random program (like San Andreas) and it should be working

What games heve need emulate heap ?

NFS Porsche Unleashed, Interstate 76, Battlezone, Jane's Longbow 2, Superbike 2000, Superbike 2001, ...

previously known as Discrete_BOB_058

Reply 34 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-15, 14:04:
willow wrote on 2025-04-15, 13:57:
BEEN_Nath_58 wrote on 2025-04-15, 13:35:

I don't really remember where the game needed EmulateHeap. I think it was the Autorun application which plays some intro video then proceeds to the game.

You can also throw it any Win98 compatible random program (like San Andreas) and it should be working

What games heve need emulate heap ?

NFS Porsche Unleashed, Interstate 76, Battlezone, Jane's Longbow 2, Superbike 2000, Superbike 2001, ...

It's strange because Porsche Unleashed, with the patches available on PCGamingWiki and dgVoodoo 2, works without EmulateHeap emulation on Windows 11 24H2.

Is there a much longer list of games that require EmulateHeap emulation and no longer work on Windows 11? Unfortunately, I don't have the games you mentioned after NFS.

Reply 35 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-15, 20:04:
BEEN_Nath_58 wrote on 2025-04-15, 14:04:
willow wrote on 2025-04-15, 13:57:

What games heve need emulate heap ?

NFS Porsche Unleashed, Interstate 76, Battlezone, Jane's Longbow 2, Superbike 2000, Superbike 2001, ...

It's strange because Porsche Unleashed, with the patches available on PCGamingWiki and dgVoodoo 2, works without EmulateHeap emulation on Windows 11 24H2.

Is there a much longer list of games that require EmulateHeap emulation and no longer work on Windows 11? Unfortunately, I don't have the games you mentioned after NFS.

EmulateHeap is enabled by default on the game (porsche.exe?).

If you have any game that has Win98 as a supported system, try there. For example GTA Vice City

previously known as Discrete_BOB_058

Reply 36 of 56, by willow

User metadata
Rank Member
Rank
Member
BEEN_Nath_58 wrote on 2025-04-15, 20:49:
no compatibility option selected […]
Show full quote
willow wrote on 2025-04-15, 20:04:
BEEN_Nath_58 wrote on 2025-04-15, 14:04:

NFS Porsche Unleashed, Interstate 76, Battlezone, Jane's Longbow 2, Superbike 2000, Superbike 2001, ...

It's strange because Porsche Unleashed, with the patches available on PCGamingWiki and dgVoodoo 2, works without EmulateHeap emulation on Windows 11 24H2.

no compatibility option selected

BEEN_Nath_58 wrote on 2025-04-15, 20:49:

Is there a much longer list of games that require EmulateHeap emulation and no longer work on Windows 11? Unfortunately, I don't have the games you mentioned after NFS.

EmulateHeap is enabled by default on the game (porsche.exe?).

If you have any game that has Win98 as a supported system, try there. For example GTA Vice City

I don't have gta vice city but I have return to castle wolfenstein. Win98 is listed.

I have tried and no problem to launch and play at RTCW even withtout compatibility options in windows 11 24h2.

Reply 37 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
willow wrote on 2025-04-15, 20:55:
BEEN_Nath_58 wrote on 2025-04-15, 20:49:
no compatibility option selected […]
Show full quote
willow wrote on 2025-04-15, 20:04:

It's strange because Porsche Unleashed, with the patches available on PCGamingWiki and dgVoodoo 2, works without EmulateHeap emulation on Windows 11 24H2.

no compatibility option selected

BEEN_Nath_58 wrote on 2025-04-15, 20:49:

Is there a much longer list of games that require EmulateHeap emulation and no longer work on Windows 11? Unfortunately, I don't have the games you mentioned after NFS.

EmulateHeap is enabled by default on the game (porsche.exe?).

If you have any game that has Win98 as a supported system, try there. For example GTA Vice City

I don't have gta vice city but I have return to castle wolfenstein. Win98 is listed.

I have tried and no problem to launch and play at RTCW even withtout compatibility options in windows 11 24h2.

RTCW doesn't need EmulateHeap. The test was if you add early loader, does it start having problems, like the way it would have some problem just enabling compat mode

previously known as Discrete_BOB_058

Reply 38 of 56, by UCyborg

User metadata
Rank Oldbie
Rank
Oldbie

The issue with Interstate '76 is the function that creates new heap object and writes its handle to a variable holding handle of default process heap. With .exe of gold patched version, the function is at address 0x499C90 when loaded into memory, problematic instruction is highlighted:

VT6omWp.png

Another function indicating variable at 0x5A7CC0 (along with 0x5A7CC4) holds handle of default process heap acquired via call to GetProcessHeap:

LlwtAcy.png

Removing the offending instruction at 0x499C45 makes the game playable even on Windows NT 4.0 and fixes the crash with transition from mission 12 to 13. There are still other bugs though, so you can't get through the storyline missions in one shot, crashes by the time you get to one of the final missions. EmulateHeap is redundant after this fix and doesn't address any of the remaining bugs. Guess it's luck it worked on real Win9x systems as well as it did.

Arthur Schopenhauer wrote:

A man can be himself only so long as he is alone; and if he does not love solitude, he will not love freedom; for it is only when he is alone that he is really free.

Reply 39 of 56, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
UCyborg wrote on 2025-04-15, 21:53:
The issue with Interstate '76 is the function that creates new heap object and writes its handle to a variable holding handle of […]
Show full quote

The issue with Interstate '76 is the function that creates new heap object and writes its handle to a variable holding handle of default process heap. With .exe of gold patched version, the function is at address 0x499C90 when loaded into memory, problematic instruction is highlighted:

VT6omWp.png

Another function indicating variable at 0x5A7CC0 (along with 0x5A7CC4) holds handle of default process heap acquired via call to GetProcessHeap:

LlwtAcy.png

Removing the offending instruction at 0x499C45 makes the game playable even on Windows NT 4.0 and fixes the crash with transition from mission 12 to 13. There are still other bugs though, so you can't get through the storyline missions in one shot, crashes by the time you get to one of the final missions. EmulateHeap is redundant after this fix and doesn't address any of the remaining bugs. Guess it's luck it worked on real Win9x systems as well as it did.

Never played I76 completely, and neither in 1 go. If I understood correctly, this would allow the game to run without EmulateHeap, which in turn makes the game compatible on NT4 and 5?

previously known as Discrete_BOB_058