|
@@ -317,15 +317,6 @@ static int int13_get_extended_parameters ( struct int13_drive *drive,
|
317
|
317
|
return 0;
|
318
|
318
|
}
|
319
|
319
|
|
320
|
|
-struct int13_cdrom_specification {
|
321
|
|
- /** Size of packet in bytes */
|
322
|
|
- uint8_t size;
|
323
|
|
- /** Boot media type */
|
324
|
|
- uint8_t media_type;
|
325
|
|
- /** Drive number */
|
326
|
|
- uint8_t drive;
|
327
|
|
-};
|
328
|
|
-
|
329
|
320
|
/**
|
330
|
321
|
* INT 13, 4b - Get CD-ROM status / terminate emulation
|
331
|
322
|
*
|
|
@@ -336,6 +327,9 @@ struct int13_cdrom_specification {
|
336
|
327
|
static int int13_cdrom_status_terminate ( struct int13_drive *drive,
|
337
|
328
|
struct i386_all_regs *ix86 ) {
|
338
|
329
|
struct int13_cdrom_specification specification;
|
|
330
|
+ unsigned int max_cylinder = drive->cylinders - 1;
|
|
331
|
+ unsigned int max_head = drive->heads - 1;
|
|
332
|
+ unsigned int max_sector = drive->sectors_per_track; /* sic */
|
339
|
333
|
|
340
|
334
|
DBG ( "Get CD-ROM emulation parameters to %04x:%04x\n",
|
341
|
335
|
ix86->segs.ds, ix86->regs.di );
|
|
@@ -343,6 +337,12 @@ static int int13_cdrom_status_terminate ( struct int13_drive *drive,
|
343
|
337
|
memset ( &specification, 0, sizeof ( specification ) );
|
344
|
338
|
specification.size = sizeof ( specification );
|
345
|
339
|
specification.drive = drive->drive;
|
|
340
|
+ specification.cyl = ( max_cylinder & 0xff );
|
|
341
|
+ specification.cyl_sector = ( ( ( max_cylinder >> 8 ) << 6 ) |
|
|
342
|
+ max_sector );
|
|
343
|
+ specification.head = max_head;
|
|
344
|
+
|
|
345
|
+ DBG_HD ( &specification, sizeof ( specification ) );
|
346
|
346
|
|
347
|
347
|
copy_to_real ( ix86->segs.ds, ix86->regs.si, &specification,
|
348
|
348
|
sizeof ( specification ) );
|