Changeset 284 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Feb 29, 2012, 6:13:11 PM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Increased the width of the drive Model name that the boot menu display, better accomodating serial drives on auto detect which include the COM port and baud rate information.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/library/Image.cpp

    r277 r284  
    192192
    193193#define ATA_strModel 27
    194 #define ATA_strModel_Length 40
     194#define ATA_strModel_Length 40                 // Maximum allowable length of the string according to the ATA spec
     195#define XTIDEBIOS_strModel_Length 30           // Maximum length copied out of the ATA information by the BIOS
    195196
    196197#define ATA_wCaps 49
     
    240241{
    241242    char formatBuff[ 128 ];
     243    char speedBuff[ 128 ];
    242244
    243245    memset( &buff[0], 0, 514 );
     
    256258
    257259        if( comPort )
    258             sprintf( formatBuff, "%.15s (COM%c/%s) ", shortFileName, comPort, baudRate->display );
     260            sprintf( speedBuff, " (COM%c/%s)", comPort, baudRate->display );
    259261        else
    260             sprintf( formatBuff, "%.25s (%s baud) ", shortFileName, baudRate->display );
     262            sprintf( speedBuff, " (%s baud)", shortFileName, baudRate->display );
     263
     264        sprintf( formatBuff, "%.*s%s ", XTIDEBIOS_strModel_Length - strlen(speedBuff), shortFileName, speedBuff );
    261265    }
    262266    else
    263         sprintf( formatBuff, "%.30s ", shortFileName );
     267        sprintf( formatBuff, "%.*s ", XTIDEBIOS_strModel_Length, shortFileName );
    264268    strncpy( (char *) &buff[ATA_strModel], formatBuff, ATA_strModel_Length );
    265269    flipEndian( &buff[ATA_strModel], ATA_strModel_Length );
     
    302306    buff[ ATA_wGenCfg ] = ATA_wGenCfg_FIXED;
    303307}
     308
  • trunk/Serial_Server/win32/Win32Serial.h

    r258 r284  
    4646                log( -1, "Could not ConnectNamedPipe" );
    4747
    48             if( baudRate->divisor > 3 )
     48            if( baudRate->divisor > 0x80 )
    4949                log( -1, "Cannot simulate baud rates with hardware multipliers" );
    5050
  • trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc

    r254 r284  
    1919; Boot Menu Information Table. These are generated for all XTIDE Universal
    2020; BIOS drives. Available only until boot is successfull.
    21 MAX_HARD_DISK_NAME_LENGTH               EQU     26      ; Bytes reserved for drive name
     21MAX_HARD_DISK_NAME_LENGTH               EQU     30      ; Bytes reserved for drive name
    2222
    2323struc BOOTMENUINFO
    2424    .szDrvName      resb    MAX_HARD_DISK_NAME_LENGTH
    2525                    resb    2       ; Zero word (ensures string terminates)
    26                     resb    8       ; padding to make BOOTMENUINFO size an even multiple of DPT size
     26                    resb    4       ; padding to make BOOTMENUINFO size an even multiple of DPT size
    2727endstruc
    2828
     
    3030
    3131%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS               
     32
     33%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
     34%error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
     35%endif
    3236
    3337%if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 0
Note: See TracChangeset for help on using the changeset viewer.