aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/bios.diff
blob: e53b8c73303af856062d137d481c29cf924ca4fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: rombios.c
===================================================================
RCS file: /cvsroot/bochs/bochs/bios/rombios.c,v
retrieving revision 1.108
diff -u -w -r1.108 rombios.c
--- rombios.c	9 Feb 2004 16:48:50 -0000	1.108
+++ rombios.c	16 May 2004 13:44:26 -0000
@@ -2254,6 +2254,7 @@
       type      = read_byte(get_SS(),buffer+1) & 0x1f;
       removable = (read_byte(get_SS(),buffer+0) & 0x80) ? 1 : 0;
       mode      = read_byte(get_SS(),buffer+96) ? ATA_MODE_PIO32 : ATA_MODE_PIO16;
+      blksize   = 2048;
 
       write_byte(ebda_seg,&EbdaData->ata.devices[device].device, type);
       write_byte(ebda_seg,&EbdaData->ata.devices[device].removable, removable);
@@ -3781,7 +3782,17 @@
           write_word(ebda_seg, 0x0022, mouse_driver_offset);
           write_word(ebda_seg, 0x0024, mouse_driver_seg);
           mouse_flags_2 = read_byte(ebda_seg, 0x0027);
+          if (mouse_driver_offset == 0 && 
+              mouse_driver_seg == 0) {
+              /* remove handler */
+              if ( (mouse_flags_2 & 0x80) != 0 ) {
+                  mouse_flags_2 &= ~0x80;
+                  inhibit_mouse_int_and_events(); // disable IRQ12 and packets
+              }
+          } else {
+              /* install handler */
           mouse_flags_2 |= 0x80;
+          }
           write_byte(ebda_seg, 0x0027, mouse_flags_2);
           CLEAR_CF();
           regs.u.r8.ah = 0;
@@ -4409,7 +4420,8 @@
   mouse_flags_2 = read_byte(ebda_seg, 0x0027);
 
   if ( (mouse_flags_2 & 0x80) != 0x80 ) {
-    BX_PANIC("int74_function:\n");
+      //    BX_PANIC("int74_function:\n");
+      return;
     }
 
   package_count = mouse_flags_2 & 0x07;