@@ -469,7 +469,7 @@ function IDEInterface(device, cpu, buffer, is_cd, device_nr, interface_nr, bus)
469
469
this . sector_count = 0 ;
470
470
471
471
/** @type {number } */
472
- this . head_count = this . is_atapi ? 1 : 0 ;
472
+ this . head_count = 0 ;
473
473
474
474
/** @type {number } */
475
475
this . sectors_per_track = 0 ;
@@ -487,7 +487,13 @@ function IDEInterface(device, cpu, buffer, is_cd, device_nr, interface_nr, bus)
487
487
this . sector_count = Math . ceil ( this . sector_count ) ;
488
488
}
489
489
490
- if ( ! is_cd )
490
+ if ( is_cd )
491
+ {
492
+ // default values: 1/2048
493
+ this . head_count = 1 ;
494
+ this . sectors_per_track = 2048 ;
495
+ }
496
+ else
491
497
{
492
498
// "default" values: 16/63
493
499
// common: 255, 63
@@ -510,6 +516,7 @@ function IDEInterface(device, cpu, buffer, is_cd, device_nr, interface_nr, bus)
510
516
//{
511
517
// this.cylinder_count = 16383;
512
518
//}
519
+
513
520
var rtc = cpu . devices . rtc ;
514
521
// master
515
522
rtc . cmos_write ( CMOS_BIOS_DISKTRANSFLAG ,
@@ -527,6 +534,7 @@ function IDEInterface(device, cpu, buffer, is_cd, device_nr, interface_nr, bus)
527
534
rtc . cmos_write ( reg + 7 , this . cylinder_count >> 8 & 0xFF ) ;
528
535
//rtc.cmos_write(CMOS_BIOS_DISKTRANSFLAG,
529
536
// rtc.cmos_read(CMOS_BIOS_DISKTRANSFLAG) | 1 << (nr * 4 + 2)
537
+
530
538
}
531
539
532
540
/** @const */
0 commit comments