From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: bitblt and graphics Date: Mon, 29 Jan 2001 23:35:37 -0500 Lines: 80 Message-ID: <955g8o$flh7n$1@ID-57378.news.dfncis.de> References: <3a763783 AT leia DOT ktsnet DOT com> NNTP-Posting-Host: ip34.rochester6.ny.pub-ip.psi.net (38.26.84.34) X-Trace: fu-berlin.de 980829274 16434423 38.26.84.34 (16 [57378]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com bitblt either stands for bit blitting or bit block *something*... Can not remember which one. Anyway, it's more about putting images from memory to screen, getting them back and this sort of stuff. This is called so weired because in different gfx modes a pixel is represented by different numer of bits and there might be even extra complications (if you want to know more about this -- just download Richard Wilton's book on gfx programming from my site and see what exactly is about for 16-color EGA/VGA gfx modes - a lot of fun with banks, latches, etc). Usually the fastest way to put a pixel is just o modify a single (or as many as required) bytes in the video buffer and skip all those BIOS functions. 16-bit programs suffer from one problem... It's a segment size, which is 64KB. A window to gfx card memory has a max size of 64KB which is perfectly okay for real mode and segment size of 64KB. So in order to put a single pixel somewhere on the screen in modes like 640x480x8bpp you will have to switch banks since you can not use Linear Frame Buffer (LFB) feature even if it's available on your VESA-compatible card. gfx card's memory doesn't apear to a DOS program as just a linear array. It can not be linear for a real-mode DOS program, if the array size is more than 64KB (like in case of 640x480x8bpp and modes with larger resolutions). It will be faster in case of a 32-bit DPMI-program if LFB is present. Good Luck -- Alexei A. Frounze alexfru [AT] chat [DOT] ru frounze [AT] ece [DOT] rochester [DOT] edu http://alexfru.chat.ru http://members.xoom.com/alexfru/ http://welcome.to/pmode/ "Cody" wrote in message news:3a763783 AT leia DOT ktsnet DOT com... > Although this doesn't have much to do with djgpp, it has something to do > with programming general, and I think that many people in this newsgroup > would know the solution to my problems. I program mostly in dos, and only > for less than a year in it. I was wondering what does the term bitblt mean? > I have seen it in windows and dos newsgroups. How exactly does it work, the > exact specifications of it, such as how does it work, how can I implement it > the fastest (speed wise for my programs) in a 16-bit application? I am > asking this because I need to know it for my (small) graphics library that > I'm making. I program mostly in turbo pascal, but if somebody here can > explain everything I need in c++ then I understand it also. I'm tired of > using the slow and cumbersome borland's graphical interface (egavga.bgi). > However, I found some procedures such as xorput, orput, copyput, etc. in the > .bgi that I believe are somewhat faster in doing animation than simply > drawing a picture, putting black pixels all over the original spot, drawing > it somewhere else, erasing that with black pixels.... you get the picture. > If anyone in here has experience with bitblt, orespecially if you have > experience with dos graphics, then please email me or reply to this > newsgroup with help. Thanks for your time, and I look forward to all > constructive replies. Also, if anyone knows the fastest routines/algorithms > for basic graphical functions in dos, then I'd be more than happy to discuss > then with you. If anyone is on msn messenger and knows something about > graphics in dos, then I wish I could ask you some questions. Also, if > anyone knows the FASTEST way to put a pixel in a 16-bit app, I would like to > know it also. I also need to know how to change to the following video > modes (keep in mind it's 16-bit... if that has anything to do with it): > 320x200x256,320x240x256,640x480x256,800x600x256, although the last one's not > as important. I also need to know how to change make to text mode (80x25). > Any help on these topics would be much appreciated. > p.s. I have the allegro gaming library, and djgpp, and they are both > excellent resources. However, I'm trying to create my own from scratch > (nothing like allegro of course) so that I have a better understanding of > how it all works. Thanks for your time all, and I hope that noone's pissed > at me for putting this in djgpp newsgroup. > >