From: "Graham Reeds" Newsgroups: comp.os.msdos.djgpp References: <6v%E5.29784$L12 DOT 598411 AT news2-win DOT server DOT ntlworld DOT com> <8s49vu$k4l$1 AT slb6 DOT atl DOT mindspring DOT net> <8s4uou$381$1 AT slb7 DOT atl DOT mindspring DOT net> Subject: Re: VBE2.0 w/LFB + GCC Lines: 44 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 Message-ID: Date: Fri, 13 Oct 2000 01:22:29 +0100 NNTP-Posting-Host: 62.254.80.193 X-Complaints-To: abuse AT ntlworld DOT com X-Trace: news2-win.server.ntlworld.com 971397024 62.254.80.193 (Fri, 13 Oct 2000 01:30:24 BST) NNTP-Posting-Date: Fri, 13 Oct 2000 01:30:24 BST Organization: ntlworld News Service To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Okay. We are getting somewhere. It doesn't crash, and I do get pretty colours, but only in what appears to be the top 8th of the screen. If you hit a key once and leave it running the purple smiley face appears and then disappears back into the void. The mode set code now looks like this: /* get videomemory address */ meminfo.size = (unsigned long)(modeinfoblock.bytesperscanline * modeinfoblock.yresolution); meminfo.address = (unsigned long)modeinfoblock.physbaseptr; __dpmi_physical_address_mapping(&meminfo); __dpmi_lock_linear_region(&meminfo); videomemory = meminfo.address; /* try selectors */ videoselector = __dpmi_allocate_ldt_descriptors(1); __dpmi_set_segment_base_address(videoselector, videomemory); __dpmi_set_segment_limit(videoselector, modeinfoblock.bytesperscanline * modeinfoblock.yresolution); /* set up lfb frameend() */ remainder = (modeinfoblock.bytesperscanline * modeinfoblock.yresolution) / 4; frameend = &frameendlfb; And the new blitting function looks like: _movedatal(_my_ds(), (unsigned int)primarysurface->dsimage, videoselector, 0x00, remainder); Everything works fine, and the numbers are right. So now what's the problem? I've updated my source at http://homepage.dtn.ntl.com/grahamr/vbe2.0.zip if you want to take a look and help me out. Cheers. -- Stay Lucky, Graham "Mournblade" Reeds. ICQ No.: 30514803 http://homepage.dtn.ntl.com/grahamr