Changeset 196 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


Ignore:
Timestamp:
Nov 19, 2011, 11:18:39 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Added printing of COM port and baud rate, when set explicitly by idecfg. Although it eats some bytes, I think it is worth it, since the BIOS will be looking for a server on a particular com port and baud rate, and it could be hard to troubleshoot a mismatch without this information. However, if we become space crunched, this change can be backed out.

Location:
trunk/XTIDE_Universal_BIOS/Src/Initialization
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r189 r196  
    2121    mov     bp, ROMVARS.ideVars0            ; CS:BP now points to first IDEVARS
    2222.DriveDetectLoop:
    23     mov     si,g_szDetect
     23    mov     si, g_szDetect
     24%ifdef MODULE_SERIAL
     25    cmp     byte [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT
     26    jnz     .DriveNotSerial
     27    mov     si, g_szDetectCOM
     28.DriveNotSerial:
     29%endif
    2430    call    .DetectDrives_WithIDEVARS       ; Detect Master and Slave
    2531    add     bp, BYTE IDEVARS_size           ; Point to next IDEVARS
     
    3036    jz      .done
    3137    mov     bp, ROMVARS.ideVarsSerialAuto
    32     mov     si,g_szSerial
     38    mov     si, g_szDetectCOMAuto
    3339;;; fall-through       
    3440%else
     
    5258.DetectDrives_WithIDEVARS:
    5359    push    cx
    54        
    55     push    si
     60
     61    push    si     
    5662    mov     ax, g_szMaster
    5763    mov     bh, MASK_DRVNHEAD_SET                               ; Select Master drive
    5864    call    StartDetectionWithDriveSelectByteInBHandStringInAX  ; Detect and create DPT + BOOTNFO
    5965    pop     si
    60        
     66
    6167    mov     ax, g_szSlave
    6268    mov     bh, MASK_DRVNHEAD_SET | FLG_DRVNHEAD_DRV
     
    112118    ;call   ReadAtapiInfoFromDrive      ; Assume CD-ROM
    113119    ;jnc    SHORT _CreateBiosTablesForCDROM
    114     jmp     DetectPrint_DriveNotFound
     120    jmp     short DetectDrives_DriveNotFound
    115121
    116122
     
    130136CreateBiosTablesForHardDisk:
    131137    call    CreateDPT_FromAtaInformation
    132     jc      SHORT .InvalidAtaInfo
     138    jc      SHORT DetectDrives_DriveNotFound
    133139    call    BootInfo_CreateForHardDisk
    134     jmp     DetectPrint_DriveNameFromBootnfoInESBX
    135 .InvalidAtaInfo:
    136     jmp     DetectPrint_DriveNotFound
     140    jmp     short DetectPrint_DriveNameFromBootnfoInESBX
     141
     142;--------------------------------------------------------------------
     143; DetectDrives_DriveNotFound
     144;   Parameters:
     145;       Nothing
     146;   Returns:
     147;       Nothing
     148;   Corrupts registers:
     149;       AX, SI
     150;--------------------------------------------------------------------
     151DetectDrives_DriveNotFound:     
     152    mov     si, g_szNotFound
     153    jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF     
     154
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r192 r196  
    3636;       Nothing
    3737;   Corrupts registers:
    38 ;       AX, SI, DI
     38;       AX, SI, DI, CX
    3939;--------------------------------------------------------------------
    4040DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
    4141    push    bp
    4242    mov     di, [cs:bp+IDEVARS.wPort]
     43%ifdef MODULE_SERIAL
     44    mov     cx, [cs:bp+IDEVARS.wSerialPackedPrintBaud]
     45%endif
     46       
    4347    mov     bp, sp
    44     push    ax                          ; Push "Master" or "Slave"
    45     push    di                          ; Push port number
    46     jmp     DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
     48
     49    push    ax                          ; Push "Master" or "Slave"
     50       
     51    push    di                          ; Push Port address or COM port number
     52
     53%ifdef MODULE_SERIAL
     54;
     55; Baud rate is packed into one word:
     56;    High order 6 bits: number to add to '0' to get postfix character ('0' or 'K')
     57;    Low order 10 bits: binary number to display (960, 240, 38, or 115)
     58;          To get 9600: '0'<<10 + 960
     59;          To get 2400: '0'<<10 + 240
     60;          To get 38K:  ('K'-'0')<<10 + 38
     61;          To get 115K: ('K'-'0')<<10 + 115
     62;
     63    mov     ax,cx                       ; Unpack baud rate number
     64    and     ax,03ffh
     65    push    ax
     66
     67    mov     al,ch                       ; Unpack baud rate postfix ('0' or 'K')
     68    eSHR_IM al,2
     69    add     al,'0'
     70    push    ax
     71%endif
     72                       
     73    jmp     short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay   
    4774
    4875
     
    7097
    7198
    72 ;--------------------------------------------------------------------
    73 ; DetectPrint_DriveNotFound
    74 ;   Parameters:
    75 ;       Nothing
    76 ;   Returns:
    77 ;       Nothing
    78 ;   Corrupts registers:
    79 ;       AX, SI
    80 ;--------------------------------------------------------------------
    81 DetectPrint_DriveNotFound:
    82     mov     si, g_szNotFound
    83     jmp     BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
     99
Note: See TracChangeset for help on using the changeset viewer.