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


Ignore:
Timestamp:
Jan 26, 2013, 4:58:50 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • XTIDE rev 2 and modded XTIDE rev 1 work again (fixed A0<->A3 swap when accessing Control Block Registers).
  • System INT 13h handler is no longer copied to INT 40h (testing if something uses INT 40h).
  • Removed controller hardware reset: now AH=0h and AH=Dh will only re-initialize drives (SB16 Tertiary and Quaternary IDE should now be safe to use when using Secondary IDE).
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
Files:
2 edited

Legend:

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

    r491 r501  
    3838;--------------------------------------------------------------------
    3939AH0h_HandlerForDiskControllerReset:
    40     ; Reset Floppy Drives with INT 40h
    4140    xor     bx, bx                      ; Zero BH to assume no errors
    4241    or      bl, dl                      ; Copy requested drive to BL
    43     eCMOVS  dl, bh                      ; Reset Floppy Drive(s) with 00h since DL has Hard Drive number
    44 
    45     xor     ah, ah                      ; Disk Controller Reset
    46     int     BIOS_DISKETTE_INTERRUPT_40h
    47     call    BackupErrorCodeFromTheRequestedDriveToBH
    48     ; We do not reset Hard Drives if DL was 0xh on entry
    49 
    5042
    5143%ifdef MODULE_SERIAL_FLOPPY
     
    6961%endif
    7062
    71     ; Reset foreign Hard Drives (those handled by other BIOSes)
     63    ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes)
     64    call    ResetForeignDrives
    7265    test    bl, bl                                      ; If we were called with a floppy disk, then we are done,
    7366    jns     SHORT .SkipHardDiskReset                    ; don't do hard disks.
    74     call    ResetForeignHardDisks
    7567
    7668    ; Resetting our hard disks will modify dl and bl to be idevars offset based instead of drive number based,
    7769    ; such that this call must be the last in the list of reset routines called.
    7870    ;
    79     ; This needs to happen after ResetForeignHardDisks, as that call may have set the error code for 80h,
     71    ; This needs to happen after ResetForeignDrives, as that call may have set the error code for 80h,
    8072    ; and we need to override that value if we are xlate'd into 80h with one of our drives.
    8173    ;
     
    8880
    8981;--------------------------------------------------------------------
    90 ; ResetForeignHardDisks
     82; ResetForeignDrives
    9183;   Parameters:
    92 ;       BL:     Requested Hard Drive (DL when entering AH=00h)
     84;       BL:     Requested Floppy or Hard Drive (DL when entering AH=00h)
    9385;       DS:     RAMVARS segment
    9486;   Returns:
     
    9789;       AX, DL
    9890;--------------------------------------------------------------------
    99 ResetForeignHardDisks:
     91ResetForeignDrives:
    10092    ; If there are drives after our drives, those are already reset
    10193    ; since our INT 13h was called by some other BIOS.
     
    10395    ; There could be more in chain but let the previous one handle them.
    10496    mov     dl, [RAMVARS.bFirstDrv]
    105     or      dl, 80h                 ; We may not have our drives at all!
    106     MIN_U   dl, bl                  ; BL is always Hard Drive number
     97    or      dl, 80h                 ; We may not have our drives at all so change 0 to 80h!
     98    MIN_U   dl, bl
    10799
    108100    xor     ah, ah                  ; Disk Controller Reset
     
    135127; ResetHardDisksHandledByOurBIOS
    136128;   Parameters:
     129;       BL:     Requested drive (DL when entering AH=00h)
    137130;       DS:DI:  Ptr to DPT for requested drive
    138131;               If DPT pointer is not available, or error result in BH won't be used anyway,
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r473 r501  
    6565    call    Interrupts_UnmaskInterruptControllerForDriveInDSDI
    6666%endif
    67     call    Device_ResetMasterAndSlaveController
    68     ;jc     SHORT .ReturnError                  ; CF would be set if slave drive present without master
    69                                                 ; (error register has special values after reset)
    70 
    7167    ; Initialize Master and Slave drives
    7268    call    AccessDPT_GetIdevarsToCSBX
Note: See TracChangeset for help on using the changeset viewer.