Thread: WATCOM; Graphics Lib Problems

  1. #1
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709

    WATCOM; Graphics Lib Problems

    I've just started using WATCOM C_C++ and I'm having some troubles.

    I call _setvideomode and pass it the *best* video mode (based on struct videoconfig.adapter) and it works fine, but apparently the best mode for my adapter (FX5200) is 640x480x16. If I choose anything else (higher or lower, I wanted 800x600x256) my monitor goes on standby mode and I press space to turn it back on, and I never see my program.

    Now I don't want any replies like "use OpenGL" or "why are you using DOS" - I can work that out on my own, I want to work as close to the hardware as possible without all the arcane crap more modern API's put you through.

    I thought the problem might be something to do with my choice of target (I could have sworn I chose DOS16, but it turns out I'm using DOS32 with dos4gw extender).

    Any help appreciated as always
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    38
    If 640x480x16 is the highest your adapter can handle, then there is no way it can do 800x600x256.

    Your likely choices are:

    640x480x16
    320x200x256
    320x200x16

    and maybe some 320x240 or 640x400 hybrids.


    It shouldn't matter that you are using the DOS4GW 32 bit extender, though you should keep in mind that using DOS4GW puts you into protected 32 bit mode and causes problems with the mouse cursor (the workaround is to get the location of the cursor from the mouse driver and draw it yourself) and also prevents you from directly accessing the entire video buffer in SVGA modes without using some arcane (ASM) workarounds.

    Also, you really need to make sure the video adapter is VESA compliant and that you have a VESA driver loaded. Some specific adapters are supported (if I recall correctly) but VESA is a sure bet.

    ________
    Rutabega

  3. #3
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    968
    GeForce FX 5200?

    Your max settings should be 1600x1200x32, (i'm pretty sure)

    Something is fishy there :d
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    38
    If he's programming for DOS, then he almost certainly doesn't have any drivers for it, so the highest modes available are either 320x200x256 or 640x480x16. I would imagine that there have never nor will ever be a DOS driver written for that (or any modern) video adapter.

    Though he could try using a DOS VESA driver to get access to the SVGA modes.

  5. #5
    ---
    Join Date
    May 2004
    Posts
    1,379
    I don't think DOS modes go that high anyway, doesn't matter how good your video card is. (unless using a SVGA as said above)

  6. #6
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    OK guys thanks for the advice - I'll at getting a DOS VESA driver.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Well I tried two different "universal vesa drivers" and none of them worked - they both said my hardware was not compatible SVGA hardware.

    So if I want a higher resolution I'd have to use an API like OpenGL / DirectX?
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  2. Rendering problems (DirectX?)
    By OnionKnight in forum Tech Board
    Replies: 0
    Last Post: 08-17-2006, 12:17 PM
  3. egavga.bgi problem
    By sunil21 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 09-22-2003, 05:06 PM
  4. Open Watcom C/C++....
    By Nitrous in forum C++ Programming
    Replies: 5
    Last Post: 07-29-2003, 12:34 PM
  5. Im a Newbie with a graphics design problem for my simple game
    By Robert_Ingleby in forum C++ Programming
    Replies: 1
    Last Post: 11-23-2001, 06:41 PM