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


Ignore:
Timestamp:
Nov 21, 2011, 11:01:08 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Adding proper serial port support to the Configurator, which required some minor changes elsewhere. Also added an option, off by default, to automatically scan for serial drives at the end of normal drive detection (no ALT key required, although that is still available if the option is off).

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

Legend:

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

    r196 r199  
    3131    add     bp, BYTE IDEVARS_size           ; Point to next IDEVARS
    3232    loop    .DriveDetectLoop
    33 
    3433%ifdef MODULE_SERIAL
    35     test    BYTE [es:BDA.bKBFlgs1], 8       ; alt key depressed
    36     jz      .done
     34    mov     al,[cs:ROMVARS.wFlags]
     35    or      al,[es:BDA.bKBFlgs1]
     36    and     al,8        ; 8 = alt key depressed, same as FLG_ROMVARS_SERIAL_ALWAYSDETECT
     37    jz      .done
    3738    mov     bp, ROMVARS.ideVarsSerialAuto
    3839    mov     si, g_szDetectCOMAuto
    39 ;;; fall-through       
     40;;; fall-through                   
    4041%else
    4142    ret
     43%endif
     44
     45%if FLG_ROMVARS_SERIAL_SCANDETECT != 8
     46%error "DetectDrives is currently coded to assume that FLG_ROMVARS_SERIAL_ALWAYSDETECT is the same bit as the ALT key code in the BDA.  Changes in the code will be needed if these values are no longer the same."
    4247%endif
    4348
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r196 r199  
    5353%ifdef MODULE_SERIAL
    5454;
    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 ;
     55; Print baud rate from .wSerialPackedPrintBaud, in two parts - %u and then %c
     56;
    6357    mov     ax,cx                       ; Unpack baud rate number
    64     and     ax,03ffh
     58    and     ax,DEVICE_SERIAL_PRINTBAUD_NUMBERMASK
    6559    push    ax
    6660
    6761    mov     al,ch                       ; Unpack baud rate postfix ('0' or 'K')
    68     eSHR_IM al,2
    69     add     al,'0'
     62    eSHR_IM al,2                        ; also effectively masks off the postfix
     63    add     al,DEVICE_SERIAL_PRINTBAUD_POSTCHARADD
    7064    push    ax
    7165%endif
Note: See TracChangeset for help on using the changeset viewer.