Changeset 217 in xtideuniversalbios for trunk/Serial_Server/win32


Ignore:
Timestamp:
Jan 23, 2012, 10:08:13 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Serial Server: various improvements, turned on LBA28 support by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Serial_Server/win32/Win32.cpp

    r215 r217  
    2626        "usage: SerDrive [options] imagefile [[slave-options] slave-imagefile]",
    2727        "",
    28         "  -g cyl:sect:head  Geometry in cylinders, sectors per cylinder, and heads",
    29         "                    (default is 65:63:16 for a 32 MB disk)",
    30         "",
    31         "  -n [megabytes]    Create new disk with given size or use -g geometry",
    32         "",
    33         "  -p                Named Pipe mode for emulators (pipe is '" PIPENAME "')",
    34         "",
    35         "  -c COMPortNumber  COM Port to use (default is first found)",
    36         "",
    37         "  -b BaudRate       Baud rate to use on the COM port ",
    38         "                    Without a rate multiplier: 2400, 9600, 38400, 115200",
    39         "                    With a 2x rate multiplier: 4800, 19200, 76800, 230400",
    40         "                    With a 4x rate multiplier: 9600, 38400, 153600, 460800",
    41         "                    Abbreviations also accepted (ie, '460K', '38.4K', etc)",
    42         "                    (default is 38400, 115200 in named pipe mode)",
    43         "",
    44         "  -t                Disable timeout, useful for long delays when debugging",
    45         "",
    46         "  -r                Read Only disk, do not allow writes",
    47         "",
    48         "  -v [level]        Reporting level 1-6, with increasing information",
     28        "  -g [cyl:head:sect]  Geometry in cylinders, sectors per cylinder, and heads",
     29        "                      -g without parameters uses CHS mode (default is LBA28)",
     30        "",
     31        "  -n [megabytes]      Create new disk with given size or use -g geometry",
     32        "                      Maximum size is 137.4 GB (LBA28 limit)",
     33        "                      (default is a 32 MB disk, with CHS geometry 65:63:16)",
     34        "",
     35        "  -p                  Named Pipe mode for emulators (pipe is '" PIPENAME "')",
     36        "",
     37        "  -c COMPortNumber    COM Port to use (default is first found)",
     38        "",
     39        "  -b BaudRate         Baud rate to use on the COM port ",
     40        "                      Without a rate multiplier: 2400, 9600, 38400, 115200",
     41        "                      With a 2x rate multiplier: 4800, 19200, 76800, 230400",
     42        "                      With a 4x rate multiplier: 9600, 38400, 153600, 460800",
     43        "                      Abbreviations also accepted (ie, '460K', '38.4K', etc)",
     44        "                      (default is 38400, 115200 in named pipe mode)",
     45        "",
     46        "  -t                  Disable timeout, useful for long delays when debugging",
     47        "",
     48        "  -r                  Read Only disk, do not allow writes",
     49        "",
     50        "  -v [level]          Reporting level 1-6, with increasing information",
    4951        "",
    5052        "On the client computer, a serial port can be configured for use as a hard disk",
     
    8385
    8486    unsigned long cyl = 0, sect = 0, head = 0;
    85     int readOnly = 0, createFile = 0, explicitGeometry = 0;
     87    int readOnly = 0, createFile = 0;
     88    int useCHS = 0;
    8689
    8790    int imagecount = 0;
     
    122125                break;           
    123126            case 'g': case 'G':
    124                 if( !Image::parseGeometry( argv[++t], &cyl, &sect, &head ) )
    125                     usage();
    126                 explicitGeometry = 1;
     127                if( atol(argv[t+1]) != 0 )
     128                {
     129                    if( !Image::parseGeometry( argv[++t], &cyl, &head, &sect ) )
     130                        usage();
     131                }
     132                useCHS = 1;
    127133                break;
    128134            case 'h': case 'H': case '?':
     
    137143                    head = 16;
    138144                    cyl = (size*1024*2) / (16*63);
    139                     explicitGeometry = 1;
    140145                }
    141146                break;
     
    157162        else if( imagecount < 2 )
    158163        {
    159             images[imagecount] = new FlatImage( argv[t], readOnly, imagecount, createFile, cyl, sect, head );
     164            images[imagecount] = new FlatImage( argv[t], readOnly, imagecount, createFile, cyl, head, sect, useCHS );
    160165            imagecount++;
    161             createFile = readOnly = cyl = sect = head = 0;
     166            createFile = readOnly = cyl = sect = head = useCHS = 0;
    162167        }
    163168        else
Note: See TracChangeset for help on using the changeset viewer.