Fix '*mb of free virtual memory' on 'Director Player 6.0' and 'Director Player 5.0' programs on XP/Vista

posted by sacah on software, fixes,

I'm getting 100+ people look at this each month, seems like tons of people still use these old Director programs. If this doesn't help you, please leave a comment and let me know what you were looking for and maybe I can help.

I tried to play an old pool game today, when I ran it an error popped up saying 'Director Player 6.0', 'This program requires at least 3mb of free virtual memory to run.'

I did a search on the net and found that when Windows moved from 98 to XP the way it reported Virtual Memory amounts was changed from bytes to kilobytes, which leads Director 6.0 to think that there is less Virtual Memory than there really is.
Most fixes revolve around setting your Virtual Memory under 1GB or 4GB+, which is a lot of messing around just to play an old game.

I opened IDA Pro and had a squiz, found the culprit and disabled it, I am not sure if the byte I changed is in the same place on all Director 6.0 games, or if the calls made before the byte I changed are the same, so I can't make a patch to change this automatically until I know these things, if you have another Director 6.0 program that is reporting this error send me the exe and I will see if I can release a patcher to fix this in all Director 6.0 exes. The call before it seems to be the same for Director Player 5 and 6 so I have made a patcher that seems to work on both Director Player 5 and 6.

call ds:GlobalMemoryStatus
mov eax, [ebp+Buffer.dwAvailPageFile]
add eax, [ebp+Buffer.dwAvailPhys]
cmp eax, 387520h
jge short loc_40D3B2

or in a hex editor
FF 15 F4 AA 53 00 8B 45 84 03 85 7C FF FF FF 3D 20 75 38 00 7D 6E

I changed jge (0x7d) (Jump if Greater or Equal) to jle (0x7e) (Jump if Less or Equal) as Rene pointed out change it to jmp (0xEB)(Jump)
In my game it was located at 0xc742

To find 0xc742 in FRHED, look for the Offset in the bottom left.

Each set of double numbers/letters is a byte displayed in HEX, each byte adds 1 to the Offset

Thanks to Gerard for the comment about Director Player 5 having the same byte sequence.

I've made a new patch, should work on Director 5 and 6 programs, and from my limited testing it works. If you have a Director 5 or 6 program that this patch doesn't work with please send me just the exe file and I'll test it and try and update my patch to allow it to work. Some people have reported this patch get's falsely marked as a Trojan, it's not but uses a packing method that some Trojans use. If this happens to you and it you can't tell your anti-virus solution to ignore this file download the unpacked one, though this hasn't been tested, let me know if it works for you.

Hex Editor I recommend - Frhed