Changeset 243 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Feb 10, 2012, 2:00:50 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Brought back optional "A then C" boot loader.
  • Now there is only one INT 19h handler that remains unchanged.
Location:
trunk/XTIDE_Universal_BIOS
Files:
1 added
1 deleted
7 edited

Legend:

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

    r241 r243  
    5656; STORE_POST_STACK_POINTER
    5757;   Parameters:
    58 ;       DS:     BDA and Interrupt Vector segment (zero)
     58;       ES:     BDA and Interrupt Vector segment (zero)
    5959;   Returns:
    6060;       Nothing
     
    6363;--------------------------------------------------------------------
    6464%macro STORE_POST_STACK_POINTER 0
    65     mov     [BOOTVARS.dwPostStack], sp
    66     mov     [BOOTVARS.dwPostStack+2], ss
     65    mov     [es:BOOTVARS.dwPostStack], sp
     66    mov     [es:BOOTVARS.dwPostStack+2], ss
    6767%endmacro
    6868
     
    102102; Restores SS and SP to initial boot loader values.
    103103;
    104 ; Before doing any changes, see the note regarding
    105 ; LOAD_BDA_SEGMENT_TO in BootVars_SwitchToBootMenuStack
     104; Note! Must return with AX=0 and CF preserved.
     105; See Int19hMenu_JumpToBootSector_or_RomBoot.
    106106;
    107107; SWITCH_BACK_TO_POST_STACK
    108108;   Parameters:
    109 ;       Nothing
     109;       AX:     BDA and Interrupt Vector segment (zero)
    110110;   Returns:
    111111;       SS:SP:  Ptr to POST stack
    112112;   Corrupts registers:
    113 ;       Nothing
     113;       Nothing (not even FLAGS)
    114114;--------------------------------------------------------------------
    115115%macro SWITCH_BACK_TO_POST_STACK 0
    116116%ifndef USE_386
    117     cli                                 ; Disable interrupts
    118     LOAD_BDA_SEGMENT_TO ss, sp
     117    cli
     118    mov     ss, ax
    119119    mov     sp, [ss:BOOTVARS.dwPostStack]
    120120    mov     ss, [ss:BOOTVARS.dwPostStack+2]
    121     sti                                 ; Enable interrupts
     121    sti
    122122%else
    123     LOAD_BDA_SEGMENT_TO ss, sp
     123    mov     ss, ax
    124124    lss     sp, [ss:BOOTVARS.dwPostStack]
    125 %endif
     125%endif 
    126126%endmacro
    127127
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r242 r243  
    1717    .wFlags             resb    2   ; Word for ROM flags
    1818    .wDisplayMode       resb    2   ; Display mode for boot menu
     19    .wfDisplayBootMenu:             ; Zero = no Boot Menu, non-zero = Boot Menu timeout
    1920    .wBootTimeout       resb    2   ; Boot Menu selection timeout in system timer ticks
    2021    .bIdeCnt            resb    1   ; Number of available IDE controllers
     
    3940                                                ; by holding down the ALT key at the end of drive detection.
    4041                                                ; (Conveniently, this is 8, a fact we exploit when testing the bit)
     42FLG_ROMVARS_MODULE_JRIDE            EQU (1<<5)  ; Here in case the configuration needs to know functionality is present
    4143FLG_ROMVARS_MODULE_SERIAL           EQU (1<<6)  ; Here in case the configuration needs to know functionality is present
    4244FLG_ROMVARS_MODULE_EBIOS            EQU (1<<7)  ; Here in case the configuration needs to know functionality is present
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm

    r241 r243  
    88; Displays Boot Menu and returns Drive or Function number.
    99;
    10 ; BootMenu_DisplayAndReturnSelection
     10; BootMenu_DisplayAndReturnSelectionInDX
    1111;   Parameters:
    1212;       DS:     RAMVARS segment
     
    1717;--------------------------------------------------------------------
    1818ALIGN JUMP_ALIGN
    19 BootMenu_DisplayAndReturnSelection:
     19BootMenu_DisplayAndReturnSelectionInDX:
    2020    call    DriveXlate_Reset
    2121    call    BootMenuPrint_TheBottomOfScreen
     
    2323    call    BootMenuPrint_ClearScreen
    2424    call    BootMenu_GetDriveToDXforMenuitemInCX
    25     jnc     BootMenu_DisplayAndReturnSelection
     25    jnc     BootMenu_DisplayAndReturnSelectionInDX
    2626    ret
    2727
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r241 r243  
    426426    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
    427427    db      2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
    428 
    429 
    430 
    431 
    432        
    433 
    434 
    435        
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm

    r229 r243  
    3030    ; Install INT 19h handler (boot loader) where drives are detected
    3131    mov     bx, BIOS_BOOT_LOADER_INTERRUPT_19h
    32     mov     si, HandlerForLateInitialization
     32    mov     si, Int19h_BootLoaderHandler
    3333    call    Interrupts_InstallHandlerToVectorInBXFromCSSI
    3434
     
    3939    popf
    4040    retf
    41 
    42 
    43 ;--------------------------------------------------------------------
    44 ; HandlerForLateInitialization
    45 ;   Parameters:
    46 ;       Nothing
    47 ;   Returns:
    48 ;       Never returns
    49 ;--------------------------------------------------------------------
    50 HandlerForLateInitialization:
    51     LOAD_BDA_SEGMENT_TO es, ax
    52     call    Initialize_AndDetectDrives      ; Installs new boot menu loader
    53     int     BIOS_BOOT_LOADER_INTERRUPT_19h  ; Display boot menu
    5441
    5542
     
    10390;   Parameters:
    10491;       DS:     RAMVARS segment
     92;       ES:     BDA and interrupt vector segment (zero)
    10593;   Returns:
    10694;       Nothing
    10795;   Corrupts registers:
    108 ;       All
     96;       All, except DS and ES
    10997;--------------------------------------------------------------------
    11098.ResetDetectedDrives:
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r181 r243  
    4343    ; 40h from 13h. That system locks to infinite loop if we copy 13h to 40h.
    4444    call    FloppyDrive_IsInt40hInstalled
    45     jc      SHORT .InitializeInt19h
     45    jc      SHORT .Int40hAlreadyInstalled
    4646    mov     [es:BIOS_DISKETTE_INTERRUPT_40h*4], ax      ; Store old INT 13h offset
    4747    mov     [es:BIOS_DISKETTE_INTERRUPT_40h*4+2], dx    ; Store old INT 13h segment
    48     ; Fall to .InitializeInt19h
    49 
    50 ;--------------------------------------------------------------------
    51 ; .InitializeInt19h
    52 ;   Parameters:
    53 ;       DS:     RAMVARS segment
    54 ;       ES:     BDA and Interrupt Vector segment (zero)
    55 ;   Returns:
    56 ;       Nothing
    57 ;   Corrupts registers:
    58 ;       BX, SI
    59 ;--------------------------------------------------------------------
    60 .InitializeInt19h:
    61     mov     bx, BIOS_BOOT_LOADER_INTERRUPT_19h
    62     mov     si, Int19hMenu_BootLoader
    63     call    Interrupts_InstallHandlerToVectorInBXFromCSSI
     48.Int40hAlreadyInstalled:
    6449    ; Fall to .InitializeHardwareIrqHandlers
    6550
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r239 r243  
    7070%endif
    7171
     72%ifdef MODULE_JRIDE
     73    MAIN_FLG_MODULE_JRIDE   equ FLG_ROMVARS_MODULE_JRIDE
     74%else
     75    MAIN_FLG_MODULE_JRIDE   equ 0
     76%endif
     77
     78
    7279;---------------------------;
    7380; AT Build default settings ;
    7481;---------------------------;
    7582%ifdef USE_AT
    76     at  ROMVARS.wFlags,         dw  FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS
     83    at  ROMVARS.wFlags,         dw  FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE
    7784    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    7885    at  ROMVARS.wBootTimeout,   dw  30 * TICKS_PER_SECOND   ; Boot Menu selection timeout
     
    117124; XT and XT+ Build default settings ;
    118125;-----------------------------------;
    119     at  ROMVARS.wFlags,         dw  FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS
     126    at  ROMVARS.wFlags,         dw  FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE
    120127    at  ROMVARS.wDisplayMode,   dw  DEFAULT_TEXT_MODE
    121128    at  ROMVARS.wBootTimeout,   dw  30 * TICKS_PER_SECOND   ; Boot Menu selection timeout
     
    178185
    179186    ; Boot loader
    180     %include "Int19hMenu.asm"       ; For Int 19h, Boot Loader for Boot Menu
     187    %include "Int19h.asm"           ; For Int 19h, Boot Loader
    181188
    182189    ; For all device types
Note: See TracChangeset for help on using the changeset viewer.