Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h


Ignore:
Timestamp:
Feb 25, 2013, 4:23:09 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Reverted the changes to MenuEvents.inc done in r492 since they broke the F1 key function in XTIDECFG.
  • Added a tail-call optimized variant of the CALL_DISPLAY_LIBRARY macro (JMP_DISPLAY_LIBRARY).
  • Put a block size limit in AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL. I think it's needed but if not, it's easy to remove.
  • Other optimizations and fixes.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r503 r505  
    3939AH0h_HandlerForDiskControllerReset:
    4040    ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes)
    41     xor     bx, bx                                      ; Zero BH to assume no errors
    42     or      bl, dl                                      ; Copy requested drive to BL
     41    eMOVZX  bx, dl                                      ; Copy requested drive to BL and zero BH to assume no errors
     42
    4343    xor     ah, ah                                      ; Disk Controller Reset
    4444    call    Int13h_CallPreviousInt13hHandler            ; Reset floppy drives only or floppy drives and foreign hard disks
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm

    r491 r505  
    102102    out     dx, al
    103103
     104    ; We always need to enable 8-bit mode since 16-bit mode is restored
     105    ; when controller is reset (AH=00h or 0Dh)
     106    ePUSH_T bx, AH23h_Enable8bitPioMode
     107
    104108    ; Convert Control Register Contents to device code
    105109    test    al, al
     
    108112    jae     SHORT .SetMemoryMappedMode
    109113
     114; We need to limit block size here. Consider this scenario;
     115; 1. While in PIO mode or memory mapped mode, the drive is set to do
     116;    block transfers larger than XTCF_DMA_MODE_MAX_BLOCK_SIZE.
     117; 2. A call is subsequently made to change device mode to DEVICE_8BIT_XTCF_DMA.
     118; 3. The call to AH24h_SetBlockSize fails but the change in device mode has been made.
     119
    110120    ; Set DMA Mode
    111121    mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_DMA
    112122    mov     al, [di+DPT_ATA.bBlockSize]
    113     call    AH24h_SetBlockSize  ; AH=24h limits block size if necessary
    114     jmp     SHORT .Enable8bitPioMode
     123    MIN_U   al, XTCF_DMA_MODE_MAX_BLOCK_SIZE
     124    jmp     SHORT AH24h_SetBlockSize    ; Returns via AH23h_Enable8bitPioMode
    115125
    116126.SetMemoryMappedMode:
    117     mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_MEMMAP
    118     jmp     SHORT .Enable8bitPioMode
     127    mov     al, DEVICE_8BIT_XTCF_MEMMAP
     128    SKIP2B  bx
    119129
    120130.Set8bitPioMode:
    121     mov     BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_PIO8
    122     ; Fall to .Enable8bitPioMode
    123 
    124     ; We always need to enable 8-bit mode since 16-bit mode is restored
    125     ; when controller is reset (AH=00h or 0Dh)
    126 .Enable8bitPioMode:
    127     jmp     AH23h_Enable8bitPioMode
     131    mov     al, DEVICE_8BIT_XTCF_PIO8
     132    mov     [di+DPT_ATA.bDevice], al
     133    ret     ; Via AH23h_Enable8bitPioMode
    128134
    129135
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm

    r493 r505  
    101101    call    Device_SelectDrive
    102102    STORE_ERROR_FLAG_TO_DPT     FLG_INITERROR_FAILED_TO_SELECT_DRIVE
     103%ifdef USE_386
     104    jc      .ReturnWithErrorCodeInAH
     105%else
    103106    jnc     SHORT .ContinueInitializationSinceDriveSelectedSuccesfully
    104107    jmp     .ReturnWithErrorCodeInAH
    105108.ContinueInitializationSinceDriveSelectedSuccesfully:
     109%endif
    106110
    107111
Note: See TracChangeset for help on using the changeset viewer.