Changeset 442 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- Aug 21, 2012, 5:17:11 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/IDE_8bit.inc
r376 r442 23 23 24 24 ;-------------------------------------------------------------------- 25 ; UNROLL_SECTORS_IN_CX_TO_DWORDS 25 26 ; UNROLL_SECTORS_IN_CX_TO_QWORDS 26 27 ; Parameters: 27 28 ; CX: Number of sectors in block 28 29 ; Returns: 29 ; CX: Number of QWORDs in block30 ; CX: Number of DWORDs or QWORDs in block 30 31 ; Corrupts registers: 31 32 ; Nothing 32 33 ;-------------------------------------------------------------------- 34 %macro UNROLL_SECTORS_IN_CX_TO_DWORDS 0 35 %ifdef USE_186 36 shl cx, 7 37 %else 38 xchg cl, ch ; Sectors to WORDs (SHL CX, 8) 39 shr cx, 1 40 %endif 41 %endmacro 42 33 43 %macro UNROLL_SECTORS_IN_CX_TO_QWORDS 0 34 44 %ifdef USE_186 35 45 shl cx, 6 36 46 %else 37 xchg cl, ch ; Sectors to WORDs (SHL CX, 8) 38 shr cx, 1 47 UNROLL_SECTORS_IN_CX_TO_DWORDS 39 48 shr cx, 1 40 49 %endif -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
r439 r442 75 75 76 76 ; Wait until drive motors have reached max speed 77 cmp bp, BYTE ROMVARS.ideVars0 77 cmp bp, BYTE ROMVARS.ideVars0 ; First controller? 78 78 jne SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 79 test bh, FLG_DRVNHEAD_DRV 79 test bh, FLG_DRVNHEAD_DRV ; Wait already done for Master 80 80 jnz SHORT .SkipLongWaitSinceDriveIsNotPrimaryMaster 81 81 call AHDh_WaitUnilDriveMotorHasReachedFullSpeed -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r421 r442 273 273 %endif 274 274 275 ;-------------------------------------------------------------------- 276 ALIGN JUMP_ALIGN 277 ReadBlockFromXTCF: 278 UNROLL_SECTORS_IN_CX_TO_DWORDS 279 ALIGN JUMP_ALIGN 280 .ReadNextDword: 281 in al, dx ; Read 1st BYTE 282 stosb ; Store 1st BYTE to [ES:DI] 283 in al, dx 284 stosb 285 286 in al, dx 287 stosb 288 in al, dx 289 stosb 290 loop .ReadNextDword 291 ret 292 275 293 %endif ; MODULE_8BIT_IDE 276 294 … … 352 370 ;-------------------------------------------------------------------- 353 371 ALIGN JUMP_ALIGN 354 WriteBlockTo FastXtide:355 UNROLL_SECTORS_IN_CX_TO_ QWORDS372 WriteBlockToXTCF: 373 UNROLL_SECTORS_IN_CX_TO_DWORDS 356 374 push ds 357 375 push es 358 376 pop ds 359 or dl, (1<<4) ; Writes need A4 set 360 ALIGN JUMP_ALIGN 361 .ReadNextQword: 362 lodsw ; Load 1st WORD from [DS:SI]363 out dx, ax ; Write 1st WORD364 lodsw365 out dx, ax ; 2nd 366 lods w367 out dx, a x ; 3rd368 lods w369 out dx, a x ; 4th370 loop . ReadNextQword377 ALIGN JUMP_ALIGN 378 .WriteNextDword: 379 lodsb ; Load 1st BYTE from [DS:SI] 380 out dx, al ; Write 1st BYTE 381 lodsb 382 out dx, al 383 384 lodsb 385 out dx, al 386 lodsb 387 out dx, al 388 loop .WriteNextDword 371 389 pop ds 372 390 ret … … 404 422 %ifdef MODULE_8BIT_IDE 405 423 dw 0 ; 0, DEVICE_8BIT_JRIDE_ISA 424 dw ReadBlockFromXTCF ; 1, DEVICE_8BIT_XTCF 406 425 %ifdef USE_186 407 dw ReadBlockFrom16bitDataPort ; 1, DEVICE_FAST_XTIDE408 426 dw ReadBlockFrom16bitDataPort ; 2, DEVICE_8BIT_XTIDE_REV2 409 427 %else 410 dw ReadBlockFromXtideRev2 ; 1, DEVICE_FAST_XTIDE411 428 dw ReadBlockFromXtideRev2 ; 2, DEVICE_8BIT_XTIDE_REV2 412 429 %endif … … 425 442 %ifdef MODULE_8BIT_IDE 426 443 dw 0 ; 0, DEVICE_8BIT_JRIDE_ISA 427 dw WriteBlockTo FastXtide ; 1, DEVICE_FAST_XTIDE444 dw WriteBlockToXTCF ; 1, DEVICE_8BIT_XTCF 428 445 dw WriteBlockToXtideRev2 ; 2, DEVICE_XTIDE_REV2 429 446 dw WriteBlockToXtideRev1 ; 3, DEVICE_XTIDE_REV1 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r441 r442 45 45 46 46 add bx, BYTE ATA1.wHeadCnt - ATA1.wCylCnt 47 mov c l, MAX_VALID_PCHS_HEADS47 mov cx, MAX_VALID_PCHS_HEADS 48 48 call .CompareCHorSfromOffsetBXtoMaxValueInCX 49 49 … … 96 96 jbe SHORT .ValidPCHorSinOffsetBX 97 97 .InvalidPCHorSinOffsetBX: 98 add sp, 2; Clear return address for this function98 add sp, BYTE 2 ; Clear return address for this function 99 99 .FailedToVerifyAtaID: 100 100 stc ; Set carry to indicate invalid ATA-ID
Note:
See TracChangeset
for help on using the changeset viewer.