Changeset 491 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device
- Timestamp:
- Dec 15, 2012, 2:46:29 PM (12 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Device/IDE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
r486 r491 74 74 ;-------------------------------------------------------------------- 75 75 TransferBlockToOrFromXTCF: 76 ; 8-bit DMA transfers must be done within g64k physical page.76 ; 8-bit DMA transfers must be done within 64k physical page. 77 77 ; XT-CF support maximum of 64 sector (32768 bytes) blocks in DMA mode 78 78 ; so we never need to separate transfer to more than 2 separate DMA operations. -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
r473 r491 53 53 IdeIO_InputToALfromIdeRegisterInDL: 54 54 xor dh, dh ; IDE Register index now in DX 55 55 mov bx, dx ; and BX 56 56 mov al, [di+DPT_ATA.bDevice] 57 57 cmp al, DEVICE_8BIT_XTIDE_REV2 … … 63 63 64 64 .InputToALfromMemoryMappedRegisterInDX: 65 mov bx, JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET66 add bx, dx67 65 push ds 68 66 mov ds, [di+DPT.wBasePort] ; Segment for JR-IDE/ISA 69 mov al, [bx ]67 mov al, [bx+JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET] 70 68 pop ds 71 69 ret 72 70 73 71 .ReverseA0andA3fromRegisterIndexInDX: 74 mov bx, dx75 72 mov dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex] 76 73 SKIP2B bx ; Skip shl dx, 1 77 74 78 75 .ShlRegisterIndexInDX: 79 shldx, 176 eSHL_IM dx, 1 80 77 ; Fall to .InputToALfromRegisterInDX 81 78 … … 116 113 .ShlRegisterIndexInDX: 117 114 add dl, OFFSET_TO_CONTROL_BLOCK_REGISTERS 118 shldx, 1115 eSHL_IM dx, 1 119 116 jmp SHORT OutputALtoRegisterInDX 120 117 … … 164 161 165 162 .ShlRegisterIndexInDX: 166 shldx, 1163 eSHL_IM dx, 1 167 164 ; Fall to OutputALtoRegisterInDX 168 165 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r480 r491 231 231 232 232 ; Convert ES:SI to physical address 233 xor dx, dx 234 mov ax, es 233 %ifdef USE_186 ; Bytes EU Cycles(286) 234 mov ax, es ; 2 2 235 rol ax, 4 ; 3 9 236 mov dx, ax ; 2 2 237 and ax, BYTE 0Fh; 3 3 238 xor dx, ax ; 2 2 239 add si, dx ; 2 2 240 adc al, ah ; 2 2 241 mov es, ax ; 2 2 242 ;------------------------------------ 243 ; 18 24 244 %else ; 808x 245 246 %if 0 247 ; Bytes EU Cycles(808x) 248 mov al, 4 ; 2 4 249 mov dx, es ; 2 2 250 xchg cx, ax ; 1 3 251 rol dx, cl ; 2 24 252 mov cx, dx ; 2 2 253 xchg cx, ax ; 1 3 254 and ax, BYTE 0Fh; 3 4 255 xor dx, ax ; 2 3 256 add si, dx ; 2 3 257 adc al, ah ; 2 3 258 mov es, ax ; 2 2 259 ;------------------------------------ 260 ; 21 53 261 ; 262 ; Judging by the Execution Unit cycle count the above block of code is 263 ; apparently slower. However, the shifts and rotates in the block below 264 ; execute faster than the Bus Interface Unit on an 8088 can fetch them, 265 ; thus causing the EU to starve. The difference in true execution speed 266 ; (if any) might not be worth the extra 5 bytes. 267 ; In other words, we could use a real world test here. 268 ; 269 %endif ; 0 270 ; Bytes EU Cycles(808x/286) 271 xor dx, dx ; 2 3/2 272 mov ax, es ; 2 2/2 235 273 %rep 4 236 shl ax, 1 237 rcl dx, 1 274 shl ax, 1 ; 8 8/8 275 rcl dx, 1 ; 8 8/8 238 276 %endrep 239 add si, ax 240 adc dl, dh 241 mov es, dx 277 add si, ax ; 2 3/2 278 adc dl, dh ; 2 3/2 279 mov es, dx ; 2 2/2 280 ;------------------------------------ 281 %endif ; 26 29/26 242 282 ret 243 283 %endif ; MODULE_8BIT_IDE … … 266 306 %ifdef MODULE_8BIT_IDE 267 307 dw IdePioBlock_ReadFrom8bitDataPort ; 2, DEVICE_8BIT_ATA 268 dw IdePioBlock_ReadFromXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 308 dw IdePioBlock_ReadFromXtideRev1 ; 3, DEVICE_8BIT_XTIDE_REV1 269 309 dw IdePioBlock_ReadFromXtideRev2 ; 4, DEVICE_8BIT_XTIDE_REV2 270 310 dw IdePioBlock_ReadFrom8bitDataPort ; 5, DEVICE_8BIT_XTCF_PIO8 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
r489 r491 3 3 4 4 ; 5 ; XTIDE Universal BIOS and Associated Tools 5 ; XTIDE Universal BIOS and Associated Tools 6 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team. 7 7 ; … … 10 10 ; the Free Software Foundation; either version 2 of the License, or 11 11 ; (at your option) any later version. 12 ; 12 ; 13 13 ; This program is distributed in the hope that it will be useful, 14 14 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 15 15 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 ; GNU General Public License for more details. 16 ; GNU General Public License for more details. 17 17 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 18 ; 18 ; 19 19 20 20 ; Section containing code … … 93 93 ; AL, BX, CX, DX 94 94 ;-------------------------------------------------------------------- 95 .IdePollBsyAndFlgInAH:95 PollBsyAndFlgInAH: 96 96 call IdeIO_InputStatusRegisterToAL ; Discard contents of first read 97 97
Note:
See TracChangeset
for help on using the changeset viewer.