src/emu/machine/idectrl.c
| r8192 | r8193 | |
| 1912 | 1912 | if (!ide->disk) |
| 1913 | 1913 | { |
| 1914 | 1914 | ide->handle = mess_hd_get_chd_file( device->machine->device( "harddisk" ) ); // should be config->master |
| 1915 | | ide->disk = mess_hd_get_hard_disk_file( device->machine->device( "harddisk" ) ); // should be config->master |
| 1916 | 1915 | |
| 1917 | | if (ide->disk != NULL) |
| 1916 | if (ide->handle) |
| 1918 | 1917 | { |
| 1919 | | const hard_disk_info *hdinfo; |
| 1918 | ide->disk = mess_hd_get_hard_disk_file( device->machine->device( "harddisk" ) ); // should be config->master |
| 1920 | 1919 | |
| 1921 | | hdinfo = hard_disk_get_info(ide->disk); |
| 1922 | | if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE) |
| 1920 | if (ide->disk != NULL) |
| 1923 | 1921 | { |
| 1924 | | ide->num_cylinders = hdinfo->cylinders; |
| 1925 | | ide->num_sectors = hdinfo->sectors; |
| 1926 | | ide->num_heads = hdinfo->heads; |
| 1927 | | if (PRINTF_IDE_COMMANDS) printf("CHS: %d %d %d\n", ide->num_cylinders, ide->num_heads, ide->num_sectors); |
| 1922 | const hard_disk_info *hdinfo; |
| 1923 | |
| 1924 | hdinfo = hard_disk_get_info(ide->disk); |
| 1925 | if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE) |
| 1926 | { |
| 1927 | ide->num_cylinders = hdinfo->cylinders; |
| 1928 | ide->num_sectors = hdinfo->sectors; |
| 1929 | ide->num_heads = hdinfo->heads; |
| 1930 | if (PRINTF_IDE_COMMANDS) printf("CHS: %d %d %d\n", ide->num_cylinders, ide->num_heads, ide->num_sectors); |
| 1931 | } |
| 1932 | |
| 1933 | /* build the features page */ |
| 1934 | ide_build_features(ide); |
| 1928 | 1935 | } |
| 1929 | | |
| 1930 | | /* build the features page */ |
| 1931 | | ide_build_features(ide); |
| 1932 | 1936 | } |
| 1933 | 1937 | } |
| 1934 | 1938 | #endif |