Changeset 555 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Jun 15, 2013, 1:39:33 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Short timeouts for drive detection work again.
  • All drives are now reset before booting (instead of XTIDE Universal BIOS controlled drives only).
  • Windows 98 now works without tricks (Floppy Drive accesses are redirected from INT 13h to 40h).
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
4 edited

Legend:

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

    r542 r555  
    7979
    8080;--------------------------------------------------------------------
    81 ; Int 13h software interrupt handler.
    82 ; Jumps to specific function defined in AH.
    83 ;
    84 ; Note to developers: Do not make recursive INT 13h calls!
    85 ;
    86 ; Int13h_DiskFunctionsHandler
     81; Int 13h (Hard Drive) to Int 40h (Floppy Drive)
     82; We must not call previous INT 13h for floppy drives since it
     83; does not work on Windows 98 (when using HSFLOP.PDR driver) for some reason.
     84;
     85; DirectCallToFloppyHandler40h
    8786;   Parameters:
    8887;       AH:     Bios function
     
    9291;       Depends on function
    9392;--------------------------------------------------------------------
     93DirectCallToFloppyHandler40h:
     94; With serial floppy support, we handle all traffic for function 08h,
     95; as we need to wrap both hard disk and floppy drive counts.
     96%ifdef MODULE_SERIAL_FLOPPY
     97    cmp     ah, GET_DRIVE_PARAMETERS    ; 08h
     98    je      SHORT WeHandleTheFloppyFunction
     99%endif
     100
     101    int     BIOS_DISKETTE_INTERRUPT_40h
     102    retf    2           ; Skip FLAGS from stack
     103
     104
     105;--------------------------------------------------------------------
     106; Int 13h software interrupt handler.
     107; Jumps to specific function defined in AH.
     108;
     109; Note to developers: Do not make recursive INT 13h calls!
     110;
     111; Int13h_DiskFunctionsHandler
     112;   Parameters:
     113;       AH:     Bios function
     114;       DL:     Drive number
     115;       Other:  Depends on function
     116;   Returns:
     117;       Depends on function
     118;--------------------------------------------------------------------
    94119ALIGN JUMP_ALIGN
    95120Int13h_DiskFunctionsHandler:
     121    test    dl, dl                      ; Floppy Drive?
     122    jns     SHORT DirectCallToFloppyHandler40h
     123WeHandleTheFloppyFunction:
     124
    96125%ifndef RELOCATE_INT13H_STACK
    97126    sti                                 ; Enable interrupts
    98 %endif
     127%endif 
    99128    cld                                 ; String instructions to increment pointers
    100129    CREATE_FRAME_INTPACK_TO_SSBP    SIZE_OF_IDEPACK_WITHOUT_INTPACK
     
    138167    jz      SHORT .OurFunction          ; We handle all function 0h requests (resets)
    139168
    140 %ifndef MODULE_SERIAL_FLOPPY
    141 ; Without floppy support, we handle only hard disk traffic for function 08h.
    142     test    dl, dl
    143     jns     SHORT Int13h_DirectCallToAnotherBios
    144 %endif
    145 ; With floppy support, we handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts.
    146     cmp     ah, 8
     169; We handle all traffic for function 08h, as we need to wrap both hard disk and floppy drive counts.
     170    cmp     ah, GET_DRIVE_PARAMETERS    ; 08h
    147171    je      SHORT .OurFunction
    148172    ; Fall to Int13h_DirectCallToAnotherBios
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm

    r526 r555  
    9797
    9898
    99 
    100 ; This defines what is called when resetting our drives at the end of drive detection.
    101 AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization equ ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed
    102 
    10399;--------------------------------------------------------------------
    104100; ResetHardDisksHandledByOurBIOS
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r553 r555  
    7979;       DS:     RAMVARS segment
    8080;--------------------------------------------------------------------
     81.InitializeBiosAndDetectDrives:
    8182%ifdef MODULE_HOTKEYS
    8283    call    TimerTicks_ReadFromBdaToAX
     
    9798    jb      SHORT .WaitUntilTimeToCloseHotkeyBar
    9899%endif
     100    ; Fall to .ResetAllDrives
     101
     102
     103;--------------------------------------------------------------------
     104; .ResetAllDrives
     105;   Parameters:
     106;       DS:     RAMVARS segment
     107;       ES:     BDA and interrupt vector segment (zero)
     108;   Returns:
     109;       Nothing
     110;--------------------------------------------------------------------
     111.ResetAllDrives:
     112    ; Reset all drives in the system, not just our drives.
     113    xor     ax, ax      ; Disk Controller Reset
     114    mov     dl, 80h     ; Reset all hard drives and floppy drives
     115    int     BIOS_DISK_INTERRUPT_13h
     116    ;call   ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed ; Our drives only
    99117    ; Fall to SelectDriveToBootFrom
    100118
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r553 r555  
    8888    call    Interrupts_InitializeInterruptVectors   ; HotkeyBar requires INT 40h so install handlers before drive detection
    8989    call    DetectDrives_FromAllIDEControllers
     90    mov     [RAMVARS.wDrvDetectSignature], es       ; No longer in drive detection mode (set normal timeouts)
    9091    ; Fall to .StoreDptPointersToIntVectors
    9192
    92 
    93 %ifdef MODULE_COMPATIBLE_TABLES
    9493;--------------------------------------------------------------------
    9594; .StoreDptPointersToIntVectors
     
    102101;       AX, CX, DX, SI, DI
    103102;--------------------------------------------------------------------
     103%ifdef MODULE_COMPATIBLE_TABLES
    104104.StoreDptPointersToIntVectors:
    105105%ifndef USE_AT
     
    125125    mov     [es:HD1_DPT_POINTER_46h*4+2], ax
    126126.CompatibleDPTsCreated:
    127     ; Fall to .ResetDetectedDrives
    128127%endif ; MODULE_COMPATIBLE_TABLES
    129 
    130 
    131 ;--------------------------------------------------------------------
    132 ; .ResetDetectedDrives
    133 ;   Parameters:
    134 ;       DS:     RAMVARS segment
    135 ;       ES:     BDA and interrupt vector segment (zero)
    136 ;   Returns:
    137 ;       Nothing
    138 ;   Corrupts registers:
    139 ;       All, except DS and ES
    140 ;--------------------------------------------------------------------
    141 .ResetDetectedDrives:
    142     call    Idepack_FakeToSSBP
    143     call    AH0h_ResetAllOurHardDisksAtTheEndOfDriveInitialization
    144     add     sp, BYTE SIZE_OF_IDEPACK_WITHOUT_INTPACK
    145128    ret
Note: See TracChangeset for help on using the changeset viewer.