From: reboot AT fr2 DOT flashnet DOT it (Cristiano Muzi) Newsgroups: comp.os.msdos.djgpp Subject: HELP: vesa 2 & linear framebuffering Date: Tue, 08 Apr 1997 12:18:22 GMT Organization: Flashnet Lines: 64 Message-ID: <5id9j3$6sb@news.flashnet.it> NNTP-Posting-Host: ppp-1.fr2.flashnet.it To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I' m very new in djgpp, protected mode programming & vbe2 linear frame-buffering. I'm trying to use video-mode 640x480x256 with linear addressing, using near pointers; I'm following the instructions in djgpp tutorial by Remus Rutgers. Well, I set the video mode and I obtain the PhisBasePtr in the ModeInfoBlock. Then I convert it into a linear address in this way: __dpmi_meminfo mi; mi.size = (unsigned long)(ModeInfoBlock.XRes*ModeInfoBlock.YRes); mi.address = ModeInfoBlock.PhysBasePtr; __dpmi_physical_address_mapping(&mi); LinearAddress=mi.address; And then I try to put a pixel: unsigned char *VideoPtr = (unsigned char *)LinearAddress; __djgpp_nearptr_enable(); VideoPtr[XRes*Y+X+__djgpp_conventional_base]=C; __djgpp_nearptr_disable(); But it seems not to work :(( No pixel appears on the monitor. (the setmode function works fine, if I set mode without linear addressing and I write _farpokeb (_dos_ds,0xA0000+640*y+X,c) this works fine). Thank you, greetings, PS: Perhaps my problem is a problem of bios or videocard. A demo of Allegro 2.2 and a test program crash my pc when they try to use linear addressing :(( I have a dx2/66, a vlb cirrus logic 5428 and I use univbe 5.1. Is here my problem ?? Cristiano Muzi Fidonet Point: 2:335/610.11 +-----------------+ | Toro on the Net | + ^^^^^^^^^^^^^^^ +---------------------------------------+ | /=================================================\ | |-=> http://www.aginet.msoft.it/ospiti/torino/toro.htm <=-| | \=================================================/ | +---------------------------------------------------------+ | | | -=> ONE OF THE SCREAM TEAM <=- | | -=> http://www.logicom.it/scream/ <=- | +---------------------------------------------------------+