Any chance to make SOM friendlier to DirectX9 and beyond?

#1
An unusual question for you all, more specifically to Holy Diver.

As we all know, SOM isn't too friendly for Windows XP and Vista. While the XP users can disable DirectDraw (I'm an XP user.) ‎  It's still very annoying to have to disable DirectDraw so the user can add an event/enemy/item to a part of the map, then re-enable it so the game can test-run decently. ‎  Maybe I'm doing it wrong, but that's how I have to handle things so I can test-run it through the map editor.

While one solution is to run the game via Virtual PC software, is there any chance that the game can be altered so it's more compatible for later versions of DirectX? ‎  If that is possible, then can we go further to make it more compatible for Vista?

A question for the curious.
Reply

#2
I can only offer you this sort of helpful trick.

If you set your in game graphics settings to 32 bit color, and a 1024 x 768 resolution you can sort of help the problem of enabling disabling the directx feature.

First do as described above, but the kicker is you have to have your windows desktop set to 1024 x 768 with true color settings. ‎  Then disable directx and relaunch SOM...open your map editor (which i currently working correctly) and then enable your direct x. ‎  You should be able to test the map, leave the test program and go back to the editor without having to disable directx. ‎  Now as long as you dont leave the map editor this will work... ‎  As long as your not forcing windows to change the size of the desktop or the bit depth of the color display, you should be able to keep the map editor from reverting back to the unusable mode (once you close and reopen though, youll have to disable and enable directx again).

This can save you time once you have all your items/objects/enemies etc registered.
- Todd DuFore (DMPDesign)
Site Founder
Reply

#3
I've actually thought a lot about the only way to do this. I even ordered a couple DX7 books. Unfortunately thinking about it might be as far as I ever get.

I was able to toss together a DLL that can pretend to be the directdraw dll, which is the library DX7 interfaces with for graphics. This isn't all that hard to do because there are only a few imported routines for most directx applications. There are several other hidden routines called by the imported routines, which fortunately I was just barely able to find signatures online for.

The problem is the DX APIs rely heavily upon C++ "virtual" functions (which is why there are only a few exports) ...For C apps there is a preprocessor way of simulating virtual functions (not that it matters)

Anyway this proxy dll (it routes the function calls to the real directdraw dll) is really more valuable because from within it I can theoretically have my way with the SOM runtimes' writable data segments (which will be awesome, if/when I ever find a way to reliably locate it)

It is possible however, that I could program my own set of virtual classes and have them mimic the DX interface perfectly each virtual function being interpreted so to do extra stuff to find out why things don't display properly. The thing is there is nothing wrong with SOM. What the real problem is Microsoft has not done a good job of keeping software built on older versions of DX functioning correctly. All of the DX7 calls are routed to DX9 or DX10, but not properly. The problem with the tools is they seem to mix GDI with DX which for some reason does not go over well with contemporary drivers. It's possible this is no longer possible, though I'd think there is some way to make it work with contemporary drivers. You'd think though if it was possible the drivers would make it work somehow. Another possibility is the graphics in the tool are just not being lit correctly, possibly making them appear to not be there when they really are (edited: in fact this is probably the case now that I think about it, because I do sometime see graphical artifacts when using the tools where the 3D graphics should be)

Aside from completely replacing the directdraw API, it should be possible (and fairly straight forward) I think to mix in our own graphics routines, so to add like simple under water and other atmospheric effects (like drawing a dark overlay under the water level and maybe distorting the view beneath that line) ...replacing the sky with something more appropriate, etc.

If you have the time I could put you on the right path for replicating the DX api. Personally I don't have the time and I try not to learn anything about DX if I can help it. If you could pull it off, I would take the time to route thru a superior APIs like OpenGL. There would also be merit in doing the same with Direct Sound and Direct Input, and probably other Direct Crap.
Reply

#4
(2009-09-29, 12:58 AM)dmpdesign link Wrote: I can only offer you this sort of helpful trick.

If you set your in game graphics settings to 32 bit color, and a 1024 x 768 resolution you can sort of help the problem of enabling disabling the directx feature.

First do as described above, but the kicker is you have to have your windows desktop set to 1024 x 768 with true color settings.? Then disable directx and relaunch SOM...open your map editor (which i currently working correctly) and then enable your direct x.? You should be able to test the map, leave the test program and go back to the editor without having to disable directx.? Now as long as you dont leave the map editor this will work...? As long as your not forcing windows to change the size of the desktop or the bit depth of the color display, you should be able to keep the map editor from reverting back to the unusable mode (once you close and reopen though, youll have to disable and enable directx again).

This can save you time once you have all your items/objects/enemies etc registered.

Is this why I don't have to disable directx anymore?? I swear on an old xp machine I pretty much only use to work with SOM anymore, at first I had to disable directx, but after I re-enabled it, the tools still worked right and the game runs at a fair enough (it is being accelerated for all the card on that machine can do) pace.


I had lowered the resolution so I could easily see the SOM tools.
Reply

#5
PS: Just curious, has anyone tried installing the DX7 drivers that come with the SOM disc set?
Reply

#6
I haven't.

Since I'm such a fluffin' hotkeyer, I manage to cut some of that time down quite a bit. ‎  MediaMonkey can go to my System Tray so I'm good with only having the proper windows and tabs selected... ‎  to where basically,

alt-tab, space, alt-tab

takes me from SoM, DX, SoM and hits the proper enable/disable switch, so I don't get a freeze.

...but its still annoying, cause sometimes I forget. ‎ 

*runs into a wall*

*hides his own Easter eggs*
[Image: banner.gif]

Probable mucosal damage may contraindicate the use of gastric lavage.
Reply

#7
That's interesting, I might try the trick out when I connect my old CRT monitor (using an LCD here.) for Dual Monitor purposes.

I didn't know that DirectX functions are mostly Virtual functions. ‎  Virtual functions are most (if not always) internal, correct? If so, you (or we) would have to make a Mock DLL that could take it's place?

As for the graphics not being lit correctly, can you expand on this?

As for making our own graphics routines, do we have to worry about compatibility issues for SOM? ‎  I don't have much experience with 3D applications. ‎  And another question to add: ‎  Are some 3D modeling programs incompatible with SOM? ‎  (Notably: ‎  Lightwave, 3DSMAX, etc.)

I have a lot of questions here, since I'm still a newbie at this. ‎  I hope there isn't too much trouble asking.

(If I am wrong on anything I say here, please correct me. :) )
Reply

#8
I forgot to mention that I might have found a fix for the Map Editor crashing Doh

I don't think the problem is an incompatibility with DirectX because I have run SoM on DirectX9 machines that don't crash.
It's a hardware conflict with the acceleration on modern video cards. A lot of older games have the exact same problem.

Anyways, right-click on desktop and go to properties > settings > advanced > troubleshoot and turn 'Hardware Acceleration' down 2-3 notches (or as many as are needed) and apply.

Just don't forget to turn it back up before you try to play Crysis, FarCy2 or such.
SOrry dindnt' meenshun urleer... ‎  me stupit ‎  Tongue
Reply

#9
Holy Crap John!

BRILLIANT! ‎ 

*runs outside and screams*

B-R-I-L-L-I-A-N-T-!-!-!-!

*throws a stick hard against a building*
[Image: banner.gif]

Probable mucosal damage may contraindicate the use of gastric lavage.
Reply

#10
Oh, that was it?

Well, I feel a little foolish, don't I?

Though, it would be more interesting to make an SOM game with more modern graphics. =P
Reply





Users browsing this thread:
4 Guest(s)