how would you do that chimpface?
Printable View
how would you do that chimpface?
Code:union REGS regs;
regs.h.ah = 0x00; /* function 00h = mode set */
regs.h.al = 0x13; /* 256-color mode 13h */
int86(0x10,®s,®s); /* do it! */
All I can say is...
Ouch.
Bear in mind that this is definitely 9x only - Win2K will stop it from doing that - that's why Worms doesn't work.
why does win2K do that???
Under Windows NT, direct hardware access is forbidden, as is disabling / enabling interrupts.
Ok. I'm planning on designing a GUI which is based OVER top of DOS. It'll look like windows(somewhat). I've already got the mouse manipulation routines, Now I need video mode stuff.
Chimpface, you seem like you know alot about this kind of stuff, so how would you set the mode to 256 color and 640x480, or 256 color and 800 x 600?
(About Win 2000/NT, I think that it's gay that direct hardware access is forbidden. Completely gay!:P)
Well, with NT you have interfaces onto all the hardware, and DirectX for multimedia.
The thing is that NT is designed for stability NOT compatibility. It's so that the OS cannot be brought down by software, which means that direct hardware access has to go.
Try this under NT and get a nice "priviledged instruction" error ;):
Code:int main() {
__asm cli
}
I don't have NT or win 2000, I've just got win95 and win98(2 PC's). I don't really have to worry about those OS's. I just think that that's stupid that hardware access is gone for those OS's. It sometimes can stop a programmer(you know what I mean).
No, but someone might run your program on NT and then you're a bit stuck :(
That's why I'm trying to move my development onto NT.
Sail3005--> If you are using a Borland Dev studio, a fullscreen console is made, if you choose Win32 Console in the AppExpert.
I am using vc++, but i have BC++ 5.5 and turbo c++ 3.0. Can these do that?
Ïf you only have the compiler, and not the IDE, I don't know... I'm not sure about TC, but if it supports Win32 Apps, then it should be possible! :)
what i meant is that i have Borland C++ builder 5, in other words, i paid for it and i DO have the IDE. So, how can i get it to go full screen?
The other day I found ALOT on Video cards and setting graphics modes. What kind of graphics are you looking for? If you want higher than 640x480x16color or 320x200x256color, then check out my VESA thread"
http://forums.vb-world.net/showthrea...threadid=59209
That'll help you out with VESA modes. I got source code with it as well.
Thanks Warmaster, i was kind of hoping that there was just a simple command or something, but i guess moving into heavier graphics is the only way to go.
Thanks again for the info.
You can use a simple function. But if you want VESA(higher than 640x480x16) You need to be sure the card is VESA compatible and you need to know what your card can take. Every VESA card (Even my 486's) I've seen can do 640x480x256color and possibly 16-bit(64K color). Use the following function:
void setVBEmode(int mode)
{
union REGS in,out;
in.x.ax = 0x4F02; /*VESA set mode(0x4F02) BIOS call */
in.x.bx = mode; /*Set Video mode */
int86(0x10,&in,&out);
}
For example, to change the VESA mode to 640x480x256 color call:
setVBEmode(0x101);
There you have it. I still recommend the sample as it does auto-detects for the VESA hardware & modes.