Changeset 524 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Mar 14, 2013, 2:28:30 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Min time to display hotkeys finally work correctly.
  • AT builds do not copy existing INT 13h handler to 40h by default, XT builds do.
  • Interrupts are enabled for Primary and Secondary controller by default on AT builds.
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
6 edited

Legend:

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

    r521 r524  
    8080%ifdef MODULE_HOTKEYS
    8181    call    TimerTicks_ReadFromBdaToAX
    82     add     ax, BYTE MIN_TIME_TO_DISPLAY_HOTKEY_BAR
    83     mov     [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeToClose], ax
     82    mov     [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeWhenDisplayed], ax
    8483%endif
    8584
     
    8988.WaitUntilTimeToCloseHotkeyBar:
    9089    call    TimerTicks_ReadFromBdaToAX
    91     cmp     ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeToClose]
     90    sub     ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeWhenDisplayed]
     91    cmp     ax, MIN_TIME_TO_DISPLAY_HOTKEY_BAR
    9292    jb      SHORT .WaitUntilTimeToCloseHotkeyBar
    9393%endif
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm

    r392 r524  
    2222SECTION .text
    2323
     24%ifdef COPY_13H_HANDLER_TO_40H
    2425;--------------------------------------------------------------------
    2526; Checks is floppy drive handler installed to interrupt vector 40h.
     
    103104%endif
    104105
     106%endif ; COPY_13H_HANDLER_TO_40H
     107
    105108
    106109;--------------------------------------------------------------------
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r522 r524  
    6464    mov     [RAMVARS.fpOldI13h], ax             ; Store old INT 13h offset
    6565
    66     ; NOTE! Installing INT 40h handler is currently uncommented to test
    67     ; if it is really needed. I suspect that it is not. Many bytes can be
    68     ; saved if INT 40h related code can be removed.
    69 %if 0
    70 
     66%ifdef COPY_13H_HANDLER_TO_40H
    7167    ; Only store INT 13h handler to 40h if 40h is not already installed.
    7268    ; At least AMI BIOS for 286 stores 40h handler by itself and calls
     
    7773    mov     [es:BIOS_DISKETTE_INTERRUPT_40h*4+2], dx    ; Store old INT 13h segment
    7874.Int40hAlreadyInstalled:
    79 %endif ; 0
     75%endif ; COPY_13H_HANDLER_TO_40H
    8076
    8177    mov     al, BIOS_DISK_INTERRUPT_13h         ; INT 13h interrupt vector offset
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r522 r524  
    9191    at  ROMVARS.ideVars0+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
    9292    at  ROMVARS.ideVars0+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    93     at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  0
     93    at  ROMVARS.ideVars0+IDEVARS.bIRQ,              db  14
    9494    at  ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
    9595    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
     
    9898    at  ROMVARS.ideVars1+IDEVARS.wControlBlockPort, dw  DEVICE_ATA_SECONDARY_PORTCTRL
    9999    at  ROMVARS.ideVars1+IDEVARS.bDevice,           db  DEVICE_16BIT_ATA
    100     at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  0
     100    at  ROMVARS.ideVars1+IDEVARS.bIRQ,              db  15
    101101    at  ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
    102102    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   dw  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm

    r520 r524  
    3636%endif
    3737
    38     ; Clear to zero
     38    ; Clear all DRVDETECTINFO structs to zero
    3939    mov     al, DRVDETECTINFO_size
    4040    mul     BYTE [cs:ROMVARS.bIdeCnt]
    41 %ifdef MODULE_HOTKEYS ; We must not initialize anything before this!
    42     mov     di, BOOTVARS.hotkeyVars + HOTKEYVARS.clearToZeroFromThisPoint   
    43 %else
    44     mov     di, BOOTVARS.clearToZeroFromThisPoint
    45 %endif
    46     add     ax, BOOTVARS_size
    47     sub     ax, di
     41    mov     di, BOOTVARS.rgDrvDetectInfo    ; We must not initialize anything before this!
    4842    xchg    cx, ax
    4943
     
    5145    call    Memory_ZeroESDIwithSizeInCX
    5246
    53     ; Store default drives to boot from
     47    ; Initialize HOTKEYVARS by storing default drives to boot from
     48    mov     WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], DEFAULT_FLOPPY_DRIVE_LETTER | (DEFAULT_HARD_DRIVE_LETTER<<8)
    5449    mov     dl, [cs:ROMVARS.bBootDrv]
    55 
    56     ; fall through to BootVars_StoreHotkeyForDriveNumberInDL
    57 
    58 ;--------------------------------------------------------------------
    59 ; BootVars_StoreHotkeyForDriveNumberInDL
    60 ;   Parameters:
    61 ;       DL:     Floppy or Hard Drive number
    62 ;       DS:     RAMVARS Segment
    63 ;       ES:     BDA Segment
    64 ;   Returns:
    65 ;       Nothing
    66 ;   Corrupts registers:
    67 ;       AX, CX, DI
    68 ;--------------------------------------------------------------------
    69 BootVars_StoreHotkeyForDriveNumberInDL:
    70     mov     WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], DEFAULT_FLOPPY_DRIVE_LETTER | (DEFAULT_HARD_DRIVE_LETTER<<8)
    7150    call    DriveXlate_ConvertDriveNumberFromDLtoDriveLetter
    7251    jmp     HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL
     
    7453%else
    7554    jmp     Memory_ZeroESDIwithSizeInCX
    76 
    7755%endif ; MODULE_HOTKEYS
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm

    r522 r524  
    176176; IterateFindFirstDPTforIdevars
    177177;       DL:     Offset to IDEVARS to search from DPTs
     178;       SI:     Offset to this callback function
    178179;       DS:DI:  Ptr to DPT to examine
    179180;   Returns:
     
    183184IterateFindSecondDPTforIdevars:
    184185    call    IterateFindFirstDPTforIdevars
    185     jc      SHORT IterateFindFirstDPTforIdevars.done    ; Wrong controller
    186 
    187     ; We have found DPT for Master Drive,
    188     ; next DPT is for slave drive or master for another controller
    189     add     di, BYTE LARGEST_DPT_SIZE
    190     ; Fall to IterateFindFirstDPTforIdevars
     186    jc      SHORT .WrongController
     187    mov     si, IterateFindFirstDPTforIdevars
     188.WrongController:
     189    stc
     190    ret
    191191
    192192IterateFindFirstDPTforIdevars:
Note: See TracChangeset for help on using the changeset viewer.