Changeset 266 in xtideuniversalbios
- Timestamp:
- Feb 24, 2012, 3:06:16 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r249 r266 56 56 mov [di+DPT.bIdevarsOffset], bp 57 57 mov BYTE [di+DPT_ATA.bSetBlock], 1 ; Block = 1 sector 58 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS 58 59 call IdeDPT_StoreReversedAddressLinesFlagIfNecessary 60 %endif 59 61 60 62 ; Wait until drive motors have reached max speed … … 108 110 ; Output Device Control Byte to enable or disable interrupts 109 111 mov al, [bp+IDEPACK.bDeviceControl] 112 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS ; JR-IDE/ISA 110 113 test al, FLG_DEVCONTROL_nIEN ; Interrupts disabled? 111 114 jnz SHORT .DoNotSetInterruptInServiceFlag … … 118 121 pop ds 119 122 .DoNotSetInterruptInServiceFlag: 123 %endif 120 124 OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out 121 125 … … 127 131 eMOVZX ax, BYTE [bp+IDEPACK.bLbaLowExt] 128 132 mov cx, [bp+IDEPACK.wLbaMiddleAndHighExt] 129 call OutputSectorCountAndAddress133 call IDEDEVICE%+OutputSectorCountAndAddress 130 134 131 135 ; Output Sector Address Low 132 136 mov ax, [bp+IDEPACK.wSectorCountAndLbaLow] 133 137 mov cx, [bp+IDEPACK.wLbaMiddleAndHigh] 134 call OutputSectorCountAndAddress138 call IDEDEVICE%+OutputSectorCountAndAddress 135 139 136 140 ; Output command … … 198 202 ; AL, BX, DX 199 203 ;-------------------------------------------------------------------- 200 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS 201 ALIGN JUMP_ALIGN 202 OutputSectorCountAndAddress: 204 ALIGN JUMP_ALIGN 205 IDEDEVICE%+OutputSectorCountAndAddress: 203 206 OUTPUT_AL_TO_IDE_REGISTER SECTOR_COUNT_REGISTER 204 207 … … 211 214 mov al, ch 212 215 JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER LBA_HIGH_REGISTER 213 %endif -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm
r238 r266 30 30 31 31 ; Fall to GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 32 32 %ifndef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS ; JR-IDE/ISA 33 jmp GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX 34 %endif 33 35 34 36 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
r238 r266 76 76 ; AL, BX, CX, DX 77 77 ;-------------------------------------------------------------------- 78 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS 79 PollBsyAndFlgInAH: 80 call IDEDEVICE%+ReadIdeStatusRegisterToAL; Discard contents for first read 78 IDEDEVICE%+PollBsyAndFlgInAH: 79 INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in ; Discard contents for first read 81 80 ALIGN JUMP_ALIGN 82 81 .PollLoop: 83 call IDEDEVICE%+ReadIdeStatusRegisterToAL82 INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in 84 83 test al, FLG_STATUS_BSY ; Controller busy? 85 84 jnz SHORT .UpdateTimeout ; If so, jump to timeout update … … 95 94 .ReturnErrorCodeInAH: 96 95 ret 97 %endif98 96 99 97 … … 110 108 ;-------------------------------------------------------------------- 111 109 IDEDEVICE%+PollBsyOnly: 112 call IDEDEVICE%+ReadIdeStatusRegisterToAL; Discard contents for first read110 INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in ; Discard contents for first read 113 111 ALIGN JUMP_ALIGN 114 112 .PollLoop: 115 call IDEDEVICE%+ReadIdeStatusRegisterToAL113 INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in 116 114 test al, FLG_STATUS_BSY ; Controller busy? 117 115 jz SHORT IDEDEVICE%+Error_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL … … 119 117 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 120 118 jmp SHORT IDEDEVICE%+Error_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 121 122 123 ;--------------------------------------------------------------------124 ; ReadIdeStatusRegisterToAL125 ; Parameters:126 ; DS:DI: Ptr to DPT (in RAMVARS segment)127 ; Returns:128 ; AL: IDE Status Register contents129 ; Corrupts registers:130 ; BX, DX131 ;--------------------------------------------------------------------132 ALIGN JUMP_ALIGN133 IDEDEVICE%+ReadIdeStatusRegisterToAL:134 JUMP_TO_INPUT_TO_AL_FROM_IDE_REGISTER STATUS_REGISTER_in -
trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE/MemIdeTransfer.asm
r242 r266 160 160 .WriteLastBlockToDrive: 161 161 mov ch, [bp+PIOVARS.wWordsLeft+1] ; Sectors left 162 %ifndef USE_186 163 mov bx, CheckErrorsAfterTransferringLastMemoryMappedBlock 164 push bx 165 %else 166 push CheckErrorsAfterTransferringLastMemoryMappedBlock 167 %endif 162 ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock 168 163 ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI 169 164
Note:
See TracChangeset
for help on using the changeset viewer.