Changeset 503 in xtideuniversalbios


Ignore:
Timestamp:
Feb 13, 2013, 6:12:04 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Optimized AH=0h a bit.
Location:
trunk/XTIDE_Universal_BIOS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r500 r503  
    120120STANDARD_CONTROL_BLOCK_OFFSET           EQU     200h
    121121XTIDE_CONTROL_BLOCK_OFFSET              EQU     8h
    122 XTCF_CONTROL_BLOCK_OFFSET               EQU     XTIDE_CONTROL_BLOCK_OFFSET
     122XTCF_CONTROL_BLOCK_OFFSET               EQU     (XTIDE_CONTROL_BLOCK_OFFSET << 1)
    123123
    124124; Default values for Port and PortCtrl, shared with the configurator
     
    134134
    135135DEVICE_ATA_TERTIARY_PORT                EQU     1E8h
    136 DEVICE_ATA_TERTIARY_PORTCTRL            EQU     ((DEVICE_ATA_TERTIARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) & ~0Fh) ; 3E0h
     136DEVICE_ATA_TERTIARY_PORTCTRL            EQU     (DEVICE_ATA_TERTIARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET)
    137137
    138138DEVICE_ATA_QUATERNARY_PORT              EQU     168h
    139 DEVICE_ATA_QUATERNARY_PORTCTRL          EQU     ((DEVICE_ATA_QUATERNARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET) & ~0Fh)   ; 360h
     139DEVICE_ATA_QUATERNARY_PORTCTRL          EQU     (DEVICE_ATA_QUATERNARY_PORT + STANDARD_CONTROL_BLOCK_OFFSET)
    140140
    141141
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm

    r501 r503  
    125125
    126126.ShlRegisterIndexInDX:
    127     add     dl, XTCF_CONTROL_BLOCK_OFFSET
    128127    shl     dx, 1
     128    add     dx, BYTE XTCF_CONTROL_BLOCK_OFFSET
    129129    jmp     SHORT OutputALtoRegisterInDX
    130130
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r501 r503  
    3838;--------------------------------------------------------------------
    3939AH0h_HandlerForDiskControllerReset:
    40     xor     bx, bx                      ; Zero BH to assume no errors
    41     or      bl, dl                      ; Copy requested drive to BL
     40    ; 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
     43    xor     ah, ah                                      ; Disk Controller Reset
     44    call    Int13h_CallPreviousInt13hHandler            ; Reset floppy drives only or floppy drives and foreign hard disks
     45    call    BackupErrorCodeFromTheRequestedDriveToBH
    4246
    4347%ifdef MODULE_SERIAL_FLOPPY
     
    6064    call    BackupErrorCodeFromTheRequestedDriveToBH    ; only one drive), but doing it again is not harmful.
    6165%endif
    62 
    63     ; Reset foreign Floppy and Hard Drives (those handled by other BIOSes)
    64     call    ResetForeignDrives
    6566    test    bl, bl                                      ; If we were called with a floppy disk, then we are done,
    6667    jns     SHORT .SkipHardDiskReset                    ; don't do hard disks.
     
    7778    mov     ah, bh
    7879    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    79 
    80 
    81 ;--------------------------------------------------------------------
    82 ; ResetForeignDrives
    83 ;   Parameters:
    84 ;       BL:     Requested Floppy or Hard Drive (DL when entering AH=00h)
    85 ;       DS:     RAMVARS segment
    86 ;   Returns:
    87 ;       BH:     Error code from requested drive (if available)
    88 ;   Corrupts registers:
    89 ;       AX, DL
    90 ;--------------------------------------------------------------------
    91 ResetForeignDrives:
    92     ; If there are drives after our drives, those are already reset
    93     ; since our INT 13h was called by some other BIOS.
    94     ; We only need to reset drives from the previous INT 13h handler.
    95     ; There could be more in chain but let the previous one handle them.
    96     mov     dl, [RAMVARS.bFirstDrv]
    97     or      dl, 80h                 ; We may not have our drives at all so change 0 to 80h!
    98     MIN_U   dl, bl
    99 
    100     xor     ah, ah                  ; Disk Controller Reset
    101     call    Int13h_CallPreviousInt13hHandler
    102 ;;; fall-through to BackupErrorCodeFromTheRequestedDriveToBH
    10380
    10481
Note: See TracChangeset for help on using the changeset viewer.