• Please review our updated Terms and Rules here

VGA MODE X help....

Don't reinvent the wheel -- mode-x C libraries were written 2.5 decades ago. Here's a good one that works on 16-bit systems, although the optimizations require a 286: ftp://ftp.lanet.lv/pub/programming/mirror-x2ftp/xlib/xlib06.zip

If you REQUIRE 8086 compatibility you'll need to set .8086 in the assembler source and then fix anything the assembler says won't work on an 8086, which is usually easy to do but will slow things down a little.


what is the license of it?
 
You are asking what seem like simple questions but they have extremely complicated answers that won't make sense to you without some more background. You're asking the equivalent of "How do you build a house?", where a simple answer ("Nail boards together") doesn't help you one bit, and a complicated answer ("A reduction in the under-side of cogged joist-ends may be square, sloped or curved", etc.) won't make any sense to you.

Maybe you should start with regular old MCGA first? 320x200 in 256 colors, the memory segment is at A000 and each pixel is a single byte. It's dead simple to program in and understand and nearly impossible to screw up. Mode-X is much more complicated and isn't really something I'd tackle writing your own library for as your first project on an old PC. I think you would have better luck and results if you spent time getting existing Mode-X libraries ported over to Watcom C.

If you still want to learn Mode-X, here are a few places to start which may require grabbing books from amazon, ebay, or a library:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/faq/modex.faq

http://www.phatcode.net/res/224/files/html/ch47/47-01.html#Heading1 (This is the first chapter dealing with Mode-X; read them in order)

If you must have Mode-X and are hopelessly stuck, you could try the Fastgraph library, which has a free version (Fastgraph/Light) that lacks world coordinates and displays a message when your program starts up: https://www.fastgraph.com/fgdosfaq.html with downloads ("Fastgraph/Light for DOS") here: https://www.fastgraph.com/demos.html The documentation claims it supports Watcom C/C++ 9.x which will hopefully be compatible with OpenWatcom. The "full" library is a commercial product that must be paid for.
 
You are asking what seem like simple questions but they have extremely complicated answers that won't make sense to you without some more background. You're asking the equivalent of "How do you build a house?", where a simple answer ("Nail boards together") doesn't help you one bit, and a complicated answer ("A reduction in the under-side of cogged joist-ends may be square, sloped or curved", etc.) won't make any sense to you.

Maybe you should start with regular old MCGA first? 320x200 in 256 colors, the memory segment is at A000 and each pixel is a single byte. It's dead simple to program in and understand and nearly impossible to screw up. Mode-X is much more complicated and isn't really something I'd tackle writing your own library for as your first project on an old PC. I think you would have better luck and results if you spent time getting existing Mode-X libraries ported over to Watcom C.

If you still want to learn Mode-X, here are a few places to start which may require grabbing books from amazon, ebay, or a library:

http://ftp.lanet.lv/ftp/mirror/x2ftp/msdos/programming/faq/modex.faq

http://www.phatcode.net/res/224/files/html/ch47/47-01.html#Heading1 (This is the first chapter dealing with Mode-X; read them in order)

If you must have Mode-X and are hopelessly stuck, you could try the Fastgraph library, which has a free version (Fastgraph/Light) that lacks world coordinates and displays a message when your program starts up: https://www.fastgraph.com/fgdosfaq.html with downloads ("Fastgraph/Light for DOS") here: https://www.fastgraph.com/demos.html The documentation claims it supports Watcom C/C++ 9.x which will hopefully be compatible with OpenWatcom. The "full" library is a commercial product that must be paid for.

thank you thank you~
 
Back
Top