*** ibm8514.c.V	Fri Jan 15 13:28:42 1993
--- ibm8514.c	Wed Feb 17 16:07:58 1993
***************
*** 103,122 ****
  {
    DisplayModePtr pMode, pEnd;
    unsigned char config;
!       outp(0x3d4, 0x11);
!       outp(0x3d5, 0x00);
!       outp(0x3d4,0x38);
!       outp(0x3d5, 0x48);
  
!       outb(0x3d4, 0x36);
        config = inb(0x3d5);     /*    get amount of vram installed */
  
!       if ((config & 0x20) != 0 ) {
      
  	vga256InfoRec.videoRam = 512;
!       } else {
! 	vga256InfoRec.videoRam = 1024; 
        }
  
  
  	pMode = pEnd = vga256InfoRec.modes;
--- 103,147 ----
  {
    DisplayModePtr pMode, pEnd;
    unsigned char config;
!       outp(0x3d4, 0x11);  /* for register CR11, (Vertical Retrace End) */
!       outp(0x3d5, 0x00);  /*  set to 0 */
!       outp(0x3d4,0x38);   /* for register CR38, (REG_LOCK1) */
!       outp(0x3d5, 0x48);  /*  unlock S3 register set for read/write */
  
!       outb(0x3d4, 0x36);  /* for register CR36 (CONFG_REG1), */
        config = inb(0x3d5);     /*    get amount of vram installed */
  
!       if ((config & 0x03) == 0 ) { 
! 	ErrorF("This is an EISA card\n");
!       };
!       if ((config & 0x03) == 1 ) { 
! 	ErrorF("This is a 386/486 localbus card\n");
!       };
!       if ((config & 0x03) == 3 ) { 
! 	ErrorF("This is an ISA card\n");
!       };
! 
!       if ((config & 0x20) != 0 ) { /* if bit 5 is a 1, then 512k RAM */
      
  	vga256InfoRec.videoRam = 512;
!       } else { /* must have more than 512k */
!   
!         switch ((config & 0xC0)>>6) { /* look at bits 6 and 7 */
! 	  case 0:
! 	    vga256InfoRec.videoRam = 4096; 
! 	    break;
! 	  case 1:
! 	    vga256InfoRec.videoRam = 3072; 
! 	    break;
! 	  case 2:
! 	    vga256InfoRec.videoRam = 2048; 
! 	    break;
! 	  case 3:
! 	    vga256InfoRec.videoRam = 1024; 
! 	    break;
!         }
        }
+       ErrorF("%d K of memory found\n",vga256InfoRec.videoRam);
  
  
  	pMode = pEnd = vga256InfoRec.modes;
***************
*** 124,130 ****
  	  x386LookupMode(pMode, &vga256InfoRec);
        	  if (pMode->HDisplay * pMode->VDisplay > vga256InfoRec.videoRam*1024)
  	    {
! 	      ErrorF("Too less memory for all resolutions\n");
  	      return(FALSE);
  	    }
             if (pMode->HDisplay > 1024 || pMode->VDisplay > 768)
--- 149,155 ----
  	  x386LookupMode(pMode, &vga256InfoRec);
        	  if (pMode->HDisplay * pMode->VDisplay > vga256InfoRec.videoRam*1024)
  	    {
! 	      ErrorF("Too little memory for all resolutions\n");
  	      return(FALSE);
  	    }
             if (pMode->HDisplay > 1024 || pMode->VDisplay > 768)
