Mail Archives: djgpp/1999/03/25/04:16:24
From: | vern <vern AT iocc DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | more problems settings the correct mode
|
Date: | Wed, 24 Mar 1999 21:59:42 -0600
|
Organization: | Posted via RemarQ Communities, Inc.
|
Lines: | 68
|
Message-ID: | <36F9B4AD.A5FE0B52@iocc.com>
|
References: | <36F8F860 DOT 5E2F109F AT iocc DOT com>
|
NNTP-Posting-Host: | 204.214.235.179
|
NNTP-Posting-Date: | Thu, 25 Mar 1999 04:05:00 GMT
|
X-Trace: | 922334700.365.37 Z.MU6KIEIEBB3CCD6C usenet1.supernews.com
|
X-Complaints-To: | newsabuse AT remarQ DOT com
|
X-Mailer: | Mozilla 4.5 [en] (Win95; I)
|
X-Accept-Language: | en
|
MIME-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Okay, i have allegro downloaded, unzipped, and compiled.
i looked through the documentation, and i found that to set the graphics
mode, you use hte set_gfx_mode() function.
my latest problem is that whenever i run my program, it crashes and i have
ot completely reset my computer. (ctrl-alt-del doesnt work). In my code,
after the function call to set my mode, i have several function calls that
print pixels on the screen, to test that everything is working. i dont see
the pixels on the screen at all before it locks up (i think theres something
wrong with the way im calling the function that changes hte mode).
here is what im currently using to set the mode:
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
my aim is to set it at 640x480 resolution. i couldnt care less how many
colors i have to work with, as long as its 256 colors or more.
there is a test program that comes wiht allegro that shows which modes you
can use on your computer. here is the output of the program, for proof i
can achieve the resolution:
Mode 0x14 : 132x25 4 bpp text
Mode 0x109: 132x25 4 bpp text
Mode 0x10A: 132x43 4 bpp text
Mode 0x100: 640x400 8 bpp packed pixel
Mode 0x101: 640x480 8 bpp packed pixel
Mode 0x102: 800x600 4 bpp planar
Mode 0x103: 800x600 8 bpp packed pixel
Mode 0x104: 1024x768 4 bpp planar
Mode 0x105: 1024x768 8 bpp packed pixel
Mode 0x106: 1280x1024 4 bpp planar
Mode 0x107: 1280x1024 8 bpp packed pixel
Mode 0x110: 640x480 15 bpp direct color (RGB 555)
Mode 0x111: 640x480 16 bpp direct color (RGB 565)
Mode 0x112: 640x480 24 bpp direct color (RGB 888)
Mode 0x113: 800x600 15 bpp direct color (RGB 555)
Mode 0x114: 800x600 16 bpp direct color (RGB 565)
Mode 0x115: 800x600 32 bpp direct color (RGB 888)
Mode 0x116: 1024x768 15 bpp direct color (RGB 555)
Mode 0x117: 1024x768 16 bpp direct color (RGB 565)
Mode 0x76 : 640x480 32 bpp direct color (RGB 888)
seeing the mode numbers off to the left side, i also tried ot use the old
setmode function i was using before i had allegro. the call to the funciton
in my code looks liek this:
setmode(0x111);
here is the code for the function, which requires either the <dpmi.h> header
file or the <sys/movedata.h> file (not sure which)
void setmode(int mode)
{
__dpmi_regs r;
r.x.ax = mode;
__dpmi_int (0x10,&r);
}
i tried this, and my computer locked up, AGAIN. (ive rebooted at least 20
times in the last hour or so)
does anyone have ANY clue whatsoever is going wrong? is it in the way im
calling the allegro function? oh yeah, while im thinking of it, i have the
<allegro.h> header file included, and i compile my program using -lalleg at
the end.
Thanks,
Andy. F.
p.s., if oyu need ot know anything about my system specs its in the message
i posted just above, earlier today.
- Raw text -