Changeset 322 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers


Ignore:
Timestamp:
Mar 11, 2012, 4:17:46 PM (13 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Commented out the FS and GS segment registers from INTPACK since we never touch them anyway.
  • Minor changes to improve speed in the Int13h handler.
  • Changed Prepare_ByValidatingSectorsInALforOldInt13h so it really doesn't corrupt anything.
  • Changed the makefile so 'make strings' now works even if StringsCompressed.asm is missing or empty.
Location:
trunk/XTIDE_Universal_BIOS/Src/Handlers
Files:
3 edited

Legend:

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

    r294 r322  
    3030    mov     [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl
    3131
    32     call    FindDPT_ForDriveNumberInDL              ; DS:DI points to our DPT, or NULL if not our drive
    33     jnc     SHORT .OurFunction                      ; DPT found, this is one of our drives, and thus our function
    34 
    35     test    ah, ah
    36     jz      SHORT .OurFunction                      ; we handle all function 0h requests (resets)
    37     cmp     ah, 8
    38     jne     SHORT Int13h_DirectCallToAnotherBios    ; non-8h function, handled by foreign bios
    39 
    40 %ifndef MODULE_SERIAL_FLOPPY
    41 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and
    42 ; floppy drive counts.  Without floppy support, we handle only hard disk traffic for function 08h,
    43 ; and thus need the check below.
    44 ;
    45     test    dl, dl
    46     jns     SHORT Int13h_DirectCallToAnotherBios
    47 %endif
     32    call    FindDPT_ForDriveNumberInDL  ; DS:DI points to our DPT, or NULL if not our drive
     33    jc      SHORT .NotOurDrive          ; DPT not found so this is not one of our drives
    4834
    4935.OurFunction:
     
    6551    test    BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
    6652    jz      SHORT Int13h_UnsupportedFunction    ; No eINT 13h for CHS drives
     53    sub     bl, 41h<<1                  ; BX = Offset to eINT 13h jump table
     54    jb      SHORT Int13h_UnsupportedFunction
    6755    cmp     ah, 48h
    6856    ja      SHORT Int13h_UnsupportedFunction
    69     sub     bl, 41h<<1                  ; BX = Offset to eINT 13h jump table
    70     jb      SHORT Int13h_UnsupportedFunction
    7157    jmp     [cs:bx+g_rgwEbiosFunctionJumpTable]
    7258%endif
    7359
     60ALIGN JUMP_ALIGN
     61.NotOurDrive:
     62    test    ah, ah
     63    jz      SHORT .OurFunction          ; We handle all function 0h requests (resets)
     64
     65%ifndef MODULE_SERIAL_FLOPPY
     66; Without floppy support, we handle only hard disk traffic for function 08h.
     67    test    dl, dl
     68    jns     SHORT Int13h_DirectCallToAnotherBios
     69%endif
     70; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts.
     71    cmp     ah, 8
     72    je      SHORT .OurFunction
     73    ; Fall to Int13h_DirectCallToAnotherBios
    7474
    7575;--------------------------------------------------------------------
     
    103103    pop     bp  ; Standard INT 13h functions never uses BP as return register
    104104%ifdef USE_386
    105     mov     [bp+IDEPACK.intpack+INTPACK.gs], gs
    106     mov     [bp+IDEPACK.intpack+INTPACK.fs], fs
     105;   mov     [bp+IDEPACK.intpack+INTPACK.gs], gs
     106;   mov     [bp+IDEPACK.intpack+INTPACK.fs], fs
    107107%endif
    108108    mov     [bp+IDEPACK.intpack+INTPACK.es], es
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm

    r305 r322  
    2222ALIGN JUMP_ALIGN
    2323AH25h_HandlerForGetDriveInformation:
    24     mov     al, 1           ; Read 1 sector
    25     call    Prepare_BufferToESSIforOldInt13hTransfer
    26     mov     ah, COMMAND_IDENTIFY_DEVICE
     24    mov     ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1)      ; Read 1 sector
     25    call    Prepare_BufferToESSIforOldInt13hTransfer    ; Preserves AX
    2726    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
    2827%ifdef USE_186
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm

    r294 r322  
    111111    cmp     al, 128
    112112    ja      SHORT InvalidNumberOfSectorsRequested
    113     mov     ah, RET_HD_BOUNDARY
    114113    test    si, si                              ; Offset must be zero to xfer 128 sectors
    115114    jnz     SHORT CannotAlignPointerProperly
     
    120119Prepare_ReturnFromInt13hWithInvalidFunctionError:
    121120    mov     ah, RET_HD_INVALID
     121    SKIP2B  f
     122CannotAlignPointerProperly:
     123    mov     ah, RET_HD_BOUNDARY
    122124ZeroSectorsRequestedSoNoErrors:
    123 CannotAlignPointerProperly:
    124125    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
    125126
Note: See TracChangeset for help on using the changeset viewer.