Date: Thu, 25 May 1995 08:30:55 +0300 From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) To: jimh AT minerva DOT cis DOT yale DOT edu Subject: Re: Graphics Cc: djgpp AT sun DOT soe DOT clarkson DOT edu > Before I ask though, would it be impolite to express my > frustration in trying to find out any information myself. (Does anyone > else agree?) I have found 3 faq lists, and have the docs, but it still I must say I agree only partially. You've happened to hit the single most undocumented field in DJGPP: the graphics library routines. To learn about them, you'd probably need to look at the header files (to find the names of the functions), then read their sources (in the file djlsrc112.zip). Use nm program to find what source files you need from the (quite large) library source archive. Maybe you could add the necessary docs once you get past the learning curve? > 1). One faq I have says one should set up the modes same as with > real mode programming. Another says I need a GrSetMode() function. i do > not even know what GrSetMode is, and it is not found using 'info libc'. > Looking in the header file, I found that it has three inputs, 'height', > 'width', and 'mode' (I think). But I do not know what these are for. > > 2). One faq says I must write to 0xd0000000, the other says I > must use some sort of technique to allow me to write to usual addresses. Always use the latest FAQ, from faqNNN.zip (where NNN is the version number, currently at 101). Even if it's incorrect or unclear in some minor point(s), this is the only one which is maintained and updated. If you find something incorrect there, please tell me. AFAIK, all the info about graphics which is in the FAQ is correct. > 3). Some places I have read claim I need a graphics driver? I > have always avoided using them, and just wrote directly to video memory > (for speed). Do I need one? You do, unless your VGA supports VESA BIOS extensions. The FAQ explains why. > By the way- so far, I think I have set the mode correctly, but > when I tried something like this- > > asm(" > mov $1, %ax; > mov $0xd0000000, %ebx; > mov ax, (%ebx); > ") > > I just get a blank screen. If you didn't call GrSetMode(), you won't get any results. Again, explained in the FAQ. Also, don't use hard-wired accesses, use the farptr functions as explained in the FAQ, because DJGPP v2.0 (the next release) won't allow the above code.