Mail Archives: djgpp/1999/08/06/19:35:25
> Has anybody done _easy_to_see_thru_ VESA routines.
> I can't seem to get the Pmode functions working and I'm not sure whether I
> set up the I/O correctly or whatever.
> I'm not really familiar with pmode and flat model code, descriptors, etc.
void initg(void)
{
FILE *f;
char *a;
short cfg;
__dpmi_meminfo mi;
union REGS inr,outr;
f=fopen("config.ini","r");
fscanf(f,"%d",&cfg);
fclose(f);
inr.w.ax=0x4f02;
inr.w.bx=0x101|0x4000;
int386(0x10,&inr,&outr);
mi.size=(unsigned long)307200*4;
mi.address=(unsigned long)cfg<<20;
__dpmi_physical_address_mapping(&mi);
__djgpp_nearptr_enable();
start=mi.address+__djgpp_conventional_base;
}
this should work; in config.ini should be the adress (in megabytes) of the
linear frame buffer, that's something i was too lazy to code :)
- Raw text -