Changeset 473 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Oct 10, 2012, 6:22:23 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r443 r473 20 20 ; Section containing code 21 21 SECTION .text 22 23 %ifdef MODULE_ADVANCED_ATA24 ;--------------------------------------------------------------------25 ; AccessDPT_GetIdeBasePortToBX26 ; Parameters:27 ; DS:DI: Ptr to Disk Parameter Table28 ; Returns:29 ; BX: IDE Base Port Address30 ; Corrupts registers:31 ; Nothing32 ;--------------------------------------------------------------------33 ALIGN JUMP_ALIGN34 AccessDPT_GetIdeBasePortToBX:35 eMOVZX bx, [di+DPT.bIdevarsOffset] ; CS:BX points to IDEVARS36 mov bx, [cs:bx+IDEVARS.wPort]37 ret38 %endif ; MODULE_ADVANCED_ATA39 40 22 41 23 ;-------------------------------------------------------------------- … … 113 95 114 96 97 %ifdef MODULE_8BIT_IDE 98 ;-------------------------------------------------------------------- 99 ; AccessDPT_IsThisDeviceXTCF 100 ; Parameters: 101 ; DS:DI: Ptr to Disk Parameter Table 102 ; Returns: 103 ; AH: Device Type 104 ; ZF: Set if XTCF 105 ; Cleared if some other device 106 ; Corrupts registers: 107 ; Nothing 108 ;-------------------------------------------------------------------- 109 AccessDPT_IsThisDeviceXTCF: 110 mov ah, [di+DPT_ATA.bDevice] 111 cmp ah, DEVICE_8BIT_XTCF_PIO8 112 je SHORT .DeviceIsXTCF 113 cmp ah, DEVICE_8BIT_XTCF_DMA 114 je SHORT .DeviceIsXTCF 115 cmp ah, DEVICE_8BIT_XTCF_MEMMAP 116 .DeviceIsXTCF: 117 ret 118 %endif ; MODULE_8BIT_IDE 119 120 115 121 %ifdef MODULE_EBIOS 116 122 ;-------------------------------------------------------------------- … … 142 148 ; Nothing 143 149 ;-------------------------------------------------------------------- 144 ALIGN JUMP_ALIGN145 150 AccessDPT_GetPointerToDRVPARAMStoCSBX: 146 eMOVZX bx, BYTE [di+DPT.bIdevarsOffset] ; CS:BX points to IDEVARS151 call AccessDPT_GetIdevarsToCSBX 147 152 add bx, BYTE IDEVARS.drvParamsMaster ; CS:BX points to Master Drive DRVPARAMS 148 153 test BYTE [di+DPT.bFlagsLow], FLGL_DPT_SLAVE … … 150 155 add bx, BYTE DRVPARAMS_size ; CS:BX points to Slave Drive DRVPARAMS 151 156 .ReturnPointerToDRVPARAMS: 157 ret 158 159 160 ;-------------------------------------------------------------------- 161 ; Needed many times during initialization so it is better to 162 ; make it as a function to save bytes. 163 ; 164 ; AccessDPT_GetIdevarsToCSBX 165 ; Parameters: 166 ; DS:DI: Ptr to Disk Parameter Table 167 ; Returns: 168 ; CS:BX: Ptr to IDEVARS for the drive 169 ; Corrupts registers: 170 ; Nothing 171 ;-------------------------------------------------------------------- 172 AccessDPT_GetIdevarsToCSBX: 173 eMOVZX bx, BYTE [di+DPT.bIdevarsOffset] 152 174 ret 153 175 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r397 r473 32 32 ;-------------------------------------------------------------------- 33 33 BootVars_Initialize: 34 %ifdef MODULE_8BIT_IDE 35 mov WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_1 36 %endif 37 34 38 ; Clear to zero 35 39 mov al, DRVDETECTINFO_size … … 66 70 67 71 %endif ; MODULE_HOTKEYS 72 73 74 %ifdef MODULE_8BIT_IDE 75 ;-------------------------------------------------------------------- 76 ; BootVars_GetNextXTCFportToDetectToDX 77 ; Parameters: 78 ; ES: BDA Segment 79 ; Returns: 80 ; DX: Next XT-CF port to detect 81 ; Corrupts registers: 82 ; AX 83 ;-------------------------------------------------------------------- 84 BootVars_GetNextXTCFportToDetectToDX: 85 mov dx, [es:BOOTVARS.wNextXTCFportToScan] 86 test dl, dl 87 jz SHORT .NextOneIs240hor340h 88 add WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_3 - XTCF_BASE_PORT_2 89 ret 90 .NextOneIs240hor340h: 91 mov BYTE [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_2 & 0FFh ; 40h 92 ret 93 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r445 r473 28 28 ; Parameters: 29 29 ; BH: Drive Select byte for Drive and Head Register 30 ; DX: Autodetected port (for devices that support autodetection) 30 31 ; ES:SI: Ptr to 512-byte ATA information read from the drive 31 32 ; CS:BP: Ptr to IDEVARS for the controller … … 47 48 ; Parameters: 48 49 ; BH: Drive Select byte for Drive and Head Register 50 ; DX: Autodetected port (for devices that support autodetection) 49 51 ; DS:DI: Ptr to Disk Parameter Table 50 52 ; CS:BP: Ptr to IDEVARS for the controller … … 55 57 ;-------------------------------------------------------------------- 56 58 .InitializeDPT: 57 mov [di+DPT.bIdevarsOffset], bp ; IDEVARS must start in first 256 bytes of ROM59 call CreateDPT_StoreIdevarsOffsetAndBasePortFromCSBPtoDPTinDSDI 58 60 ; Fall to .StoreDriveSelectAndDriveControlByte 59 61 … … 230 232 231 233 ;-------------------------------------------------------------------- 234 ; CreateDPT_StoreIdevarsOffsetAndBasePortFromCSBPtoDPTinDSDI 235 ; Parameters: 236 ; DX: Autodetected port (for devices that support autodetection) 237 ; DS:DI: Ptr to Disk Parameter Table 238 ; CS:BP: Ptr to IDEVARS for the controller 239 ; Returns: 240 ; Nothing 241 ; Corrupts registers: 242 ; AX 243 ;-------------------------------------------------------------------- 244 CreateDPT_StoreIdevarsOffsetAndBasePortFromCSBPtoDPTinDSDI: 245 mov [di+DPT.bIdevarsOffset], bp ; IDEVARS must start in first 256 bytes of ROM 246 247 %ifdef MODULE_8BIT_IDE 248 call DetectDrives_DoesIdevarsInCSBPbelongToXTCF 249 jne SHORT .DeviceUsesPortSpecifiedInIDEVARS 250 mov [di+DPT.wBasePort], dx 251 ret 252 .DeviceUsesPortSpecifiedInIDEVARS: 253 %endif ; MODULE_8BIT_IDE 254 255 mov ax, [cs:bp+IDEVARS.wBasePort] 256 mov [di+DPT.wBasePort], ax 257 ret 258 259 260 ;-------------------------------------------------------------------- 232 261 ; GetUserDefinedCapacityToBXAXandFlagsToCXandModeToDXfromROMVARS 233 262 ; Parameters: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r444 r473 208 208 ret 209 209 210 210 211 %ifdef MODULE_SERIAL_FLOPPY 211 212 ;-------------------------------------------------------------------- 212 213 ; RamVars_UnpackFlopCntAndFirstToAL 213 214 ; Parameters: 214 ; Nothing215 ; DS: RAMVARS segment 215 216 ; Returns: 216 217 ; AL: First floppy drive number supported … … 226 227 ret 227 228 %endif 229 230 231 ;-------------------------------------------------------------------- 232 ; RamVars_IsDriveDetectionInProgress 233 ; Parameters: 234 ; DS: RAMVARS segment 235 ; Returns: 236 ; ZF: Set if drive detection is in progress (ROM initialization) 237 ; Corrupts registers: 238 ; None 239 ;-------------------------------------------------------------------- 240 RamVars_IsDriveDetectionInProgress: 241 cmp WORD [RAMVARS.wSignature], RAMVARS_DRV_DETECT_SIGNATURE 242 ret
Note:
See TracChangeset
for help on using the changeset viewer.