- Timestamp:
- Mar 4, 2013, 5:11:47 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Variables.inc
r497 r518 29 29 NUMBER_OF_EEPROM_TYPES EQU 5 30 30 MAX_EEPROM_SIZE_IN_BYTES EQU 65536 31 IDE_PORT_TO_START_DETECTION EQU 00h ; Must be zero (not actual port)32 FIRST_MEMORY_SEGMENT_ADDRESS EQU 0C000h33 31 34 32 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/IdeAutodetect.asm
r505 r518 21 21 SECTION .text 22 22 23 IDE_PORT_TO_START_DETECTION EQU 00h ; Must be zero (not actual port) 24 FIRST_MEMORY_SEGMENT_ADDRESS EQU 0C000h 25 23 26 ;-------------------------------------------------------------------- 24 27 ; IdeAutodetect_DetectIdeDeviceFromPortDXAndReturnControlBlockInSI … … 65 68 call CompareIdeStatusRegistersFromALandAH 66 69 mov al, DEVICE_8BIT_JRIDE_ISA ; Assume CF was cleared 70 mov si, dx ; For IDEDTCT.COM 67 71 ret ; No need to return Control Block Port 68 72 … … 143 147 mov al, DEVICE_8BIT_XTIDE_REV1 ; We must have rev 1 144 148 .IdeDeviceFound: 149 clc 145 150 ret 146 151 … … 191 196 ; They must be the same if base port was in use by IDE device. 192 197 cmp al, ah 193 jne SHORT .InvalidStatusRegister198 jne SHORT NoIdeDeviceFound 194 199 195 200 ; Bytes were the same but it is possible they were both FFh, for 196 201 ; example. We must make sure bits are what is expected from valid 197 202 ; IDE Status Register. So far all drives I've tested return 50h 198 ; (FLG_STATUS_DRDY and FLG_STATUS_DSC set) unless there is only199 ; one drive present but wrongdrive is selected. For example if Master203 ; (FLG_STATUS_DRDY and FLG_STATUS_DSC set) or 00h. 204 ; I suspect that the zero might mean non available drive is selected. For example if Master 200 205 ; drive is present but Slave is selected from IDE Drive and Head Select Register, 201 ; then the Status Register can be 00h. 206 ; then the Status Register can be 00h. We cannot accept 00h as valid byte 207 ; since that can easily cause invalid JR-IDE/ISA detections. 202 208 test al, FLG_STATUS_BSY | FLG_STATUS_DF | FLG_STATUS_DRQ | FLG_STATUS_ERR 203 209 jnz SHORT .InvalidStatusRegister ; Busy or Errors cannot be set … … 206 212 ret ; Return with CF cleared 207 213 208 .InvalidStatusRegister:209 214 NoIdeDeviceFound: 210 215 stc … … 247 252 ; IdeAutodetect_IncrementDXtoNextIdeBasePort 248 253 ; Parameters: 249 ; DX: Previous IDE Base Port 254 ; DX: Previous IDE Base Port or IDE_PORT_TO_START_DETECTION 250 255 ; Returns: 251 256 ; DX: Next IDE Base Port
Note:
See TracChangeset
for help on using the changeset viewer.