Changeset 556 in xtideuniversalbios


Ignore:
Timestamp:
Jun 16, 2013, 4:23:00 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Removed Windows 98 fix since it broke floppy drive translation.
  • Removed very late initialization from AT builds since it slowed down Windows 98 for unknown reason.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
5 edited

Legend:

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

    r555 r556  
    7979
    8080;--------------------------------------------------------------------
    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
     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
    8687;   Parameters:
    8788;       AH:     Bios function
     
    9192;       Depends on function
    9293;--------------------------------------------------------------------
    93 DirectCallToFloppyHandler40h:
    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 ;--------------------------------------------------------------------
    11994ALIGN JUMP_ALIGN
    12095Int13h_DiskFunctionsHandler:
    121     test    dl, dl                      ; Floppy Drive?
    122     jns     SHORT DirectCallToFloppyHandler40h
    123 WeHandleTheFloppyFunction:
    124 
    12596%ifndef RELOCATE_INT13H_STACK
    12697    sti                                 ; Enable interrupts
    127 %endif 
     98%endif
    12899    cld                                 ; String instructions to increment pointers
    129100    CREATE_FRAME_INTPACK_TO_SSBP    SIZE_OF_IDEPACK_WITHOUT_INTPACK
     
    167138    jz      SHORT .OurFunction          ; We handle all function 0h requests (resets)
    168139
    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
     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, GET_DRIVE_PARAMETERS
    171147    je      SHORT .OurFunction
    172148    ; Fall to Int13h_DirectCallToAnotherBios
     
    198174    push    bp
    199175    mov     bp, [bp+IDEPACK.intpack+INTPACK.bp]
    200     int     BIOS_DISK_INTERRUPT_13h ; Can safely do as much recursion as it wants
     176
     177    test    dl, dl
     178    js      SHORT .CallHardDiskHandler
     179    int     BIOS_DISKETTE_INTERRUPT_40h ; Windows 98 requires we call INT 40h for floppy drives (reason unknown)
     180    SKIP2B  bp                          ; Skip INT 13h
     181.CallHardDiskHandler:
     182    int     BIOS_DISK_INTERRUPT_13h     ; Can safely do as much recursion as it wants
    201183
    202184    ; Store returned values to INTPACK
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r555 r556  
    3131    sti                                         ; Enable interrupts
    3232    cld                                         ; String instructions to increment pointers
     33%ifndef USE_AT
    3334    call    Int13hBiosInit_RestoreSystemHandler ; Needed if initialization was started on INT 13h instead on 19h
     35%endif
    3436    LOAD_BDA_SEGMENT_TO es, ax                  ; Load BDA segment (zero) to ES
    3537    ; Fall to .PrepareBootLoaderStack
     
    114116    mov     dl, 80h     ; Reset all hard drives and floppy drives
    115117    int     BIOS_DISK_INTERRUPT_13h
    116     ;call   ResetHardDisksHandledByOurBIOS.ErrorCodeNotUsed ; Our drives only
    117118    ; Fall to SelectDriveToBootFrom
    118119
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r555 r556  
    3737    push    ds
    3838
    39 %ifndef USE_186
    40     push    ax
    41     LOAD_BDA_SEGMENT_TO ds, ax
    42 %else
     39%ifdef USE_AT
    4340    push    BYTE 0
    4441    pop     ds
     42%else
     43    push    ax                          ; We use AX to install very late init handler
     44    LOAD_BDA_SEGMENT_TO ds, ax
    4545%endif
    4646
     
    5353    mov     [BIOS_BOOT_LOADER_INTERRUPT_19h*4+2], cs
    5454
     55    ; Very late initialization for XT builds only
     56%ifndef USE_AT
     57    push    es
    5558    ; Install special INT 13h hander that initializes XTIDE Universal BIOS
    5659    ; when our INT 19h is not called
     
    6063    mov     WORD [BIOS_DISK_INTERRUPT_13h*4], Int13hBiosInit_Handler
    6164    mov     [BIOS_DISK_INTERRUPT_13h*4+2], cs
     65    pop     es
     66%endif
    6267
    6368.SkipRomInitialization:
    64 %ifndef USE_186
     69%ifndef USE_AT
    6570    pop     ax
    6671%endif
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r552 r556  
    145145
    146146%ifdef MODULE_8BIT_IDE_ADVANCED
     147    at  ROMVARS.ideVars1+IDEVARS.wBasePort,             dw  DEVICE_XTIDE_DEFAULT_PORT       ; Controller Command Block base port
    147148    at  ROMVARS.ideVars1+IDEVARS.bDevice,               db  DEVICE_8BIT_XTCF_PIO8
    148149%endif
     
    257258
    258259    ; INT 13h Hard Disk BIOS functions
     260%ifndef USE_AT
    259261    %include "Int13hBiosInit.asm"
     262%endif
    260263    %include "Int13h.asm"           ; For Int 13h, Disk functions
    261264    %include "AH0h_HReset.asm"
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm

    r547 r556  
    7777    mov     WORD [RAMVARS.wDrvDetectSignature], RAMVARS_DRV_DETECT_SIGNATURE
    7878    mov     WORD [RAMVARS.wSignature], RAMVARS_RAM_SIGNATURE
    79 ;; There used to be a DriveXlate_Reset call here.  It isn't necessary, as we reset
    80 ;; when entering the boot menu and also before transferring control at boot time and
    81 ;; for ROM boots (in int19h.asm).
     79%ifdef MODULE_DRIVEXLATE
     80    call    DriveXlate_Reset
     81%endif
    8282
    8383    pop     es
Note: See TracChangeset for help on using the changeset viewer.