Changeset 386 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Apr 12, 2012, 2:07:46 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Boot menu is now an optional module (MODULE_BOOT_MENU).
Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r376 r386  
    6161    push    ax                                      ; the hard disks don't ever use it, but it does no harm)
    6262
    63     jmp     short BootMenuPrint_RefreshInformation.FormatRelay
     63    jmp     SHORT BootMenuPrint_RefreshInformation.FormatRelay
    6464
    6565;--------------------------------------------------------------------
     
    7676BootMenuPrint_TitleStrings:
    7777    mov     si, ROMVARS.szTitle
    78     call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     78    call    DetectPrint_NullTerminatedStringFromCSSIandSetCF
    7979    CALL_DISPLAY_LIBRARY PrintNewlineCharacters
    8080    mov     si, ROMVARS.szVersion
    81     ; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    82 
    83 ;--------------------------------------------------------------------
    84 ; BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
    85 ;   Parameters:
    86 ;       CS:SI:  Ptr to NULL terminated string to print
    87 ;   Returns:
    88 ;       CF:     Set since menu event was handled successfully
    89 ;   Corrupts registers:
    90 ;       AX, DI
    91 ;--------------------------------------------------------------------
    92 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF:
    93 ;
    94 ; We send all CSSI strings through the Format routine for the case of
    95 ; compressed strings, but this doesn't hurt in the non-compressed case either
    96 ; (perhaps a little slower, but shouldn't be noticeable to the user)
    97 ; and results in smaller code size.
    98 ;
    99     push    bp
    100     mov     bp,sp
    101     jmp     short BootMenuPrint_RefreshInformation.FormatRelay
     81    jmp     DetectPrint_NullTerminatedStringFromCSSIandSetCF
    10282
    10383
     
    186166
    187167.FormatRelay:
    188     jmp     short BootMenuPrint_FormatCSSIfromParamsInSSBP
     168    jmp     DetectPrint_FormatCSSIfromParamsInSSBP
    189169
    190170
     
    222202
    223203    test    di,di
    224     jz      short BootMenuPrint_FormatCSSIfromParamsInSSBP
     204    jz      SHORT BootMenuPrint_RefreshInformation.FormatRelay
    225205
    226206%include "BootMenuPrintCfg.asm"         ; inline of code to fill out remainder of information string
    227 
    228 ;;; fall-through to BootMenuPrint_FormatCSSIfromParamsInSSBP
    229 
    230 
    231 ;--------------------------------------------------------------------
    232 ; BootMenuPrint_FormatCSSIfromParamsInSSBP
    233 ;   Parameters:
    234 ;       CS:SI:  Ptr to string to format
    235 ;       BP:     SP before pushing parameters
    236 ;   Returns:
    237 ;       BP:     Popped from stack
    238 ;       CF:     Set since menu event was handled successfully
    239 ;   Corrupts registers:
    240 ;       AX, DI
    241 ;--------------------------------------------------------------------
    242 BootMenuPrint_FormatCSSIfromParamsInSSBP:
    243     CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
    244     stc             ; Successful return from menu event
    245     pop     bp
    246     ret
     207    jmp     DetectPrint_FormatCSSIfromParamsInSSBP
    247208
    248209
     
    371332    push    cx          ; Key attribute for last space
    372333    mov     si, g_szHotkey
    373 
    374 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
    375     jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    376 
    377 
    378 ;--------------------------------------------------------------------
    379 ; BootMenuPrint_InitializeDisplayContext
    380 ;   Parameters:
    381 ;       Nothing
    382 ;   Returns:
    383 ;       Nothing
    384 ;   Corrupts registers:
    385 ;       AX, DI
    386 ;--------------------------------------------------------------------
    387 BootMenuPrint_InitializeDisplayContext:
    388     CALL_DISPLAY_LIBRARY InitializeDisplayContext
    389     ret
     334    jmp     DetectPrint_FormatCSSIfromParamsInSSBP
    390335
    391336
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm

    r376 r386  
    3434;--------------------------------------------------------------------
    3535BootSector_TryToLoadFromDriveDL:
    36     call    BootPrint_TryToBootFromDL
     36    call    DetectPrint_TryToBootFromDL
    3737    call    LoadFirstSectorFromDriveDL
    3838    jc      SHORT .FailedToLoadFirstSector
     
    4646    ret
    4747.FailedToLoadFirstSector:
    48     call    BootPrint_FailedToLoadFirstSector
     48    call    DetectPrint_FailedToLoadFirstSector
    4949    clc
    5050    ret
    5151.FirstHardDiskSectorNotBootable:
    5252    mov     si, g_szBootSectorNotFound
    53     call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     53    call    DetectPrint_NullTerminatedStringFromCSSIandSetCF
    5454    clc
    5555    ret
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r376 r386  
    4343;       Never returns (loads operating system)
    4444;--------------------------------------------------------------------
    45 ALIGN JUMP_ALIGN
    4645Int19h_BootLoaderHandler:
    4746    sti
     
    9291.SelectDriveToBootFrom:
    9392    call    RamVars_GetSegmentToDS
     93%ifdef MODULE_BOOT_MENU
    9494    cmp     WORD [cs:ROMVARS.wfDisplayBootMenu], BYTE 0
    9595    jne     SHORT ProcessBootMenuSelectionsUntilBootableDriveSelected   ; Display boot menu
     96%endif
    9697    ; Fall to BootFromDriveAthenTryDriveC
    9798
     
    112113
    113114
     115%ifdef MODULE_BOOT_MENU
    114116;--------------------------------------------------------------------
    115117; ProcessBootMenuSelectionsUntilBootableDriveSelected
     
    126128    ; Fall to Int19hMenu_JumpToBootSector_or_RomBoot
    127129    ; (CF is set or we wouldn't be here, see "jnc" immediately above)
     130%endif
    128131
    129132;--------------------------------------------------------------------
     
    143146;       Never returns
    144147;--------------------------------------------------------------------
    145 ALIGN JUMP_ALIGN
    146148Int19hMenu_JumpToBootSector_or_RomBoot:
    147149    mov     cx, es      ; Preserve MBR segment (can't push because of stack change)
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r376 r386  
    199199DetectDrives_DriveNotFound:
    200200    mov     si, g_szNotFound
    201     jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     201    jmp     DetectPrint_NullTerminatedStringFromCSSIandSetCF
    202202
    203203
     
    219219    jc      SHORT DetectDrives_DriveNotFound
    220220    call    BootMenuInfo_CreateForHardDisk
    221     jmp     short DetectPrint_DriveNameFromBootnfoInESBX
     221    jmp     SHORT DetectPrint_DriveNameFromBootnfoInESBX
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r376 r386  
    2222
    2323;--------------------------------------------------------------------
     24; BootMenuPrint_InitializeDisplayContext
     25;   Parameters:
     26;       Nothing
     27;   Returns:
     28;       Nothing
     29;   Corrupts registers:
     30;       AX, DI
     31;--------------------------------------------------------------------
     32BootMenuPrint_InitializeDisplayContext:
     33    CALL_DISPLAY_LIBRARY InitializeDisplayContext
     34    ret
     35
     36
     37;--------------------------------------------------------------------
    2438; Prints BIOS name and segment address where it is found.
    2539;
     
    3953    push    cs                          ; BIOS segment
    4054
    41 DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
    42     jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
     55    jmp     DetectPrint_FormatCSSIfromParamsInSSBP
    4356
    4457
     
    122135    mov     si, g_szDetectOuter             ; Load SI with default wrapper string "IDE %s at %s: "
    123136
    124     jmp     short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
     137    jmp     SHORT DetectPrint_FormatCSSIfromParamsInSSBP
    125138
    126139
     
    146159    pop     di
    147160    ret
     161
     162;--------------------------------------------------------------------
     163; DetectPrint_FailedToLoadFirstSector
     164;   Parameters:
     165;       AH:     INT 13h error code
     166;   Returns:
     167;       Nothing
     168;   Corrupts registers:
     169;       AX, CX, SI, DI
     170;--------------------------------------------------------------------
     171DetectPrint_FailedToLoadFirstSector:
     172    push    bp
     173    mov     bp, sp
     174    eMOVZX  cx, ah
     175    push    cx                  ; Push INT 13h error code
     176    mov     si, g_szReadError
     177    jmp     SHORT DetectPrint_FormatCSSIfromParamsInSSBP
     178
     179
     180;--------------------------------------------------------------------
     181; DetectPrint_TryToBootFromDL
     182;   Parameters:
     183;       DL:     Drive to boot from (translated, 00h or 80h)
     184;       DS:     RAMVARS segment
     185;   Returns:
     186;       Nothing
     187;   Corrupts registers:
     188;       AX, SI, DI
     189;--------------------------------------------------------------------
     190DetectPrint_TryToBootFromDL:
     191    push    bp
     192    mov     bp, sp
     193
     194    mov     ax, g_szHDD
     195    test    dl, dl
     196    js      SHORT .NotFDD
     197    mov     ax, g_szFDD
     198.NotFDD:
     199    push    ax
     200
     201    call    DriveXlate_ToOrBack
     202    push    dx                  ; Push untranslated drive number
     203    call    DriveXlate_ToOrBack
     204    push    dx                  ; Push translated drive number
     205
     206    mov     si, g_szTryToBoot
     207    jmp     SHORT DetectPrint_FormatCSSIfromParamsInSSBP   
     208
     209
     210;--------------------------------------------------------------------
     211; DetectPrint_NullTerminatedStringFromCSSIandSetCF
     212;   Parameters:
     213;       CS:SI:  Ptr to NULL terminated string to print
     214;   Returns:
     215;       CF:     Set since menu event was handled successfully
     216;   Corrupts registers:
     217;       AX, DI
     218;--------------------------------------------------------------------
     219DetectPrint_NullTerminatedStringFromCSSIandSetCF:
     220;
     221; We send all CSSI strings through the Format routine for the case of
     222; compressed strings, but this doesn't hurt in the non-compressed case either
     223; (perhaps a little slower, but shouldn't be noticeable to the user)
     224; and results in smaller code size.
     225;
     226    push    bp
     227    mov     bp,sp
     228    ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP
     229
     230;--------------------------------------------------------------------
     231; DetectPrint_FormatCSSIfromParamsInSSBP
     232;   Parameters:
     233;       CS:SI:  Ptr to string to format
     234;       BP:     SP before pushing parameters
     235;   Returns:
     236;       BP:     Popped from stack
     237;       CF:     Set since menu event was handled successfully
     238;   Corrupts registers:
     239;       AX, DI
     240;--------------------------------------------------------------------
     241DetectPrint_FormatCSSIfromParamsInSSBP:
     242    CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
     243    stc             ; Successful return from menu event
     244    pop     bp
     245    ret
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r380 r386  
    130130    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    131131
    132     at  ROMVARS.ideVars2+IDEVARS.wPort,         dw  DEVICE_XTIDE_DEFAULT_PORT           ; Controller Command Block base port
    133     at  ROMVARS.ideVars2+IDEVARS.wPortCtrl,     dw  DEVICE_XTIDE_DEFAULT_PORTCTRL       ; Controller Control Block base port
    134     at  ROMVARS.ideVars2+IDEVARS.bDevice,       db  DEVICE_XTIDE_REV1
     132    at  ROMVARS.ideVars2+IDEVARS.wPort,         dw  1E8h
     133    at  ROMVARS.ideVars2+IDEVARS.wPortCtrl,     dw  3E8h
     134    at  ROMVARS.ideVars2+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    135135    at  ROMVARS.ideVars2+IDEVARS.bIRQ,          db  0
    136136    at  ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,  db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    137137    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    138138
    139     at  ROMVARS.ideVars3+IDEVARS.wPort,         dw  168h            ; Controller Command Block base port
    140     at  ROMVARS.ideVars3+IDEVARS.wPortCtrl,     dw  368h            ; Controller Control Block base port
     139    at  ROMVARS.ideVars3+IDEVARS.wPort,         dw  168h
     140    at  ROMVARS.ideVars3+IDEVARS.wPortCtrl,     dw  368h
    141141    at  ROMVARS.ideVars3+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    142142    at  ROMVARS.ideVars3+IDEVARS.bIRQ,          db  0
     
    231231
    232232    ; Boot loader
    233     %include "BootPrint.asm"        ; For printing boot information
    234233    %include "Int19h.asm"           ; For Int 19h, Boot Loader
    235234    %include "FloppyDrive.asm"      ; Floppy Drive related functions
Note: See TracChangeset for help on using the changeset viewer.