I need a fast Putpixel for 640x480x16 
Author Message
 I need a fast Putpixel for 640x480x16

Has anyone some code for a fast (wel at least faster than the one in the
graph unit), putpixel ? And if possible a fast(er) Putimage ? Both have
to work under 640x480x16 (VGA) mode. I need them for a program I'm
writing (yes, I WILL credit you if you can help me....), please drop me
a mail

 D.Manders, The Netherlands



Wed, 29 Jul 1998 03:00:00 GMT  
 I need a fast Putpixel for 640x480x16

Quote:

> Has anyone some code for a fast (wel at least faster than the one in the
> graph unit), putpixel ? And if possible a fast(er) Putimage ? Both have
> to work under 640x480x16 (VGA) mode. I need them for a program I'm
> writing (yes, I WILL credit you if you can help me....), please drop me
> a mail

Well, I had you problem once.
Finally, I've decided to write graphic interface in Assembler.
It's really not so difficult -
Most function are in VIDEO Interrupt.
The function that you need (putpixel, putimage, initializing etc...),
are very easy to write -
You just need to have / download the interrupt list, and use it.

You just need to remember, that if you're going to use assembler
functions, you should think of writting of hole interface -
There are some run-time problems when you're trying to use Initgraph
procedure with assembler putpixel function.
The option of using graphics initializing with assmbler and Borland
PutPixel, doesn't work at all !

So - if you really really need speed (are the Borland function REALLY too
slow for you?), think about it.

                         \|/  

/--------------------oOO-(_)-OOo---\
|   Kretzrt Lior                   |
|   Tel Aviv University            |
|   Israel                         |
|                                  |
|   E-Mail:                        |  

\----------------------------------/



Fri, 31 Jul 1998 03:00:00 GMT  
 I need a fast Putpixel for 640x480x16

Quote:


> > Has anyone some code for a fast (wel at least faster than the one in the
> > graph unit), putpixel ? And if possible a fast(er) Putimage ? Both have
> > to work under 640x480x16 (VGA) mode. I need them for a program I'm
> > writing (yes, I WILL credit you if you can help me....), please drop me
> > a mail

> ...

Ooopppsss !  I had the same problem, and asked help to the list but I'm
still waiting someone to write me :-(.  Here it is mode 12h ASM PutPixel
I use:

Procedure PutPixel(x,y:Word; c:Byte); Assembler;
Asm
  mov dx,$3ce
  xor al,al
  mov ah,c
 { and ah,$0f }  { Uncomment this line to use more than 16 colors }
  out dx,ax      { ... but in mode 12h you won't use more than 16 }
  inc al
  mov ah,$0f
  out dx,ax
  mov al,$08
  out dx,al
  Mov es,SegA000
  mov ax,y
  mov bx,ax
  shl ax,2
  add ax,bx
  shl ax,4
  Mov bx,x
  Mov cx,bx
  SHR bx,3
  Add bx,ax
  And cl,$07
  Mov al,$80
  Shr al,cl
  mov cl,al
  Mov dx,$3cf
  in  al,dx
  mov ch,al
  mov al,cl
  Out dx,al
  Mov ah,$ff
  Add bx,pageoffset
  Or es:[bx],ah
  mov al,ch
  Out dx,al
End;  { PutPixel }

Hope this helps you ... write and tell me about your progress in mode 12h, OK ??

Regards,
Aitor.

    ********  Hau ez da Espainia ... Euskal Herria Askatu !!!  *******
    ***  This is not Spain ... Freedom for the Basque Country !!!  ***



Fri, 07 Aug 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. I need a fast putpixel for 640x480x16 !

2. I need FAST putpixel and bar routines

3. Need fast putpixel-sequence for TP

4. Need fast putpixel-sequence for TP

5. Need help on a fast putpixel for 640x480x256

6. PUTPIXEL REPLACEMENT IN MODE 12h...THATS 640x480x16 (BGI-style)

7. FAST putpixel?

8. Looking for a FAST putpixel (mode 13h)

9. fastest putpixel

10. putpixel routine..help to make faster

 

 
Powered by phpBB® Forum Software