More SCSI commands (Blue Swirl).
[qemu] / pc-bios / vgabios.diff
1 Index: clext.c
2 ===================================================================
3 RCS file: /sources/vgabios/vgabios/clext.c,v
4 retrieving revision 1.10
5 diff -u -w -r1.10 clext.c
6 --- clext.c     25 Mar 2006 10:19:15 -0000      1.10
7 +++ clext.c     14 May 2006 20:49:29 -0000
8 @@ -544,6 +544,13 @@
9  cirrus_set_video_mode_extended:
10    call cirrus_switch_mode
11    pop ax ;; mode
12 +  test al, #0x80
13 +  jnz cirrus_set_video_mode_extended_1
14 +  push ax
15 +  mov ax, #0xffff ; set to 0xff to keep win 2K happy
16 +  call cirrus_clear_vram
17 +  pop ax
18 +cirrus_set_video_mode_extended_1:
19    and al, #0x7f
20  
21    push ds
22 @@ -1011,6 +1018,13 @@
23    jnz cirrus_vesa_02h_3
24    call cirrus_enable_16k_granularity
25  cirrus_vesa_02h_3:
26 +  test bx, #0x8000 ;; no clear
27 +  jnz cirrus_vesa_02h_4
28 +  push ax
29 +  xor ax,ax
30 +  call cirrus_clear_vram
31 +  pop ax
32 +cirrus_vesa_02h_4:
33    pop ax
34    push ds
35  #ifdef CIRRUS_VESA3_PMINFO
36 @@ -1479,6 +1493,38 @@
37    pop  bx
38    ret
39  
40 +cirrus_clear_vram:
41 +  pusha
42 +  push es
43 +  mov si, ax
44 +
45 +  call cirrus_enable_16k_granularity
46 +  call cirrus_extbios_85h
47 +  shl al, #2
48 +  mov bl, al
49 +  xor ah,ah
50 +cirrus_clear_vram_1:
51 +  mov al, #0x09
52 +  mov dx, #0x3ce
53 +  out dx, ax
54 +  push ax
55 +  mov cx, #0xa000
56 +  mov es, cx
57 +  xor di, di
58 +  mov ax, si
59 +  mov cx, #8192
60 +  cld
61 +  rep 
62 +      stosw
63 +  pop ax
64 +  inc ah
65 +  cmp ah, bl
66 +  jne cirrus_clear_vram_1
67 +
68 +  pop es
69 +  popa
70 +  ret
71 +
72  cirrus_extbios_handlers:
73    ;; 80h
74    dw cirrus_extbios_80h