PDA

View Full Version : DirectX on Windows XP



John87
24-06-2003, 03:45 PM
When i make a game in direct x it runs smooth on windows 98, then i play it on windows XP and the graphics are messed up, i must change to 16 bit to play but this costs to much fps.

Any help is greatly appreciated.

Alimonster
24-06-2003, 04:52 PM
You'll have to clarify some of the variables first before we can give a confident answer. First of all, you have to supply some of the following info:

DirectX version -- what version on Win98 versus XP
Computer -- same CPU?, graphics card, drivers involved
Resolution used
What consitutes "messed up" -- frame rates, glitches, etc.
EDIT: also, d3d or ddraw?

I can take a few stabs at it. Maybe v-sync is enabled for XP but not under 98. This would lock the framerate to given values (which should be smooth enough). The only time this would result in dodgyness would be if your app wasn't quite quick enough to meet the v-sync interval, which would result in alternating v-sync, (v-sync / 2), v-sync, (v-sync / 2) for your FPS -- perhaps enough to be a problem. Check under your graphics card properties (control panel->display->settings->advanced, usually).

Also, your timing could be out of whack - timeGetTime, if you're using it (and also Sleep) have a different resolution by default under NT systems. 9x variants have 1msec by default, but this has to be enabled under NT systems. If this sounds like your timing then take a look at the timeGetDevCaps/timeBeginPeriod/timeEndPeriod functions (in the mmystem unit), setting it to 1msec resolution -- source is available if you want.

Perhaps you are using different systems, but one has a dodgy QueryPerformanceCounter (known for some AMD systems, I forget which ones), then you may experience jumps every so often. If you're using that then Sly has a timer to take account of the discrepencies, so private message/otherwise bug him about it - I think the timer is sitting somewhere as an example at the Delphi games yahoo group (find the link at the sidebar of Turbo (http://turbo.gamedev.net)).

Perhaps it's texture memory if in 3d -- maybe your textures are too large for yer graphics card, so some can't get into video mem and you end up with lots of swapping. Test what happens when you reduce the texture sizes a little bit (e.g. 256x256 instead of 512x512).

Some NVidia cards had a driver bug that limited them to 60Hz refresh rate -- but that was for OpenGL only if memory serves, so it's probably not that. Nonetheless, try updating your graphics card drivers.

Any downloads would be handy to isolate whether it's your XP machine or not. I'm using XP here at home (incidentally, W00000h00, my home computer is finally up and running after about 2 weeks of being dead).

John87
24-06-2003, 05:21 PM
Thx for your reply,

the reason i didnt specify resolution, direct x version is because i have ran this on multiple systems. On all Windows XP systems it messes up in 8 bit mode. By 'messed up' i mean the bitmaps used are drawwed differently, it seems it uses only 16 colors.

I figured after testing on 10 windows XP systems, it is definately a Windows XP error. This computer has multi boot, works fine in Windows 98

Im using the delphiX set and the delphix timer so no tickcount(unless used by the delphix timer).

Resolution doesnt matter either, changing to 16 bit helps but I want as high fps as possible.

So that covers all ur possible reasons except the first one, im not sure where that is cause i didnt find it on the control panel.

I think there must be people out there using the delphiX that experience the same problem on Windows XP, But i know there is a solution cause i run other games fine in 8 bit mode.

I hope that is enough information, any help is very appreciated.

Edit:
DirectX version -- what version on Win98 versus XP
- Not sure how to check but if it helps i didnt update direct x, so standard at xp and 98
Computer -- same CPU?, graphics card, drivers involved
-same comp only different operating system, works on 98 does not work in xp
Resolution used
- tried all
What consitutes "messed up" -- frame rates, glitches, etc.
- images drawwed into 16 colors in 8 bit mode
EDIT: also, d3d or ddraw?
-not sure i have tried 3d on and off didnt matter, not sure what means ddraw

John87
24-06-2003, 05:31 PM
Also im not looking for a local solution, ie fixing it for running on my computer, im looking for a code so it fixes the problem on all machines.

Clootie
24-06-2003, 06:03 PM
Hm... I thought WindowsXP doesn't support accelerated mode for 256 color mode - only software emulation for VGA? At least on mine system I can't change video mode to 8bit - only 16&32bit modes available.
And besides - if your system is fast enought to run WinXP then it's fast enougth to run in High color mode. If your game is not fast enougth to run in 16bit mode then nobody will use it in WindXP as 256 color mode in WinXP is VERY BAD expierence.

John87
24-06-2003, 06:14 PM
Yea here it is possible to change to 8 bit, but u get that bad experience. However i run this game called Continuum and i select resolution: 1280x1024x8, where 8 is the bitcount. It works smooth on XP just like on 98. And that game is not lieing cause it has also the same fps.

And yes i could continue in 16 bit, it would be playable but i KNOW there is a solution to get into 8bit and make it twice as fast.