From: Ludvig Larsson Newsgroups: comp.os.msdos.djgpp Subject: Re: -= Hi RES GraphicS =- , This is one way Date: Mon, 07 Sep 1998 02:48:31 +0200 Organization: FAAS/GoldHart Lines: 63 Message-ID: <35F32D5F.1742@club-internet.fr> References: <35DA143C DOT CC91D2A9 AT hotmail DOT com> <35DA884C DOT 3DAF6A05 AT geocities DOT com> Reply-To: ludvig AT club-internet DOT fr NNTP-Posting-Host: angouleme1-154.club-internet.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 7 Sep 1998 00:50:17 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi. The mode for 640x480x16bit is in VESA 1.2: 0x111 But when I read Ralph Browns interruptlist there was marked that Diamond Stealth used 0x211. A friend of mine didn't get my code working on his Matrox VESA 2.0 card and well the workaround was to only to add 0x4000 to the mode(actually this sets the lineframe buffer, but it works anyway, If anybody knows Why...). Well: Use it as you like... int get_bank(int x,int y) /* for plot */ { return((x+y*1280)>>16); /* I think */ } int set_bank(int bank) { __dpmi_regs reg; if(bank!=active_bank) { reg.x.ax=0x4f05; reg.x.bx=0x0000; reg.x.dx=bank; reg.h.dh=0; __dpmi_int(0x10,®); active_bank=bank; } return(0); } int setmode(short mode) { int ret; __dpmi_regs reg; __dpmi_meminfo mi; int vesa_err; reg.x.ax=0x4f02; reg.x.bx=mode; __dpmi_int(0x10,®); ret=reg.x.ax; if(reg.h.al!=0x4f) goto_error("Videomode not supported."); if(reg.h.ah) goto_error("Failed to install videomode."); return(ret); } void plot16(int x,int y,unsigned int col) { int b; int offset=plot16_y[y]+x<<1; b=offset>>16; offset=(offset&0x0000FFFF)+0xA0000; if((x>=0)&&(x<640)&&(y>=0)&&(y<480)) { if(b!=active_bank) set_bank(b); _farpokew(_dos_ds,offset,col); } }