Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r588 r589 152 152 153 153 154 %if 0155 ; We always need to enable 8-bit mode since 16-bit mode is restored156 ; when controller is reset (AH=00h or 0Dh)157 ePUSH_T bx, AH23h_Enable8bitPioMode158 159 ; Convert mode to device type (see XTCF.inc for full details)160 and ax, 3161 jz SHORT .Set8bitPioMode ; XTCF_8BIT_PIO_MODE = 0162 dec ax ; XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD = 1163 jz SHORT .Set8bitPioModeWithBIUOffload164 dec ax ; XTCF_16BIT_PIO_WITH_BIU_OFFLOAD = 2165 jz SHORT .Set16bitPioModeWithBIUOffload166 167 ; XTCF_DMA_MODE = 3168 mov BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA169 170 ; DMA transfers have limited block size171 mov al, [di+DPT_ATA.bBlockSize]172 cmp al, XTCF_DMA_MODE_MAX_BLOCK_SIZE173 jbe SHORT AH24h_SetBlockSize174 mov al, XTCF_DMA_MODE_MAX_BLOCK_SIZE175 jmp SHORT AH24h_SetBlockSize176 177 .Set16bitPioModeWithBIUOffload:178 pop bx ; Do not enable 8-bit PIO...179 ePUSH_T bx, AH23h_Disable8bitPioMode ; ...disable it instead180 mov al, DEVICE_8BIT_XTCF_PIO16_WITH_BIU_OFFLOAD181 SKIP2B bx182 183 .Set8bitPioMode:184 mov al, DEVICE_8BIT_XTCF_PIO8185 SKIP2B bx186 187 .Set8bitPioModeWithBIUOffload:188 mov al, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD189 mov [di+DPT_ATA.bDevice], al190 ret191 %endif ; 0192 193 194 154 ;-------------------------------------------------------------------- 195 155 ; AH1Eh_GetCurrentXTCFmodeToAX … … 197 157 ; DS:DI: Ptr to DPT (in RAMVARS segment) 198 158 ; Returns: 199 ; AX: XT-CF mode ( XTCF_8BIT_PIO_MODE, XTCF_8BIT_PIO_MODE_WITH_BIU_OFFLOAD, XTCF_16BIT_PIO_WITH_BIU_OFFLOAD or XTCF_DMA_MODE)159 ; AX: XT-CF mode (see XTCF.inc) 200 160 ; CF: Clear 201 161 ; Corrupts registers: … … 208 168 ret 209 169 210 %if 0211 mov al, [di+DPT_ATA.bDevice]212 shr al, 1213 cbw214 sub al, XTCF_DEVICE_OFFSET >> 1215 ret216 %endif ; 0
Note:
See TracChangeset
for help on using the changeset viewer.