RE: Microwindows for Hercules

1999-07-19 Thread Greg Haerr
: The code in devdraw.c is very naiive. It assumes pixel plotting is the underlyin : op. On many cards line slices are the underlying operation, horizontal or : vertical. What you probably want to do is generate a series of : : draw_horizontal(x,y,l) : : or : draw_vertical(x,y,l) :

Re: Microwindows for Hercules

1999-07-18 Thread Alan Cox
No need. MicroWindows handles the Bresenham algorithm in the mid level code in devdraw.c. It uses successive calls to drawpixel to make it work. In this way, people like you and me don't have to rewrite bresenham for every card someone wants The code in devdraw.c is very naiive.

RE: Microwindows for Hercules

1999-07-16 Thread Chipzz
No need. MicroWindows handles the Bresenham algorithm in the mid level code in devdraw.c. It uses successive calls to drawpixel to make it work. Hmm. A 8086 isn't quite a PC on which you want to loose performance. And that's exactly what you're doing here. PutPixel is a short routine

RE: Microwindows for Hercules

1999-07-16 Thread Greg Haerr
: The place where nano-X and microwindows spend at *least* 95% of their : pixel-pushing code is in drawing horizontal lines. All the demos but one : *never* draw a diagonal line, the only case where bresenham is used. I had : completed test cases to prove this... : : OK, granted.

RE: Microwindows for Hercules

1999-07-16 Thread Greg Haerr
A good idea, almost. The BOGL library performs this for the packed pixel :modes, but the VGA requires OUT instructions inbetween memory accesses, :so it can't run on a generalized bit-depth algorithm in planes mode. (The VGA :design has to be seen/studied to be believed,

Re: Microwindows for Hercules

1999-07-15 Thread Jakob Eriksson
On Thu, 15 Jul 1999, Greg Haerr wrote: : I am not really up to writing the driver myself because I have never writen a : driver before, but I will test it for you. I have 2 8086's with herc cards : in. Well, last night I took Jacob's hercules code samples and wrote

RE: Microwindows for Hercules

1999-07-15 Thread Greg Haerr
: I have examples on how to draw fast lines horizontal, vertical and : (x1, y1) - (x2, y2) using Bresenham. : These are in a book in asm. so I don't know about their copyright but : I think they are intended to be used, ie public domain. : Bresenham on Hercules is a little tricky. No

RE: Microwindows for Hercules

1999-07-15 Thread Jakob Eriksson
On Thu, 15 Jul 1999, Greg Haerr wrote: : I have examples on how to draw fast lines horizontal, vertical and : (x1, y1) - (x2, y2) using Bresenham. : These are in a book in asm. so I don't know about their copyright but : I think they are intended to be used, ie public domain. : Bresenham on

RE: Microwindows for Hercules

1999-07-15 Thread Greg Haerr
: That is fine for normal cards, but since Hercules cards are so ... strange... The VGA is *far* stranger, believe me, because of it's requiring more than 64k of video memory... : the algo is very optimized for the Hercules. : Example: : : : : :

Re: Microwindows for Hercules

1999-07-15 Thread Perry Harrington
If using writepixel, there need be 16 writes to videomemory. When using the native HGC linedraw, there need be only 4 writes to videomem. Also, the algo. uses an incrementing form of bresenham. Very standard, yes. But the incrementing scheme takes into account the bizarre HGC memory

Re: Microwindows for Hercules

1999-07-15 Thread Jakob Eriksson
On Thu, 15 Jul 1999, Perry Harrington wrote: Why not take the approach that Linux takes with the module: Create the driver structure, have the primitives referenced in the driver structure. If the driver doesn't implement a primitive, set the structure member to NULL, and the driver

Re: Microwindows for Hercules

1999-07-15 Thread Perry Harrington
sounds good. how much would it take to change/add microwin? That, I don't know, Greg? If someone's really going to take that approach (I assumed something like this was already being done), then I recommend modifying it a little for speed. Instead of leaving NULL in the table

RE: Microwindows for Hercules

1999-07-15 Thread Greg Haerr
: Why not take the approach that Linux takes with the module: : : Create the driver structure, have the primitives referenced in the : driver structure. If the driver doesn't implement a primitive, set : the structure member to NULL, and the driver loader will take care : to use the builtin

RE: Microwindows for Hercules

1999-07-15 Thread Greg Haerr
: : If someone's really going to take that approach (I assumed something : like this was already being done), then I recommend modifying it a : little for speed. Instead of leaving NULL in the table and having to : test it each time the function is being called, replace the NULL with : a

RE: Microwindows for Hercules

1999-07-15 Thread Greg Haerr
: Obviously it would be smart to fill it in. However you must set it to NULL : in the driver because of symbol resolution. : : As long as the device driver header file version matches with the one that : the microwin server uses, the offsets are known. : : Locating the symbols inside the