: 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)
:
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.
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
: 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.
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,
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
: 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
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
: 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:
:
:
:
:
:
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
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
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
: 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
:
: 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
: 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
15 matches
Mail list logo