![]() |
|
ModeX in Win32 |
Chris Pable
Member #2,643
August 2002
![]() |
Is it possible to have modeX in an MSVC win32 app? I kinda really need modex cuz my program relies on speed. Id use DJPP but i have no clue what to download :\. I know its pretty stupid but if its possible or someone can help me find out what i need to get at DJPPs site. Id be very grateful. Thanks. -------- |
Goalie Ca
Member #2,579
July 2002
![]() |
isn't directx h-accell faster? Its all done by gpu rather than cpu. And transfers over the bus are limited that way too. ------------- |
Gabhonga
Member #1,247
February 2001
![]() |
djGpp can be found at www.delorie.com/djgpp/...heh, all you were lacking was a little gee... you know dos/modex is already considered "retro", and cause lots of problems & pain on very new systems (winXP will give up on modex I think)... -------------------------------------------------------- |
MindCode
Member #2,031
March 2002
![]() |
To directly answer the question: yes. At least I've dont it. What I did was use the Win32 Api function ChangeVidioState (i think that's what it was called) to the vga res 320x200:8bpp figuring that windows would revert to the vga setup. Then I used the asm calls to "tweak" the mode. It worked but I don't think it's a good idea to try; it might not work with all cards and operating systems. ______________________________________ |
Thomas Harte
Member #33
April 2000
![]() |
It definitely would not work with NT/2000/XP, which doesn't allow you direct hardware access. Also, I believe some drivers do supply card specific replacements for 320x200x8bpp. In this way, a graphics card for an XP machine need not be very VGA compatiable at all, supporting just whatever subset of the VGA functionality they have used for 640x480x4bpp mode. Perhaps if you explain the factors which make you want to use Mode-X even on windows machines, people can come up with alternatives? [My site] [Tetrominoes] |
Goalie Ca
Member #2,579
July 2002
![]() |
if it was soo good i'm sure it would appear in commercial games. there's no rhyme or reason for using it. ------------- |
Chris Pable
Member #2,643
August 2002
![]() |
The machines Im designing this for cant handle the installation of direct X 7 and above I think 6 might even be too high so Im not going to use that. Mainly because these machine cant handle it ^_^. Im talking 486s running at 33MHZ and windows 98 ^_^. 640x480 is WAY too much for them to handle. I wanted to design the game so it would have something like commander keen quality graphics and speed. SO I figured Mode X was the way to go. Keep in mind people with pentiums also should also be able tio use this if they are running win xp. So from what it sounds like... Im trying to do thew impossible >.< If anyone has any other ideas please let me know... PS so rry i havent check on this for a bit School started and I was bogged down with home work ^_^ -------- |
HoopsMan
Member #1,943
February 2002
|
If you can use the DirectX 5.0 SDK, I seem to remember it having a DIRECTX_USE_MODEX or some such flag. Check out the DirectX 5.0 SDK docs for more help. I think this flag was removed in the later versions of the SDK. It is specified in the video mode settings function. (again, SetDisplayMode from the DirectDraw interface or some such |
Thomas Harte
Member #33
April 2000
![]() |
In that case, all you are doing is allowing DirectX to use the super-slow Mode-X for 320x240 mode, rather than simply not listing it as an available mode if your graphics driver doesn't support it as a mode. It doesn't mean DirectX will necessarily use Mode-X, and as I implied if it does use Mode-X there will be a large speed hit. This is because DirectX makes the front buffer appear to be genuinely linear (all DirectX modes are), and then decodes to the funny Mode-X memory arrangement behind your back. [My site] [Tetrominoes] |
HoopsMan
Member #1,943
February 2002
|
From the DirectX 5.0 SDK, The IDirectDraw2::SetDisplayMode method sets the mode of the display-device hardware. HRESULT SetDisplayMode( Parameters dwWidth and dwHeight Width and height of the new mode. dwBPP Bits per pixel (bpp) of the new mode. dwRefreshRate Refresh rate of the new mode. If this parameter is set to 0, the IDirectDraw interface version of this method is used. dwFlags Flags describing additional options. Currently, the only valid flag is DDSDM_STANDARDVGAMODE, which causes the method to set Mode 13 instead of Mode X 320x200x8 mode. If you are setting another resolution, bit depth, or a Mode X mode, do not use this flag and set the parameter to 0. ******************* Also, The IDirectDraw2::SetCooperativeLevel method determines the top-level behavior of the application. HRESULT SetCooperativeLevel( hWnd Window handle used for the application. This parameter can be NULL when the DDSCL_NORMAL flag is specified in the dwFlags dwFlags One or more of the following flags: DDSCL_ALLOWMODEX DDSCL_ALLOWREBOOT DDSCL_FULLSCREEN DDSCL_NORMAL DDSCL_NOWINDOWCHANGES ************* Hope it helps. [EDIT] |
|