• Please review our updated Terms and Rules here

disable screen modes

evildragon

Veteran Member
Joined
May 29, 2007
Messages
1,646
Location
Tampa Florida
How can I disable certain modes of my VGA card, in DOS?

For my IBM Model 25's VGA mod, all modes work great, except EGA 350 line mode, that makes the CRT spazz out.. And sadly, some games will default to this mode, instead of a lower EGA resolution...

I don't want to chance harming the display, because it squeals real loud when a 350 line mode is enabled..

Is there a DOS command or TSR that can disable certain video modes? I can still use lower EGA modes, just not the 350 line one...
 
How can I disable certain modes of my VGA card, in DOS?

For my IBM Model 25's VGA mod, all modes work great, except EGA 350 line mode, that makes the CRT spazz out.. And sadly, some games will default to this mode, instead of a lower EGA resolution...

I don't want to chance harming the display, because it squeals real loud when a 350 line mode is enabled..

Is there a DOS command or TSR that can disable certain video modes? I can still use lower EGA modes, just not the 350 line one...

What you would need is a stub program to put a short IRQ 10h ISR (Interrupt Service Routine) sniffing at the modes being set. It would pass all the other modes through untouched, but immediately returned without changing anything for the mode you want suppressed. I don't know how well the game programs will recover from being thrown back from setting the mode, but at least they will be blocked from damage your monitor.
 
What you would need is a stub program to put a short IRQ 10h ISR (Interrupt Service Routine) sniffing at the modes being set. It would pass all the other modes through untouched, but immediately returned without changing anything for the mode you want suppressed. I don't know how well the game programs will recover from being thrown back from setting the mode, but at least they will be blocked from damage your monitor.
How would I go about doing this?
 
First step - get a book on assembly language programming and x86 PC architecture.
 
First step - get a book on assembly language programming and x86 PC architecture.
I'm asking if there's a program that already does this...

I know some x86 assembly, probably enough to do it myself, but I just want a quick solution if one already exists.
 
First step - get a book on assembly language programming and x86 PC architecture.

Yes, and a little legwork to get the numerical video mode (usually in hexidecimal) that ED wants to block. The program wouldn't even be that long. Maybe if the homework is done someone that is fluent in Assembler (the best way to do it) would come forward.
 
I'm asking if there's a program that already does this...

I know some x86 assembly, probably enough to do it myself, but I just want a quick solution if one already exists.

For this sort of specific issue you would be better writing your own routine if you know how to do it...
 
Ok, I haven't use my compilers for X86's in a long time, hope I remember how to use it.. I don't even remember what it was called :p

I'm fluent with 68k's, and SNASM, hopefully it'll be close enough (doubt it, but oh well)...
 
Ok, I haven't use my compilers for X86's in a long time, hope I remember how to use it.. I don't even remember what it was called :p

I'm fluent with 68k's, and SNASM, hopefully it'll be close enough (doubt it, but oh well)...

As Mike said, we are also talking PC architecture in how an ISR is installed. You need to identify the video mode as the computer knows it so that you can intercept it with your code. There will be particular BIOS calls and formats that need to be followed for the ISR.
 
As Mike said, we are also talking PC architecture in how an ISR is installed. You need to identify the video mode as the computer knows it so that you can intercept it with your code. There will be particular BIOS calls and formats that need to be followed for the ISR.
I have dumped the VGA BIOS, I can use this, correct? I'll try and ID the mode used...
 
I have dumped the VGA BIOS, I can use this, correct? I'll try and ID the mode used...

640 x 350? If more the basics it might be mode 10h. I thought at one point you said it was a Cirrus Logic video card, so it could also be 2Dh.

Your ISR will install for interurrupt 10h, and watch for AH = 00h (Set Video Mode), AL equal to the video mode you want to stop. All other AL values will be passed to the ISR code (from the video BIOS) pointer before you installed your ISR. If AL matches your "no-go" mode, then give a quick return back to the code that called it.

You don't have to clean up for your ISR unloading, just a reboot would clear it...
 
it's an Oak Technology card, and yes, 640x350..

what would be better would be if I could modify the CRT for 350 line mode, but that would be a BIG overhaul..

i'll give it a shot.. like i said, i'm just a tad rusty with X86 stuff, if I remember, it's a little more complicated than 68K coding..
 
UPDATE: It is 10h... My systems video modes are as follows:

00h: 40x25 70Hz
03h: 40x25 70Hz
04h: 320x200 70Hz
06h: 640x200 70Hz
10h: 640x350 70Hz (DEADLY MODE!!)
12h: 640x480 60Hz
13h: 320x200 70Hz

I'm still learning how to block the mode.. I want to implement a "fall-back", OR a "substitute" option.. Fall back doing what you said, go back to what was set previously, and my substitute would make 10h draw on a 12h screen (letter boxed?)...
 
Last edited:
Did you mean http://www.patrickaalto.com/lw2.html?

If not, please skip the rest and point me to some download URL.

It's not (graphics) mode 10h, but (text) mode 3 "tweaked" for 350 scan lines.
I wrote a small loader now to silence any "select vertical resolution" calls.

Try this:
  • rename current lw2.com to lw2.app
  • grab my loader from [removed by author]
  • unzip lw2ldr.zip to your LineWars II directory
  • run lw2.com and see what happens
 
Last edited:
Back
Top