[PATCH] winedos: Implement INT2F/AX=1501 (get drive device list)

Petr Tesarik hat at tesarici.cz
Tue Apr 11 12:35:17 CDT 2006


Hi folks,

another DOS CDROM device driver patch (there are still some more to
come).

ChangeLog:

* dlls/winedos/int2f.c:
winedos: implement INT2F/AX=1501 (get drive device list)
-------------- next part --------------
Index: int2f.c
===================================================================
RCS file: /home/wine/wine/dlls/winedos/int2f.c,v
retrieving revision 1.10
diff -u -r1.10 int2f.c
--- int2f.c	11 Apr 2006 10:07:08 -0000	1.10
+++ int2f.c	11 Apr 2006 17:32:11 -0000
@@ -972,6 +972,27 @@
        SET_CX( context, (drive < 26) ? drive : 0 );
        break;
 
+    case 0x01: /* get drive device list */
+       {
+           CDROM_HEAP*          cdrom_heap = CDROM_GetHeap();
+           CDROM_DEVICE_HEADER* dev = &cdrom_heap->hdr;
+           SEGPTR ptr_dev = ISV86(context)
+               ? MAKESEGPTR( cdrom_heap->cdrom_segment,
+                             FIELD_OFFSET(CDROM_HEAP, hdr) )
+               : MAKESEGPTR( cdrom_heap->cdrom_selector,
+                             FIELD_OFFSET(CDROM_HEAP, hdr) );
+
+           p = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Ebx);
+           for (drive = 0; drive < dev->units; drive++) {
+               *p = drive; /* subunit */
+               ++p;
+               *(DWORD*)p = ptr_dev;
+               p += sizeof(DWORD);
+           }
+           TRACE("Get drive device list\n");
+       }
+       break;
+
     case 0x0B: /* drive check */
        SET_AX( context, is_cdrom(CX_reg(context)) );
        SET_BX( context, 0xADAD );


More information about the wine-patches mailing list