Mail Archives: djgpp/2001/01/27/21:36:32
From: | "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: switching to 320 x 200 mode in DJGPP
|
Date: | Sat, 27 Jan 2001 21:32:00 -0500
|
Lines: | 77
|
Message-ID: | <950090$fks4u$1@ID-57378.news.dfncis.de>
|
References: | <94vta8$pea$1 AT planja DOT arnes DOT si>
|
NNTP-Posting-Host: | ip20.rochester6.ny.pub-ip.psi.net (38.26.84.20)
|
X-Trace: | fu-berlin.de 980649057 16412830 38.26.84.20 (16 [57378])
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Read either the FAQ for DJGPP and this NG (I believe there's some info or at
least a link) or another FAQ on gfx programming at
http://www.castle.net/~avly/djgfx.html .
In short, you don't have identical linear -> physical address mapping.
Basically, this is because of the memory management either due to windows or
whatever OS and DPMI server is running.
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
frounze [AT] ece [DOT] rochester [DOT] edu
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/
"David Krmpotic" <David DOT Krmpotic AT guest DOT arnes DOT si> wrote in message
news:94vta8$pea$1 AT planja DOT arnes DOT si...
> simple newbie problem:
> I'm using DJGPP and I don't know how to use 320x200 graphic mode...
> here's my example:
>
> #include <stdlib.h>
> #include <conio.h>
> #include <stdio.h>
> #include <string.h>
> #include <malloc.h>
> #include <dpmi.h>
>
> void* vga = (void*)0xa000;
>
> void setMCGA() {
> __dpmi_regs r;
> r.h.ah = 0x00;
> r.h.al = 0x13;
> __dpmi_int (0x10, &r);
> }
>
> void setText() {
> __dpmi_regs r;
> r.h.ah = 0x00;
> r.h.al = 0x03;
> __dpmi_int (0x10, &r);
> }
>
> void clearScreen(unsigned char col)
>
> memset(vga, col, 320*200);
> }
>
> /*void putPixel (int x, int y, unsigned char col) {
> memset(vga + x + (y * 320), col, 1);
> }*/
>
> int main() {
> setMCGA();
> clearScreen(4);
> setText();
> return 0;
> }
>
>
>
> it cold boots computer... when clearScreen function is called....
>
> I believe you'll see where the problem lies in no time... so ....
> please :)
>
>
>
> david
>
>
>
>
- Raw text -