Changeset 589 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Files:
-
- 6 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 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r584 r589 92 92 mov si, FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE 93 93 jmp SHORT AH23h_SetControllerFeatures 94 95 %ifdef MODULE_8BIT_IDE_ADVANCED 94 96 AH23h_Disable8bitPioMode: 95 97 mov si, FEATURE_DISABLE_8BIT_PIO_TRANSFER_MODE … … 97 99 xor ah, ah ; Clear error since modern drives might not understand the command and are 98 100 ret ; always in 16-bit mode anyway 99 %endif 101 %endif ; MODULE_8BIT_IDE_ADVANCED 102 %endif ; MODULE_8BIT_IDE -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm
r526 r589 40 40 ; AH: Int 13h/40h floppy return status 41 41 ; AL: Burst error length if AH returns 11h (we never return error code 11h) 42 ; Number of sectors actually read (only valid if CF set for some BIOSes)42 ; Number of sectors actually read (only valid if CF set for some BIOSes) 43 43 ; CF: 0 if successful, 1 if error 44 44 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH3h_HWrite.asm
r526 r589 39 39 ; Returns with INTPACK: 40 40 ; AH: Int 13h/40h floppy return status 41 ; AL: Number of sectors actually written (only valid if CF set for some BIOSes)41 ; AL: Number of sectors actually written (only valid if CF set for some BIOSes) 42 42 ; CF: 0 if successful, 1 if error 43 43 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r588 r589 184 184 185 185 ; Advanced PIO mode 3 and above 186 mov dl, [di+DPT_ADVANCED_ATA.bPioMode]187 or dl, PIO_FLOW_CONTROL_MODE_xxx186 mov dl, PIO_FLOW_CONTROL_MODE_xxx 187 or dl, [di+DPT_ADVANCED_ATA.bPioMode] 188 188 189 189 .IordyNotSupported: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Address.asm
r568 r589 174 174 ; +=sectToSeek-1 (24-bit result) 175 175 ; Max = 16,450,497 + 63 - 1 = 16,450,559 = FB03FFh 176 xor bh, bh ; Sector number now in BX176 mov bh, ch ; Sector number now in BX, CH=zero 177 177 dec bx ; sectToSeek-=1 178 add ax, bx ; Add to loword 179 adc dl, bh ; Add possible carry to byte2, BH=zero 180 181 ; Copy DX:AX to proper return registers 182 xchg bx, ax ; BL = Sector Number Register (LBA 7...0) 183 mov cl, bh ; Low Cylinder Register (LBA 15...8) 184 mov ch, dl ; High Cylinder Register (LBA 23...16) 185 mov bh, dh ; Drive and Head Register (LBA 27...24) 178 add bx, ax ; Add loword to BX (BL = Sector Number Register (LBA 7...0)) 179 adc ch, dl ; Add possible carry to byte2 (CH = High Cylinder Register (LBA 23...16)) 180 mov cl, bh ; CL = Low Cylinder Register (LBA 15...8) 181 mov bh, dh ; BH = Drive and Head Register (LBA 27...24) 186 182 ret
Note:
See TracChangeset
for help on using the changeset viewer.