Mail Archives: djgpp/2000/10/12/20:45:23
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
- Raw text -