Article View: demon.tech.pc
Article #71387Re: How to detect video card type
From: John Naismith
Date: Sun, 03 Dec 1995 00:00
Date: Sun, 03 Dec 1995 00:00
85 lines
3453 bytes
3453 bytes
In article: <817836376snz@grove.demon.co.uk> "Donald R. Oddy" <donald@grove.demon.co.uk> writes: > > In article <816978470snz@siberia.demon.co.uk> > philip@siberia.demon.co.uk "Philip McNab" writes: > > >b) the BIOS functions/memory addresses that I could use to determine > > this? I'm a reasonably skilled C programmer, with Turbo C v2. You need to use function 1B if it's a VGA card. Function 4F, subfunction 00, if it's an SVGA card. These functions will return more info on the card than you'll ever want to know. The following table is for function 1B (VGA) : Register Call Value Return Value AH 1B AL 1B BX 0 DI buffer offset * ES buffer segment * * = buffer contents Offset Size Contents 00 dword address of table with BIOS function capabilities 04 byte video mode 05 word number of displayed character columns 07 word length of displayed range of video RAM 09 word start address of upper left column on monitor 0B 16 bytes 8 cursor positions for 8 screen pages 1B byte cursor end 1C byte cursor start 1D byte number of active screen page 1E word I/O address of CRTC address register 20 byte value of mode select register 21 byte value of palette register 22 byte number of displayed character lines 23 word height of displayed matrix in scan lines 25 byte code for active video combination 26 byte code for inactive video combination 27 word number of simultaneously displayed colours 29 byte maximum number of screen pages 2A byte number of scan lines (see below) 2B byte character table if attribute bit 3 = 0 2C byte character table if attribute bit 3 = 1 2D byte general status information 2E-30 3 bytes reserved 31 byte size of video RAM (see below) 32 byte save status No of scan lines : 0=200, 1=350, 2=400, 3=480 Size of video RAM : 0=64kB, 1=128kB, 2=192kB, 3=256kB It's thankfully a lot simpler with SVGA (function 4f,00) : Register Call Value Return Value AH 4F Status (00=OK, 01=Error) AL 00 4F (if supported) ES segment of info buffer DI offset of info buffer Offset Size Content 00 4 bytes "VESA" 04 word version 06 dword far pointer to manufacturer's name 0A 4 bytes implemented functions 0E dword far pointer to list of supported VESA modes and manufacturer's video modes 12 238 bytes reserved Notes on SVGA BIOS functions (4F) : a) The functions listed are located in the BIOS extension of SVGA adaptors. b) The SVGA BIOS moves the entry point for the INT10 handler of the system BIOS on the motherboard to INT42 upon booting. c) The additional SVGA BIOS functions are accessed as subfunctions of 4F. You *did* say that you were a reasonably skilled programmer. Have fun :) -- John Naismith
Technical Details
Message-ID:
<471886986wnr@naismith.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<816978470snz@siberia.demon.co.uk> <817836376snz@grove.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1036bc,a0ee412929675817 X-Google-Attributes: gid1036bc,public From: John Naismith <John@naismith.demon.co.uk> Subject: Re: How to detect video card type Date: 1995/12/03 Message-ID: <471886986wnr@naismith.demon.co.uk> X-Deja-AN: 121278098 x-nntp-posting-host: naismith.demon.co.uk references: <816978470snz@siberia.demon.co.uk> <817836376snz@grove.demon.co.uk> x-smtp-posting-host: post.demon.co.uk [Sun, 3 Dec 95 18:21:23 GMT] x-broken-date: Sun, 03 Dec 1995 17:59:43 GMT0BST1 organization: None reply-to: John@naismith.demon.co.uk newsgroups: demon.tech.pc