Changeset 120 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Feb 28, 2011, 4:41:41 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r98 r120 48 48 ; Nothing 49 49 ; Corrupts registers: 50 ; AX, DX, SI 50 ; AX, DX, SI, DI 51 51 ;-------------------------------------------------------------------- 52 52 ALIGN JUMP_ALIGN … … 282 282 ; Parameters: 283 283 ; CS:SI: Ptr to string to format 284 ; SS:BP: Ptr to formatparameters284 ; BP: SP before pushing parameters 285 285 ; Returns: 286 286 ; BP: Popped from stack 287 287 ; Corrupts registers: 288 ; AX 288 ; AX, DI 289 289 ;-------------------------------------------------------------------- 290 290 ALIGN JUMP_ALIGN 291 291 BootMenuPrint_FormatCSSIfromParamsInSSBP: 292 push di293 292 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 294 293 stc ; Successfull return from menu event 295 pop di296 294 pop bp 297 295 ret … … 394 392 ; Nothing 395 393 ; Corrupts registers: 396 ; AX, CX, DX, SI 394 ; AX, CX, DX, SI, DI 397 395 ;-------------------------------------------------------------------- 398 396 .PrintHotkeyString: … … 431 429 ; Nothing 432 430 ; Corrupts registers: 433 ; AX, SI 431 ; AX, SI, DI 434 432 ;-------------------------------------------------------------------- 435 433 .PrintRomBootHotkey: … … 449 447 ; Nothing 450 448 ; Corrupts registers: 451 ; AX, SI 449 ; AX, SI, DI 452 450 ;-------------------------------------------------------------------- 453 451 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
r95 r120 13 13 ; Nothing 14 14 ; Corrupts registers: 15 ; AX, SI 15 ; AX, SI, DI 16 16 ;-------------------------------------------------------------------- 17 17 ALIGN JUMP_ALIGN … … 41 41 ; Nothing 42 42 ; Corrupts registers: 43 ; AX, SI 43 ; AX, SI, DI 44 44 ;-------------------------------------------------------------------- 45 45 ALIGN JUMP_ALIGN … … 60 60 ; Nothing 61 61 ; Corrupts registers: 62 ; AX, BX, SI 62 ; AX, BX, SI, DI 63 63 ;-------------------------------------------------------------------- 64 64 ALIGN JUMP_ALIGN -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r116 r120 80 80 out dx, al ; Select Master or Slave drive 81 81 sub dx, BYTE REG_IDE_DRVHD ; Back to IDE Base port 82 call AH25h_GetDriveDetectionTimeoutValue 82 83 ; Wait until ready to accept commands 84 xor bh, bh ; BX now contains bus type 85 mov cl, B_TIMEOUT_DRVINFO ; Load short timeout 86 cmp [RAMVARS.bDrvCnt], bh ; Detecting first drive? 87 eCMOVE cl, B_TIMEOUT_RESET ; If so, load long timeout 83 88 call HStatus_WaitRdy ; Wait until ready to accept commands 84 89 jc SHORT .Return ; Return if error … … 92 97 ; Transfer data 93 98 sub dx, BYTE REGR_IDE_ST ; DX to IDE Data Reg 94 xor bh, bh ; BX now contains bus type95 99 mov cx, 256 ; Transfer 256 words (single sector) 96 100 cld ; INSW to increment DI … … 98 102 call HStatus_WaitRdyDefTime ; Wait until drive ready 99 103 100 ; Return101 104 .Return: 102 105 pop bx … … 104 107 pop di 105 108 ret 106 107 108 ;--------------------------------------------------------------------109 ; Returns timeout value for drive detection.110 ; Long timeout is required for detecting first drive to make sure it is111 ; ready after power-on (ATA specification says up to 31 seconds).112 ; Short timeout is used for additional drives to prevent long boot time113 ; when drive has failed or it is not present.114 ;115 ; AH25h_GetDriveDetectionTimeoutValue116 ; Parameters:117 ; DS: Segment to RAMVARS118 ; Returns:119 ; CL: Timeout value120 ; Corrupts registers:121 ; Nothing122 ;--------------------------------------------------------------------123 ALIGN JUMP_ALIGN124 AH25h_GetDriveDetectionTimeoutValue:125 mov cl, B_TIMEOUT_RESET ; Load long timeout (assume first drive)126 cmp BYTE [RAMVARS.bDrvCnt], 0 ; Detecting first drive?127 je SHORT .Return128 mov cl, B_TIMEOUT_DRVINFO ; Load short timeout129 ALIGN JUMP_ALIGN, ret ; This speed optimization may be unnecessary130 .Return:131 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Common/HStatus.asm
r88 r120 249 249 ; DS: Segment to RAMVARS 250 250 ; Returns: 251 ; Nothing 251 ; CF: Set if timeout 252 ; Cleared if time left 252 253 ; Corrupts registers: 253 254 ; CX -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r98 r120 68 68 StartDetectionWithDriveSelectByteInBHandStringInAX: 69 69 call DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP 70 call ReadAtaInfoFromDrive ; Assume hard disk 71 jnc SHORT CreateBiosTablesForHardDisk 72 ;call ReadAtapiInfoFromDrive ; Assume CD-ROM (not yet implemented) 73 ;jnc SHORT _CreateBiosTablesForCDROM 74 jmp DetectPrint_DriveNotFound 75 70 ; Fall to .ReadAtaInfoFromHardDisk 76 71 77 72 ;-------------------------------------------------------------------- 78 ; ReadAtaInfoFromDrive73 ; .ReadAtaInfoFromHardDisk 79 74 ; Parameters: 80 75 ; BH: Drive Select byte for Drive and Head Register … … 89 84 ; AX, BL, CX, DX, DI 90 85 ;-------------------------------------------------------------------- 91 ReadAtaInfoFromDrive:86 .ReadAtaInfoFromHardDisk: 92 87 mov bl, [cs:bp+IDEVARS.bBusType]; Load BUS type 93 88 mov dx, [cs:bp+IDEVARS.wPort] ; Load IDE Base Port address 94 89 mov di, BOOTVARS.rgbAtaInfo ; ES:DI now points to ATA info location 95 90 call AH25h_GetDriveInfo 96 mov si, di ; ES:SI now points to ATA information 97 ret 91 jnc SHORT CreateBiosTablesForHardDisk 92 ; Fall to .ReadAtapiInfoFromDrive 93 94 .ReadAtapiInfoFromDrive: ; Not yet implemented 95 ;call ReadAtapiInfoFromDrive ; Assume CD-ROM 96 ;jnc SHORT _CreateBiosTablesForCDROM 97 jmp DetectPrint_DriveNotFound 98 98 99 99 … … 103 103 ; BH: Drive Select byte for Drive and Head Register 104 104 ; CS:BP: Ptr to IDEVARS for the drive 105 ; ES: SI Ptr to ATA information for the drive105 ; ES:DI Ptr to ATA information for the drive 106 106 ; DS: RAMVARS segment 107 107 ; ES: BDA/Bootnfo segment … … 112 112 ;-------------------------------------------------------------------- 113 113 CreateBiosTablesForHardDisk: 114 mov si, di ; ES:SI now points to ATA information 114 115 call CreateDPT_FromAtaInformation 115 116 jc SHORT .InvalidAtaInfo -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r98 r120 14 14 ; Nothing 15 15 ; Corrupts registers: 16 ; AX, SI 16 ; AX, SI, DI 17 17 ;-------------------------------------------------------------------- 18 18 DetectPrint_RomFoundAtSegment: … … 33 33 ; Nothing 34 34 ; Corrupts registers: 35 ; AX, SI 35 ; AX, SI, DI 36 36 ;-------------------------------------------------------------------- 37 37 DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP: -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r98 r120 70 70 ;-------------------------------------------------------------------- 71 71 Initialize_AndDetectDrives: 72 CALL_DISPLAY_LIBRARY InitializeDisplayContext 72 73 call DetectPrint_RomFoundAtSegment 73 74 call RamVars_Initialize -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r97 r120 142 142 ;-------------------------------------------------------------------- 143 143 Interrupts_InstallHandlerToVectorInBXFromCSSI: 144 eSHL_IM bx, 2 ; Shift for DWORD offset 144 shl bx, 1 145 shl bx, 1 ; Shift for DWORD offset 145 146 mov [es:bx], si ; Store offset 146 147 mov [es:bx+2], cs ; Store segment
Note:
See TracChangeset
for help on using the changeset viewer.