putpixel(int x, int y, int color, char*scr)
I also need a flip routine but how can this be done. Those i have made just generate a general page fault.
Please help me...
Thanks....
Posted 13 October 1999 - 01:33 AM
putpixel(int x, int y, int color, char*scr)
I also need a flip routine but how can this be done. Those i have made just generate a general page fault.
Please help me...
Thanks....
Posted 03 October 1999 - 10:03 PM
char *backbuffer;
...
backbuffer = (char*) malloc (64000);
...
*(backbuffer + x + y*320) = color;
(assuming 320x200x256 mode)
However, copying this to video memory is a bit trickier. As I don't have my sources nearby right now, I suggest that you check help (hmm... RHIDE's help will do nicely), function that could do the job is _dosmemput or something like that. You will need video memory's base address (0xa0000 - note 4 0's!) and it's size (64000 bytes) in addition of backbuffer address.
Of course, this isn't fastests possible way to do flipping, but faster methods are even trickier...
Posted 12 October 1999 - 07:47 PM
char *VirtualScreen=malloc(64000);
putpixel(x,y,color,0xa0000);
putpixel(x,y,color,VirtualScreen);
flip(0xa0000,VirtualScreen);
Is there some books which can help with this subject. Memory in protected mode is a bit confusing.
Thank you....