Jump to content

John Peterson

Fremen
  • Posts

    4
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Okay, I haven't seen that project. I'll have to take a look at it. My Dune 2000 copy came with the first release of DirectX 5 (4.05.00.0155, RC55) that was released around July 15, 1997. And there has been some changes to the DirectX header files and libraries since then so I keep batch files that switch between DirectX 5, 7 and 9 header files and libraries when I compile different programs with Visual Studio. But the functionality of all the old DDraw functions have been retained in the DirectX DLLs so I think one can fairly easily rewrite any software that use DirectX to compile with a newer SDK. I mainly use the DirectX 5 and 7 SDKs for their DDraw sample code, that I can test the DDraw hook I'm trying to create with. If you want a copy of those old SDKs I could probably lend you a copy of them since they are a little hard to find nowadays.
  2. Yes, please feel free to look at it and don't hesitate to post a SVN patch file for it if you figure out how to hook the other functions after the hkIDirectDraw::QueryInterface call. If someone can figure out how to get the hook to work, I could probably, with some trial and error, figure out how to modify the functions so that it outputs a higher and working resolution.
  3. It seems like the 640x400 mode fails with my monitor so it always use a 640x480 resolution, according to my monitor OSD. The problem is that it doesn't increase the picture size. It just creates big black borders. (It's the same in both version 1.02 and 1.06 by the way.) Update: Well, that was not entirely right. Now I'm pretty sure that the OSD can't be trusted for the difference between a 640x400 and a 640x480 resolution. Because a Print Screen showed that it's the 640x400 mode that works (when the game manage to use it), and it's the 640x480 mode that has the big black borders and the strange 'split screen'. In what file? The exe? Another file? Update: I came across a loader for another older game that was able to intercept DirectDraw functions to fix the output resolution and aspect ratio. So I copied the code to this new Google Code project with the hope of making the same kind of loader for this game. However, I ran into something of a snag, the program will not detect the call to ddraw.dll (or any other DirectX file). I'm guessing that it may be because that call is made from code that is stored in DUNE2000.DAT and that method of having the exe load code from a file like that confuses the interceptor. If you have any ideas about how to fix that please feel free to post a message about it here or in the project pages. Update: Okay I now noticed that the first project I made could only hook DirectDraw if ddraw.dll was built into the import table of the exe. But Dune 2000 loads it with LoadLibrary(). So now I made a DDraw_Wrapper project (that you can open from the DDraw_Wrapper.sln solution) that produce a custom made ddraw.dll wrapper that you can place in the directory of the game to override the regular ddraw.dll calls. I'm entirely new to these hooking procedures so there is currently a slight problem to hook the CreateSurface() or SetDisplayMode() and the other functions I need to change the display of the game. The game uses QueryInterface, and after that it doesn't seem like any other DirectDraw functions are picked up. I only get this from Dune 2000: 12:53:32:000: 12:53:32:000: ---------------------------------------------------------------- 12:53:32:000: DLLMain called and Log Opened 12:53:32:000: ---------------------------------------------------------------- 12:53:32:015: 12:53:32:015: 12:53:32:015: DirectDrawCreate: lplpDD = 0x00794184:0x0014B538:0x004A0537 12:53:32:015: DirectDrawCreate: lplpDD = 0x00794184:0x00E65D58:0x004A0537 12:53:32:015: hkIDirectDraw::EnumDisplayModes 12:53:32:031: hkIDirectDraw::Release 12:53:32:031: 12:53:32:031: 12:53:32:031: DirectDrawCreate: lplpDD = 0x00794184:0x001465B8:0x004A07F8 12:53:32:031: DirectDrawCreate: lplpDD = 0x00794184:0x00E65D58:0x004A07F8 12:53:32:031: hkIDirectDraw::QueryInterface 12:53:39:468: hkIDirectDraw::Release From a DirectX 5 SDK sample I get the functions I need, like in this log from the 'stretch' example (that does not use a full screen mode so it has no SetDisplayMode): 13:04:12:015: 13:04:12:015: ---------------------------------------------------------------- 13:04:12:015: DLLMain called and Log Opened 13:04:12:015: ---------------------------------------------------------------- 13:04:12:093: 13:04:12:093: 13:04:12:093: DirectDrawCreate: lplpDD = 0x0040438C:0x001565E0:0x004019E2 13:04:12:093: DirectDrawCreate: lplpDD = 0x0040438C:0x003567F0:0x004019E2 13:04:12:093: hkIDirectDraw::SetCooperativeLevel 13:04:12:093: hkIDirectDraw::CreateSurface 13:04:12:125: hkIDirectDraw::CreateClipper 13:04:12:125: hkIDirectDraw::CreatePalette 13:04:12:125: hkIDirectDraw::CreateSurface 13:04:16:812: hkIDirectDraw::Release Does anyone know what I need to do to hook the CreateSurface and SetDisplayMode and the other functions that I think Dune 2000 use? (I'm building my ddraw.dll and the test exes with the DirectX 5 includes and lib files, but I use a new DirectX 9 ddraw.dll to run the programs, if that makes any difference.)
  4. I have the same split screen problem. I have a Dell Inspiron 531 and a Samsung SyncMaster 940N monitor. You're right, that worked with my screen to. But only in the game, since the menus are still in 16 bit. It seems like when I use the 8 bit mode the 640x400 resolution works so that it doesn't revert to the 640x480 resolution, that always seems to result in the strange 'split screen'. I checked that the 8 bit resolution is 640x400 by taking a screen shot with the Print Screen key. Because my monitor's On Screen Display could not be trusted, it showed 640x480 for both resolutions. Probably because it's not designed to be able to display a 640x400 resolution at all. I can run the game in 16 bit in a VMWare installation of Windows XP or with Windows 98 in Virtual PC 2007. It works pretty well in both of those. After I added a custom 640x400 resolution in my NVidia Control Panel I could also use the 640x400 resolution normally. But it's a little unpleasant to always have the big borders that this solution creates on my monitor. Because it doesn't have any manual stretching option like most CRT screens have. And I could not find any driver level option of manually stretching the picture either. So unless I can patch this game somehow I'm stuck with the big black borders and a bad aspect ratio. That led me to start this Google Code project with the goal of making a loader for this game that can intercept the DirectDraw viewport functions to increase the output resolution and change the aspect ratio to full screen. It can already do that for Final Fantasy 8 (2000) but I could not get it to detect the ddraw.dll call. Does anyone have any ideas about that? I'm just mentioning this project here since I posted here before, but I'll move the main discussion about this loader to the Dune2K - High Resolution because it has already mentioned some advanced attempts to fix this game.
×
×
  • Create New...