Thread: dos acceleration

  1. #1
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49

    dos acceleration

    if you were to write a game for dos, would your game take advantage of a nice graphics card, or do you have to be in a higher operating system (ie windows) with graphics drivers installed, for a nice graphics card to be of any use ?

    thanks, and sorry if my question seems obscure.
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  2. #2
    Registered User Draco's Avatar
    Join Date
    Apr 2002
    Posts
    463
    For your program to take advantage of any graphics card features/acceleration you must be in an operating system such as windows, with the proper drivers. If you tried to program the use of your graphics card in DOS it would be hellatious, and the graphic restrictions of the DOS console would make anything you programmed unusable anyway

  3. #3
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    ok, thanks, i was just curious.

    i was just trying to figure out if there is a way to use assembly to make graphics go even faster.
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    http://www.masm32.com/

    you can use assembly with directx or opengl but using it wont make it go faster.

  5. #5
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    ah, then what is the point right? other than if i want to make my head explore. lol
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    you can use assembly with directx or opengl but using it wont make it go faster.
    But you can use vertex and shader assembler which does make it go faster.

    ah, then what is the point right? other than if i want to make my head explore. lol
    Because knowing assembly language well...will....IMHO make you a better programmer. In the end all that code is just pure assembly and if you know a little about how it all fits together you can program much more effectively...even in C/C++.

    I highly recommend at least learning assembly to the point that you can do simple small functions but more than that I recommend learning about the structure of Von Neumann architecture and the x86 family of CPUs.

    There are now high level vertex shader languages like HLSL and Cg that are like the C equivalent to writing a program in pure assembly. But knowing assembly, even if just a little bit, will never hurt you and it's time well spent. I can't even begin to explain how much it has helped me. Do I use it frequently? No. But it does help me produce better C/C++ code (at least I hope it does). I wouldn't worry so much about being able to write a pure assembly language program as that will probably never be required of you - but at least learn enough to write a function or two and be able to call those functions from C programs.

    There are some things in DirectX/OpenGL that assembly can indeed speed up. Otherwise half of the game companies out there would not require that you at least have some knowledge of assembler prior to qualifying for their programming positions. Assembler knowledge will also help you create your own 'languages' or scripting languages IMO.

    Just learn it. You won't regret it.

    Google for Randall Hyde's Art of Assembly Language Programming...and while it is old 16-bit, it is chocked full of enough information to turn you into an intermediate level assembler programmer. Porting to 32-bit is really not all that difficult, especially if you have the Intel x86 tech refs. They are available for download at www.intel.com

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > would your game take advantage of a nice graphics card
    It could, but you'd be locked to that specific make/model of graphics card, so your game would immediately have a much narrower audience.

    As well as being a 32-bit platform, windows (or linux for that matter with OpenGL) give you a nice consistent interface no matter what graphics card is underneath it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    ok cool, and when i stated
    ah, then what is the point right? other than if i want to make my head explore. lol
    i already know basic assembly, i actually learned it before i started c. so i was just saying how much longer it would take me to do stuff with assembly.

    thanks for all the info.

    --variable
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Then yeah you will not gain anything by just coding it in pure asm. Those days are long gone.

  10. #10
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    too bad in some ways, i always enjoyed writing in assembly, it felt like i was actually doing something, even if it did take me a couple hours to learn how to write a hello world app. i learned alot about hardware with assembly.
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  11. #11
    C maniac
    Join Date
    Aug 2004
    Location
    Cyberwarping to Middle Earth
    Posts
    154
    i've got a good DOS graphics library or two, if you want one

  12. #12
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    what kindof resolutions can u even achieve in dos?
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  13. #13
    ---
    Join Date
    May 2004
    Posts
    1,379
    Quote Originally Posted by variable
    what kindof resolutions can u even achieve in dos?
    lol why do you even care?

  14. #14
    the lowly newb
    Join Date
    Jan 2005
    Location
    IL
    Posts
    49
    because dos is nostalgic to the max, and i was interested in what it can still do.
    "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life."

    "They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance."

    "Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds the darkness has always got there first, and is waiting for it."
    [all]- Terry Pratchett

  15. #15
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Nothing.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  2. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  3. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 07:14 PM