nanogui: Microwindows for Hercules


Previous by date: 16 Jul 1999 17:45:48 -0000 Re: ELKS v0.78 bugs fixed, Greg Haerr
Next by date: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr
Previous in thread: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr
Next in thread: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr

Subject: RE: Microwindows for Hercules
From: Chipzz ####@####.####
Date: 16 Jul 1999 17:45:48 -0000
Message-Id: <Pine.LNX.4.10.9907161924161.11098-100000@ace.ulyssis.student.kuleuven.ac.be>

On Fri, 16 Jul 1999, Greg Haerr wrote:

> From: Greg Haerr ####@####.####
> Subject: RE: Microwindows for Hercules
> 
>  
> : 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 and you
> : loose way to much time if you don't inline it...
> 
> 	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. Nevertheless, does this mean it has to be slow? Suppose in
the future someone writes a drawing program for ELKS, using the XOR algo
to draw lines (and erase them again as the mouse pointer moves).

> : > In this way, people like you and me don't have to rewrite bresenham for every
> : > card someone wants....
> : 
> : You wouldn't have to rewrite it for every -CARD-, you would have to re-
> : write it for every BIT-DEPTH. Which isn't that much work anyway.
> : 
> 	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, I've never seen such a complicated
> piece of hardware for something kinda-conceptually simple)

Hmm then that's something that could be checked for in between STOSB
instructions (or the like). We could for example use something like this
(just an idea), where ? is a flag that isn't used (maybe the carry flag?):

PUSH flags register
CLI
...
{If out needed} ST?
...
{Bresenham}
...
STOSB {or something like that, like OR}
LOOPN?
JN? :End
...
{Perform OUT}
...
LOOP
...

:End
...
POP flags register

We could of course also use something else than a flag, like a register,
if Bresenham doesn't already use all of them...
Just an idea, I never did VGA 4 bit programming, I always used mode 13h.

Which may be more of a problem is if we would use res > 320x200x256. These
don't fit in one page, and we would have to do page swapping. (Except if
we got a linear framebuffer). But there won't be many 8088-80286 that sup-
port those res anyway..

Chipzz AKA
Jan Van Buggenhout

(Sorry for the rusty asm ;-) )

--------------------------------------------------------------------------
                  UNIX isn't dead - It just smells funny
                  ####@####.####
--------------------------------------------------------------------------


Previous by date: 16 Jul 1999 17:45:48 -0000 Re: ELKS v0.78 bugs fixed, Greg Haerr
Next by date: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr
Previous in thread: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr
Next in thread: 16 Jul 1999 17:45:48 -0000 Re: Microwindows for Hercules, Greg Haerr


Powered by ezmlm-browse 0.20.