Changeset 155 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- May 1, 2011, 6:44:29 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r152 r155 22 22 call Device_OutputALtoIdeControlBlockRegisterInDL 23 23 mov ax, HSR0_RESET_WAIT_US 24 call HTimer_DelayMicrosecondsFromAX24 call Timer_DelayMicrosecondsFromAX 25 25 26 26 ; HSR1: Clear_wait … … 31 31 call Device_OutputALtoIdeControlBlockRegisterInDL 32 32 mov ax, HSR1_RESET_WAIT_US 33 call HTimer_DelayMicrosecondsFromAX33 call Timer_DelayMicrosecondsFromAX 34 34 35 35 ; HSR2: Check_status -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r152 r155 381 381 eSEG es ; Source is ES segment 382 382 rep 383 db 6Fh ; OUTSW 383 db 6Fh ; OUTSW (we want this in XT build) 384 384 ret 385 385 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
r150 r155 53 53 ;-------------------------------------------------------------------- 54 54 IdeWait_PollStatusFlagInBLwithTimeoutInBH: 55 eMOVZX cx, bh ; Timeout ticks now in CX56 55 mov ah, bl 57 call HTimer_InitializeTimeoutWithTicksInCX 56 mov cl, bh 57 call Timer_InitializeTimeoutWithTicksInCL 58 58 and ah, ~FLG_STATUS_BSY 59 59 jz SHORT PollBsyOnly … … 82 82 jnz SHORT IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 83 83 .UpdateTimeout: 84 call HTimer_SetCFifTimeout84 call Timer_SetCFifTimeout 85 85 jnc SHORT .PollLoop ; Loop if time left 86 86 call IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL … … 110 110 test al, FLG_STATUS_BSY ; Controller busy? 111 111 jz SHORT IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 112 call HTimer_SetCFifTimeout ; Update timeout counter112 call Timer_SetCFifTimeout ; Update timeout counter 113 113 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 114 114 jmp SHORT IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL -
trunk/XTIDE_Universal_BIOS/Src/Device/Idepack.asm
r150 r155 50 50 51 51 push bx 52 call HAddress_OldInt13hAddressToIdeAddress52 call Address_OldInt13hAddressToIdeAddress 53 53 call AccessDPT_GetDriveSelectByteToAL 54 54 or al, bh ; AL now has Drive and Head Select Byte -
trunk/XTIDE_Universal_BIOS/Src/Device/Timer.asm
r150 r155 6 6 7 7 ;-------------------------------------------------------------------- 8 ; HTimer_InitializeTimeoutWithTicksInCX8 ; Timer_InitializeTimeoutWithTicksInCL 9 9 ; Parameters: 10 ; C X: Timeout value in system timer ticks10 ; CL: Timeout value in system timer ticks 11 11 ; DS: Segment to RAMVARS 12 12 ; Returns: … … 16 16 ;-------------------------------------------------------------------- 17 17 ALIGN JUMP_ALIGN 18 HTimer_InitializeTimeoutWithTicksInCX:19 mov [RAMVARS. wTimeoutCounter], cx ; Store timeout ticks18 Timer_InitializeTimeoutWithTicksInCL: 19 mov [RAMVARS.bTimeoutTicksLeft], cl ; Ticks until timeout 20 20 call ReadTimeFromBdaToCX 21 add [RAMVARS.wTimeoutCounter], cx ; End time for timeout21 mov [RAMVARS.bLastTimeoutUpdate], cl ; Start time 22 22 ret 23 23 24 24 25 25 ;-------------------------------------------------------------------- 26 ; HTimer_SetCFifTimeout26 ; Timer_SetCFifTimeout 27 27 ; Parameters: 28 28 ; DS: Segment to RAMVARS … … 34 34 ;-------------------------------------------------------------------- 35 35 ALIGN JUMP_ALIGN 36 HTimer_SetCFifTimeout:36 Timer_SetCFifTimeout: 37 37 call ReadTimeFromBdaToCX 38 cmp [RAMVARS.wTimeoutCounter], cx 38 cmp cl, [RAMVARS.bLastTimeoutUpdate] 39 je SHORT .StillPollingTheSameTick 40 mov [RAMVARS.bLastTimeoutUpdate], cl 41 sub BYTE [RAMVARS.bTimeoutTicksLeft], 1 ; DEC does not update CF 42 .StillPollingTheSameTick: 39 43 ret 40 44 … … 44 48 ; RTC resolution is 977 microsecs. 45 49 ; 46 ; HTimer_DelayMicrosecondsFromAX50 ; Timer_DelayMicrosecondsFromAX 47 51 ; Parameters: 48 52 ; AX: Number of microsecs to wait … … 52 56 ; AX 53 57 ;-------------------------------------------------------------------- 54 HTimer_DelayMicrosecondsFromAX:58 Timer_DelayMicrosecondsFromAX: 55 59 %ifndef USE_AT 56 60 mov ax, 2 … … 69 73 pop dx 70 74 mov ax, 1 ; Prepare to wait 1 timer tick 71 jc SHORT HTimer_DelayTimerTicksFromAX ; Event Wait was unsupported or busy75 jc SHORT Timer_DelayTimerTicksFromAX ; Event Wait was unsupported or busy 72 76 ret 73 77 %endif … … 78 82 ; will occur at 54.9 ms intervals. 79 83 ; 80 ; HTimer_DelayTimerTicksFromAX84 ; Timer_DelayTimerTicksFromAX 81 85 ; Parameters: 82 86 ; AX: Number of timer ticks to wait … … 86 90 ; AX 87 91 ;-------------------------------------------------------------------- 88 HTimer_DelayTimerTicksFromAX:92 Timer_DelayTimerTicksFromAX: 89 93 sti ; Make sure that interrupts are enabled 90 94 call ReadTimeFromBdaToCX … … 93 97 call ReadTimeFromBdaToCX 94 98 cmp cx, ax 95 j bSHORT .WaitLoop ; Loop until end time is reached99 jne SHORT .WaitLoop ; Loop until end time is reached 96 100 ret 97 101
Note:
See TracChangeset
for help on using the changeset viewer.