Changeset 473 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Oct 10, 2012, 6:22:23 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm
r398 r473 179 179 ; QD6500 has only one channel that can be Primary at 1F0h or Secondary at 170h. 180 180 ; QD6580 always has Primary channel at 1F0h. Secondary channel at 170h can be Enabled or Disabled. 181 call AccessDPT_GetIdeBasePortToBX181 mov bx, [di+DPT.wBasePort] 182 182 cmp bx, DEVICE_ATA_PRIMARY_PORT 183 183 je SHORT .CalculateTimingTicksForQD6580 ; Primary Channel so no need to modify DX -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r441 r473 150 150 ; None 151 151 ; Corrupts registers: 152 ; AX, B X, CX, DX, SI, DI152 ; AX, BL, CX, DX, SI, DI 153 153 ;-------------------------------------------------------------------- 154 154 StartDetectionWithDriveSelectByteInBHandStringInCX: … … 157 157 call HotkeyBar_UpdateDuringDriveDetection 158 158 %endif 159 ; Fall to .AutodetectXTCFport or .ReadAtaInfoFromHardDisk 160 161 162 %ifdef MODULE_8BIT_IDE 163 ;-------------------------------------------------------------------- 164 ; .AutodetectXTCFport 165 ; Parameters: 166 ; BH: Drive Select byte for Drive and Head Register 167 ; CS:BP: Ptr to IDEVARS for the drive 168 ; DS: RAMVARS segment 169 ; ES: Zero (BDA segment) 170 ; Returns: 171 ; DX: Autodetected port (for devices that support autodetection) 172 ; Corrupts registers: 173 ; AX 174 ;-------------------------------------------------------------------- 175 .AutodetectXTCFport: 176 ; Detect port for XTCF 177 call DetectDrives_DoesIdevarsInCSBPbelongToXTCF 178 jne SHORT .SkipXTCFportDetection 179 180 ; XT-CF do not support slave drives so we can safely update port 181 ; for next drive (another XT-CF card on same system) 182 .DetectNextPort: 183 call BootVars_GetNextXTCFportToDetectToDX 184 cmp dx, XTCF_BASE_PORT_4 185 ja SHORT DetectDrives_DriveNotFound ; XT-CF not found from any port 186 187 call AH1Eh_DetectXTCFwithBasePortInDX 188 jc SHORT .DetectNextPort ; XT-CF not found from this port 189 .SkipXTCFportDetection: 159 190 ; Fall to .ReadAtaInfoFromHardDisk 191 %endif ; MODULE_8BIT_IDE 192 160 193 161 194 ;-------------------------------------------------------------------- … … 163 196 ; Parameters: 164 197 ; BH: Drive Select byte for Drive and Head Register 198 ; DX: Autodetected port (for devices that support autodetection) 165 199 ; CS:BP: Ptr to IDEVARS for the drive 166 200 ; DS: RAMVARS segment … … 176 210 push es 177 211 push si 212 push dx 178 213 push bx 179 214 call Device_IdentifyToBufferInESSIwithDriveSelectByteInBH 180 215 pop bx 216 pop dx 181 217 pop si 182 218 pop es … … 208 244 ; Parameters: 209 245 ; BH: Drive Select byte for Drive and Head Register 246 ; DX: Autodetected port (for devices that support autodetection) 210 247 ; CS:BP: Ptr to IDEVARS for the drive 211 248 ; ES:SI Ptr to ATA information for the drive … … 226 263 call DriveDetectInfo_CreateForHardDisk 227 264 jmp SHORT DetectPrint_DriveNameFromDrvDetectInfoInESBX 265 266 267 %ifdef MODULE_8BIT_IDE 268 ;-------------------------------------------------------------------- 269 ; DetectDrives_DoesIdevarsInCSBPbelongToXTCF 270 ; Parameters: 271 ; CS:BP: Ptr to IDEVARS for the drive 272 ; Returns: 273 ; ZF: Set if IDEVARS belongs to XT-CF device 274 ; Cleared if some other device 275 ; Corrupts registers: 276 ; AL 277 ;-------------------------------------------------------------------- 278 DetectDrives_DoesIdevarsInCSBPbelongToXTCF: 279 mov al, [cs:bp+IDEVARS.bDevice] 280 cmp al, DEVICE_8BIT_XTCF_PIO8 281 je SHORT .DeviceIsXTCF 282 cmp al, DEVICE_8BIT_XTCF_DMA 283 je SHORT .DeviceIsXTCF 284 cmp al, DEVICE_8BIT_XTCF_MEMMAP 285 .DeviceIsXTCF: 286 ret 287 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r400 r473 79 79 ; Nothing 80 80 ; Corrupts registers: 81 ; AX, SI, DI, CX 81 ; AX, SI, DI, CX, DX 82 82 ;-------------------------------------------------------------------- 83 83 DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP: 84 mov ax, [cs:bp+IDEVARS.w Port]; for IDE: AX=port address, DH=.bDevice84 mov ax, [cs:bp+IDEVARS.wBasePort] ; for IDE: AX=port address, DH=.bDevice 85 85 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate 86 86 ; DL=COM number character, DH=.bDevice 87 %ifdef MODULE_JRIDE88 cmp dh, DEVICE_8BIT_JRIDE_ISA89 eCMOVE ax, cs ; Use segment address for JR-IDE/ISA90 %endif91 87 92 88 push bp ; setup stack for call to
Note:
See TracChangeset
for help on using the changeset viewer.