1. SVGA Test
From: David Cuny
>BOOM!
>But it may not be your fault - the code (and SVGA) work just fine if I
>bring up the machine under Command Prompt Only. It only crashes the
>machine if it is running Win95. Grrr... This means that it is probably
>impossible to detect with a DOS call, since the problem is not with
>DOS...
Mmm...well scratch that idea then. There has to be some way to detect
it before setting it, though. Necessary, I think, if any of us are going to
make professional-like DOS-mode SVGA-capable programs.
That may require an include file full of tests for various cards, 'stub
implementations' and virtual device drivers... More than I know how to make
at the moment, anyway.
But until that exists, I'd recommend the convention of being able to
choose VGA or SVGA by a command-line parameter or program configuration menu
or something.
Eh, I'm going back to working on my PDF stuff for awhile.
Falkon
2. Re: SVGA Test
------ =_NextPart_000_01BD7741.E2C0AEE0
Falkon wrote:
> Eh, I'm going back to working on my PDF stuff for awhile.
Thanks anyway!
-- David Cuny
------ =_NextPart_000_01BD7741.E2C0AEE0
3. SVGA Test
- Posted by Falkon <Falkn13 at IBM.NET>
Apr 29, 1998
-
Last edited Apr 30, 1998
On second thought, I'm gonna backtrack here. :) Instead of expanding
my function, I chopped out all the other data. It's simpler this way, and
it ought to work for the problem. Note that it only checks for
VBE-compliant cards, proprietary SVGAs won't be recognized.
--------------------------------------------------------------
include machine.e
global function Video_Check()
--Check for presence of VESA VBE compatible/compliant video card
--Return 1 if it exists, 0 if it doesn't.
sequence registers -- The DOS registers
object dataaddr -- Address of the result data structure
registers = repeat(0,10) --clear registers
dataaddr = allocate_low(512) --allocate 512 bytes for data
registers[REG_DI] = dataaddr --tell it where to put the data
registers[REG_AX] = #4F00 --tell it to use the data-retrieval functi
registers = dos_interrupt( #10, registers )
free_low( dataaddr ) --free up the memory it was in
if registers[REG_AX] = #004F then
return( 1 )
else
return( 0 )
end if
end function
-----------------------------------------------------------
Just call that before you attempt to set the video mode.
if Video_Check() then
if graphics_mode( 257 ) then
puts( 1, "Mode 257 not supported on this SVGA card." )
abort( 1 )
end if
else
if graphics_mode( 18 ) then
puts( 1, "Mode 18 not supported on this VGA(?) card." )
abort(1)
end if
end if
Let me know if that crashes your computer, David. If so, I may have to
expand it after all...
Falkon
PS, if you want it to look less confusing, you could set it to return 0 on
success and 1 on failure like graphics_mode does...
4. Re: SVGA Test
------ =_NextPart_000_01BD741D.9D3F8020
Falcon wrote:
> <code for detecting no video support>
> Let me know if that crashes your computer, David. If so, I may have to
>expand it after all...
Thanks. I'll try to run it some time this afternoon (translate: in a couple of
hours).
-- David Cuny
------ =_NextPart_000_01BD741D.9D3F8020
5. Re: SVGA Test
Falkon wondered:
> Let me know if that crashes your computer, David.
BOOM!
But it may not be your fault - the code (and SVGA) work just fine if I =
bring up the machine under Command Prompt Only. It only crashes the =
machine if it is running Win95. Grrr... This means that it is probably =
impossible to detect with a DOS call, since the problem is not with =
DOS...
[Are you reading, Pete?]
But I've *never* had any problem running VGA mode apps under Win95, on =
any machine.
Thanks.
-- David Cuny