source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc

Last change on this file was 615, checked in by aitotat, 3 years ago
  • COMMAND_IDLE was not enough to disable standby timer from 1,8" Toshiba HDD. Apparently idle mode is the default mode. Added COMMAND_STAND_BY and that does what COMMAND_IDLE was supposed to do. Without COMMAND_STAND_BY the 1,8" Toshiba HDD experienced some random pauses (=>retry/abort... prompts) especially with Freedos 1.3RC4 but MS-DOS 7.10 (Win98) was mostly OK.
  • Added FEATURE_ENABLE_ADVANCED_POWER_MANAGEMENT command to set drive to maximum performance mode when standby timer is disabled. This feature needs a bit more work. See TODO comments in sources.
File size: 2.0 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Device specific equates for IDE drives.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20%ifndef DEVICEIDE_INC
21%define DEVICEIDE_INC
22
23; Reset delays
24HSR0_RESET_WAIT_US      EQU     6       ; Delay must be at least 5 us
25HSR1_RESET_WAIT_US      EQU     2100    ; Delay must be at least 2 ms
26
27; Polling timeout delays (system timer ticks, 1 tick = 54.9 ms)
28TIMEOUT_DRQ             EQU     255         ;   14 s (some CF cards occasionally have long write delays)
29TIMEOUT_SELECT_DRIVE_DURING_DRIVE_DETECTION EQU (500/55)    ;  500 ms
30TIMEOUT_MOTOR_STARTUP   EQU     (10000/55)  ;   10 s
31TIMEOUT_MAXIMUM         EQU     255         ; We would actually want 31 seconds here but I don't think there are so slow drives
32
33
34; ATA specs say that in standby mode time to respond could be as long as 30 seconds
35; Note that some low-power drives (like Toshiba 1,8" HDD) have power management enabled by default
36; TODO: It might be better to define timeouts in IDEVARS (in ROMVARS) or in DPT. Having even a single bit in DPT means
37; we could adjust timeouts on runtime when enabling or disabling power management.
38%ifdef MODULE_POWER_MANAGEMENT
39    TIMEOUT_BSY         EQU     TIMEOUT_MOTOR_STARTUP
40    TIMEOUT_DRDY        EQU     TIMEOUT_MOTOR_STARTUP
41%else
42    TIMEOUT_BSY         EQU     (2600/55)   ; 2600 ms
43    TIMEOUT_DRDY        EQU     (2600/55)   ; 2600 ms
44%endif
45
46%endif ; DEVICEIDE_INC
Note: See TracBrowser for help on using the repository browser.