Forums  /  Toy Story series  /  Toy Story 2: Buzz Lightyear to the Rescue  /  How do you run the PC version on modern PC? (The famous "unable to enumerate..." error)
  hdc0hdc0

OK, so dgVoodoo is causing the DirectDrawCreate problem.

Anyway, I think I found out what you have to do in order to bypass the 2 GB error without using dgVoodoo. If you want to try it out, here are the instructions:
- If DirectDrawTest.exe is still named toy2.exe, rename it back to DirectDrawTest.exe. Also rename the game exe back to toy2.exe
- Make sure the game won't use dgVoodoo: Open C:\Program Files\Disney Interactive\Toy Story 2 in Windows Explorer and delete D3D8.dll, D3DImm.dll and DDraw.dll.
- You can verify that dgVoodoo is not used by opening a command prompt in the game directory and running DirectDrawTest.exe: If it displays 0x00000000, dgVoodoo is not used. If it's still in use, 0x80004005 is shown.
- Install HxD: https://mh-nexus.de/en/downloads.php?product=HxD
- Run HxD as administrator and open C:\Program Files\Disney Interactive\Toy Story 2\toy2.exe in HxD
- Double click Offset: 0 in the lower left corner
- Enter ACAC2 and press OK
- The value at the cursor should say 74
- Type EB in order to overwrite the value
- Save the file and close HxD
- Test whether the game is working now

 
  cheeseandcerealcheeseandcereal

That's awesome! Out of curiosity, what does changing that value at that offset actually do hdc0? I'd be curious to know.

 
  PeterAfroPeterAfro

The game is running to slow and can not get in to run in window mode what should I do?

 
  cheeseandcerealcheeseandcereal

The game doesn't run in windowed mode, and has no such built in function. That was a feature of dgVoodoo. You could try forcing it into a window using some external program like dxwnd, but those don't always work right. The running slow is a common issue which seems to be really inconsistent. The only thing I've seen that will fix that issue is to restrict the CPU usage on toy2.exe. Try starting the game while doing some cpu intensive task in the background and see if that helps.

 
  hdc0hdc0

cheeseandcereal:
The game uses some slightly modified code from d3denum.cpp from the DirectX 6 SDK samples to create a list of available graphics cards and display modes:
First it enumerates all DirectDraw/Direct3D display "drivers", then it enumerates the "devices" for each driver and finally it enumerates the "modes" (resolution and bpp) for each device.
In the first step (the enumeration of the drivers) the amount of video memory and other information is saved in a list for each driver.
Later, when the display modes are enumerated, the video memory that would be needed if the user chose the currently enumerated display mode is calculated. If the current device is a "hardware device", the required amount of video memory for this mode is compared to the available video memory that was obtained in the first step. If the mode would need more memory than is available, it will be skipped.
The problem is that for the comparison the unsigned 32-bit integer containing the available memory is cast to a ¤signed¤ integer. So if you have more than 2 GB (and less than 4 GB) of video memory, the comparison looks like this: "if <negative value> is less than <required video memory for this display mode>" and will always return "true".
So all display modes look like they would consume too much memory and the list of available modes to choose from will be empty if you have more than 2 GB of video memory.
Since the memory check is only performed for "hardware devices", it's sufficient to convert the "jz" (0x74) to a "jmp" (0xEB) instruction at the "hardware device" check, so the block containing the memory check is also skipped for hardware devices.

PeterAfro:
This worked for me:

 
  PeterAfroPeterAfro

livesplit global hotkeys do not work when the game is focused and autosplitter does not work

 
  cheeseandcerealcheeseandcereal

Well I'm not sure about global hotkeys. I know for me personally, global hotkeys for livesplit assigned on my controller don't work while playing TS2, however global hotkeys for livesplit on my keyboard do work while playing.

I can confirm that this method does not change any offsets, and the autosplitter will still work as intended, meaning that it's likely an issue with your livesplit configuration.

First of all, make sure you run livesplit as an administrator when you start it.

Once you've done that, make sure your settings are correct. Basically just open your splits, click on edit splits and make sure that the autosplitter is activated in the first place, then click on the settings button next to the autosplit activate button, and ensure the script path is correct. It should look something like this:
http://i.imgur.com/bLv2fXO.png

