On Mon, 18 Jun 2001, Willow Schlanger wrote:

> Why is this necessary? Programs (including DOSEMU) expect to be able to
> call C000:3 and _NOT_ any other ROMs to initialize the video subsystem.
> This is only true if you do what I have said above; also requiring the
> use of INT 80 (or any other INT) is won't be IBM VGA compatible and
> hence won't work with, for example, a Windows DOS box.

FYI a while ago I wrote a small program that scans /dev/mem for VGA
BIOSes: bytes 0,1 must be 0x55,0xAA and c[2] contains the size / 512.

Moreover, at offset 0x1e one should read "IBM".
This is true for the Elpin BIOS, but not true for Christophe Bothamy's
LGPL VGA bios.

/*
 * As some people were not that sure about the location and size of their
 * video bios (this is necessary for graphics on console configuration),
 * I've written this small automatic detection program.
 * You must (normally!) be root to execute it, as it needs read access
 * to /dev/mem.
 *
 */

#include <stdio.h>

int main ()
{
  FILE *f;
  int i;
  unsigned char c[0x21];

  f = fopen("/dev/mem","r");
  if (f==NULL) {
    printf("You must have read access to /dev/mem to execute this.\n");
    return 1;
  }
  for (i = 0xc0000; i < 0xf0000; i += 0x800) {
    fseek(f, i, SEEK_SET);
    fread(c, 0x21, 1, f);
    if (c[0]==0x55 && c[1]==0xaa &&
        c[0x1e]=='I' && c[0x1f]=='B' && c[0x20]=='M') {
      printf("$_vbios_seg = (0x%x)\n", i>>4);
      printf("$_vbios_size = (0x%x)\n", c[2]*0x200);
    }
  }
  fclose(f);
  return 0;
}

... Lots deleted ...

Bart


Reply via email to