diff options
author | Jeroen Janssen <japj@xs4all.nl> | 2002-03-10 16:42:59 +0000 |
---|---|---|
committer | Jeroen Janssen <japj@xs4all.nl> | 2002-03-10 16:42:59 +0000 |
commit | 7ae4903125e01af820fe134823ff65684d181839 (patch) | |
tree | 8ecb395a917208b73eb5fd01f4a09495c16f9ff5 | |
parent | ce7b0e5fb4f6ae71fe40149dc0b96c543218336d (diff) | |
download | vgabios-7ae4903125e01af820fe134823ff65684d181839.tar.gz |
- show people when they do NOT have VBE support available
-rw-r--r-- | vbe.c | 37 |
1 files changed, 28 insertions, 9 deletions
@@ -87,6 +87,12 @@ _vbebios_info_string: .byte 0x0a,0x0d .byte 0x00 +_no_vbebios_info_string: +.ascii "NO Bochs VBE Support available!" +.byte 0x0a,0x0d +.byte 0x00 + + #ifndef DYN_LIST // FIXME: for each new mode add a statement here // at least until dynamic list creation is working @@ -201,10 +207,9 @@ static ModeInfoListItem* mode_info_find_mode(mode) */ Boolean vbe_has_vbe_display() { - outw(VBE_DISPI_IOPORT_INDEX,VBE_DISPI_INDEX_ID); - outw(VBE_DISPI_IOPORT_DATA,VBE_DISPI_ID0); + dispi_set_id(VBE_DISPI_ID0); - return (inw(VBE_DISPI_IOPORT_DATA)==VBE_DISPI_ID0); + return (dispi_get_id()==VBE_DISPI_ID0); } /** VBE Init - Initialise the Vesa Bios Extension Code @@ -236,12 +241,26 @@ void vbe_init() */ void vbe_display_info() { -#asm - mov ax,#0xc000 - mov ds,ax - mov si,#_vbebios_info_string - call _display_string -#endasm + // Check for VBE display extension in Bochs + if (vbe_has_vbe_display()) + { + #asm + mov ax,#0xc000 + mov ds,ax + mov si,#_vbebios_info_string + call _display_string + #endasm + } + else + { + #asm + mov ax,#0xc000 + mov ds,ax + mov si,#_no_vbebios_info_string + call _display_string + #endasm + + } } /** Function 00h - Return VBE Controller Information |