Changeset 474 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization
- Timestamp:
- Oct 11, 2012, 5:30:15 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Initialization
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r473 r474 153 153 ;-------------------------------------------------------------------- 154 154 StartDetectionWithDriveSelectByteInBHandStringInCX: 155 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 156 %ifdef MODULE_HOTKEYS 157 call HotkeyBar_UpdateDuringDriveDetection 158 %endif 159 ; Fall to .AutodetectXTCFport or .ReadAtaInfoFromHardDisk 160 161 155 ; Autodetect port for XT-CF 162 156 %ifdef MODULE_8BIT_IDE 163 ;--------------------------------------------------------------------164 ; .AutodetectXTCFport165 ; Parameters:166 ; BH: Drive Select byte for Drive and Head Register167 ; CS:BP: Ptr to IDEVARS for the drive168 ; DS: RAMVARS segment169 ; ES: Zero (BDA segment)170 ; Returns:171 ; DX: Autodetected port (for devices that support autodetection)172 ; Corrupts registers:173 ; AX174 ;--------------------------------------------------------------------175 .AutodetectXTCFport:176 ; Detect port for XTCF177 157 call DetectDrives_DoesIdevarsInCSBPbelongToXTCF 178 158 jne SHORT .SkipXTCFportDetection 159 160 ; XT-CF do not support slave drives so skip detection 161 test bh, FLG_DRVNHEAD_DRV 162 jnz SHORT NoSlaveDriveAvailable 179 163 180 164 ; XT-CF do not support slave drives so we can safely update port … … 183 167 call BootVars_GetNextXTCFportToDetectToDX 184 168 cmp dx, XTCF_BASE_PORT_4 185 ja SHORT DetectDrives_DriveNotFound; XT-CF not found from any port169 ja SHORT .SkipXTCFportDetection ; XT-CF not found from any port 186 170 187 171 call AH1Eh_DetectXTCFwithBasePortInDX 188 172 jc SHORT .DetectNextPort ; XT-CF not found from this port 173 174 ; We now have autodetected port in DX 175 push dx 176 xchg ax, dx ; Port to print in AX 177 call DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP 178 jmp SHORT .DriveDetectionStringPrintedOnScreen 179 180 ; Print detect string for devices that do not support autodetection 189 181 .SkipXTCFportDetection: 182 push dx 183 %endif ; MODULE_8BIT_IDE 184 185 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 186 .DriveDetectionStringPrintedOnScreen: 187 %ifdef MODULE_HOTKEYS 188 call HotkeyBar_UpdateDuringDriveDetection 189 %endif 190 %ifdef MODULE_8BIT_IDE 191 pop dx 192 %endif 190 193 ; Fall to .ReadAtaInfoFromHardDisk 191 %endif ; MODULE_8BIT_IDE192 194 193 195 … … 284 286 cmp al, DEVICE_8BIT_XTCF_MEMMAP 285 287 .DeviceIsXTCF: 288 NoSlaveDriveAvailable: 286 289 ret 287 290 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r473 r474 75 75 ; CS:CX: Ptr to "Master" or "Slave" string 76 76 ; CS:BP: Ptr to IDEVARS 77 ; SI: Ptr to template string 78 ; Returns: 79 ; Nothing 80 ; Corrupts registers: 81 ; AX, SI, DI, CX, DX 77 ; Returns: 78 ; Nothing 79 ; Corrupts registers: 80 ; AX, CX, DX, SI, DI 82 81 ;-------------------------------------------------------------------- 83 82 DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP: 84 83 mov ax, [cs:bp+IDEVARS.wBasePort] ; for IDE: AX=port address, DH=.bDevice 84 ; Fall to DetectPrint_StartDetectWithAutodetectedBasePortInAX 85 86 ;-------------------------------------------------------------------- 87 ; DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP 88 ; Parameters: 89 ; AX: Base Port Address 90 ; CS:CX: Ptr to "Master" or "Slave" string 91 ; CS:BP: Ptr to IDEVARS 92 ; Returns: 93 ; Nothing 94 ; Corrupts registers: 95 ; AX, CX, DX, SI, DI 96 ;-------------------------------------------------------------------- 97 DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP: 85 98 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate 86 99 ; DL=COM number character, DH=.bDevice 87 88 100 push bp ; setup stack for call to 89 101 mov bp, sp ; BootMenuPrint_FormatCSSIfromParamsInSSBP
Note:
See TracChangeset
for help on using the changeset viewer.