The Script Path should be your path to your livesplit folder \Components\LiveSplit.ToyStory2.asl

i.e. My Full path looks like this: C:\Users\Adam\Documents\Streamz\Livesplit\Components\LiveSplit.ToyStory2.asl

This is the most common issue. If you've downloaded splits from somewhere else, or ever moved around your livesplit directory, this value doesn't update properly, and you will have to do it manually.

 
  cheeseandcerealcheeseandcereal

hdc0:
So while I have the game running on my desktop, since you're already looking into it, maybe you would want to see if we can get this thing running on my laptop, which it currently isn't.

In summary: I'm not running dgVoodoo at all, and running your DirectDrawTest.exe (just normally in a folder), as well as in my Toy Story 2 install folder (including renaming to toy2.exe), all result in the same, normal result:

DirectDrawCreate returned 0x00000000 for GUID NULL
DirectDrawCreate returned 0x00000000 for GUID DDCREATE_EMULATIONONLY
DirectDrawCreate returned 0x00000000 for GUID DDCREATE_HARDWAREONLY
DirectDrawCreateEx returned 0x00000000 for GUID NULL
DirectDrawCreateEx returned 0x00000000 for GUID DDCREATE_EMULATIONONLY
DirectDrawCreateEx returned 0x00000000 for GUID DDCREATE_HARDWAREONLY

I ran your lua script in CE and got this:

ExamineDDEnumCallback: DirectDrawCreate returned 0x00000000 for device #0
ExamineDDEnumCallback: GetCaps returned 0x00000000 for device #0
Found 1 suitable DirectDraw devices

I went ahead and ran toy2.exe normally, adding the -log parameter and I got this:

http://pastebin.com/9zc62Gz6

Keep in mind this whole thing was done with the modified toy2.exe with the modified jmp command.

Still only getting the unable to enumerate a suitable device error.

Any thoughts?

 
  hdc0hdc0

The game only enumerates 8bpp and 16bpp modes and it looks like your graphics card only supports 32bpp modes.
There is a registry setting to make the game accept 32bpp modes too: Run
reg.exe add HKLM\Software\TravellersTalesToyStory2 /reg:32 /v allow32bit /t REG_DWORD /d 1 /f
and try again.
If you always want to enumerate the 32bpp modes regardless of the registry setting, go to offset 0xACA44 in toy2.exe and replace 0x74 with 0xEB.

I think it would be best to skip the whole code in the mode enumeration callback function that filters out incompatible modes. To do so, go to 0xAC9EB and replace 0x75 0x10 0xF6 0xC5 0x01 with 0xE9 0x18 0x01 0x00 0x00. If you do this, you don't have to use the 2 GB or 32bpp patch.

 
  cheeseandcerealcheeseandcereal

Beautiful.

This is amazing. Thanks so much for all your work looking into this! I can't tell you how much I (and I'm sure a lot of other people) appreciate it!

 
  PeterAfroPeterAfro

do you think something like this can be done for Buzz lightyear of Star Command (can make a thread for it in that game if desired)?

 
  cheeseandcerealcheeseandcereal

Do people have issues running that game? I haven't played it in a while, so I'm not entirely sure. Is there some common issue with not being able to run it?

 
  PeterAfroPeterAfro

it is the same deal as with this game, I am the only one who could not get it to work with dgvoodoo.

 
  cheeseandcerealcheeseandcereal

"Same deal"? That doesn't say a lot. Do you get the same exact message "unable to enumerate a suitable device?" What's the actual error message you're getting?

 
  hdc0hdc0

Open buzz.exe in a hex editor, go to B35DB and replace 75 10 F6 C5 01 with E9 18 01 00 00.

 
  PeterAfroPeterAfro

it runs but models are not showing up

 
  MasterLeoBlueMasterLeoBlue

I couldn't run BLoSC but then I got rid of DGVoodoo and ran it through D3DWindower and it worked just fine

 
  Xeon1822Xeon1822

Hi, how's it going. I used the dgVoodoo method last year and the game ran fine, I recently tried to get back into attempting runs and the resolution select screen no longer has the Toy Story 2 graphic, and when you select the graphics adapter and the resolution the text just overlays itself and crashes immediately. Any suggestions? I think it might just be an update to Windows 10 that ruined it.