![]() |
| | #16 |
| Rampaging 35 Stone Welsh Join Date: Apr 2007
Posts: 2,929
|
__________________ He is free, you say. Ah! That is his misfortune… These men… [have] the most terrible, the most imperious of masters, that is, need. … They must therefore find someone to hire them, or die of hunger. Is that to be free? - Simon Linguet |
| abachler is offline | |
| | #17 | |
| Super Moderator Join Date: Aug 2001
Posts: 7,472
| Quote:
__________________ If you aim at everything you will hit something but you won't know what it is. | |
| Bubba is offline | |
| | #18 | |
| Registered User Join Date: Oct 2009
Posts: 11
| Quote:
0xB800 is to text modes only Now... i have tested some other colors, and i dont see the light. do not worry this is only an exercise and if I could take this function of my brain, not copy & paste for mode 0x12 680x480x16 planar mode, I also get there in mode 0x101,later Code: /*
*** vbeMemCpy(...) ***
copy pixels one by one to all four planes
first to call this function
you may set
far Pointer to destination memory *dst
reserv buf where store the image *src
Set WriteMode to 3
MapMask Register to all four planes outpw(0x3c4,0x0f02)
BitMapRegister to all 8 bits outpw(0x3ce,0xff08)
set index reg to SetReset register outp(0x3ce ,0)
now
SetReset define de color outp(0x3f,*src++)
and cpu data define the index pixel *dst=i
*/
void vbeMemCpy(unsigned char far*src,unsigned char far*dst,unsigned int x,unsigned x1,unsigned int len){
unsigned char tmp;
unsigned char i,i1;
i=(0x80>>(x1&0x07)); // i= what pixel in the first 8 dst pixels?
i1=x&0x01; // i1=what pixel in the first 2 src pixels
if(i1)tmp=*src&0x0f;else tmp=*src>>4;
while(len--){
outp(0x3cf,tmp); //SetReset set color
tmp=*dst; // upload the latches
*dst=i; //set this bit in all 4 planes
i=(i>>1); // next pixel
i1++;
if(i==0){ i=0x80;dst++; }
if(i1&0x01)tmp=*src&0x0f;else{ src++;tmp=*src>>4;}
}
}
Last edited by joseCarlos; 10-29-2009 at 08:52 AM. Reason: add comment | |
| joseCarlos is offline | |
| | #19 | |
| l'Anziano Join Date: Aug 2001
Posts: 2,573
| Quote:
Do you just mean that you need a compiler that can compile to DOS? Every once in awhile I open up my old 13h graphics programs and recompile them and run them. I do it under Borland C++ 5.02 which is the IDE I developed them all on, and it compiles to DOS. I haven't tried doing it with Visual Studio or gcc...but I should try. I would need to change all the assembly code (which isn't that much honestly) to be in gcc's assembly format rather than Borland's. | |
| DavidP is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tools for finding memory leaks | stanlvw | C++ Programming | 4 | 04-03-2009 11:41 AM |
| Help with insert/delete binary search tree | Nazgulled | C Programming | 39 | 03-25-2009 04:24 PM |
| Problems with shared memory shmdt() shmctl() | Jcarroll | C Programming | 1 | 03-17-2009 10:48 PM |
| pointers | InvariantLoop | C Programming | 13 | 02-04-2005 09:32 AM |
| Onboard video card memory access | HermioneFan | Game Programming | 1 | 05-28-2003 09:53 AM |