Changeset 233 in xtideuniversalbios for trunk/Serial_Server/library/Process.cpp
- Timestamp:
- Feb 4, 2012, 6:21:22 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Serial_Server/library/Process.cpp
r219 r233 31 31 unsigned char driveAndHead; 32 32 unsigned char count; 33 unsigned char undefined1;34 unsigned char port AndBaud;35 unsigned char undefined2;33 unsigned char scan; 34 unsigned char port; 35 unsigned char baud; 36 36 } inquire; 37 37 unsigned char b[514]; … … 48 48 #define SERIAL_COMMAND_MASK 0xe3 49 49 #define SERIAL_COMMAND_HEADERMASK 0xe0 50 51 #define SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK 352 #define SERIAL_INQUIRE_PORTANDBAUD_PORTMASK 0xfc53 #define SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT 0x24054 55 #define SERIAL_INQUIRE_PORTANDBAUD_PORTTRANSLATE( a ) ( ((a) & SERIAL_INQUIRE_PORTANDBAUD_PORT) << 1 | SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT )56 50 57 51 #define ATA_COMMAND_LBA 0x40 … … 96 90 unsigned long cyl, sect, head; 97 91 unsigned long perfTimer; 92 unsigned char lastScan; 98 93 99 94 GetTime_Timeout_Local = GetTime_Timeout(); … … 102 97 readto = 0; 103 98 workCount = workOffset = workCommand = 0; 99 lastScan = 0; 104 100 105 101 lasttick = GetTime(); … … 282 278 if( workCommand == SERIAL_COMMAND_INQUIRE ) 283 279 log( 1, "Inquire %d: Client Port=0x%x, Client Baud=%s", img == image0 ? 0 : 1, 284 ((buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_PORTMASK) << 1) 285 + SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT, 286 baudRateMatchDivisor( buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK )->display ); 280 ((unsigned short) buff.inquire.port) << 2, 281 baudRateMatchDivisor( buff.inquire.baud )->display ); 287 282 else if( buff.chs.driveAndHead & ATA_COMMAND_LBA ) 288 283 log( 1, "%s %d: LBA=%u, Count=%u", comStr, img == image0 ? 0 : 1, … … 325 320 if( workCommand == SERIAL_COMMAND_INQUIRE ) 326 321 { 322 unsigned char localScan; 323 327 324 if( serial->speedEmulation && 328 (buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK)!= serial->baudRate->divisor )325 buff.inquire.baud != serial->baudRate->divisor ) 329 326 { 330 327 log( 1, " Ignoring Inquire with wrong baud rate" ); … … 333 330 } 334 331 335 img->respondInquire( &buff.w[0], serial->baudRate, buff.inquire.portAndBaud ); 332 localScan = buff.inquire.scan; // need to do this before the call to 333 // img->respondInquire, as it will clear the buff 334 img->respondInquire( &buff.w[0], serial->baudRate, 335 ((unsigned short) buff.inquire.port) << 2, 336 (img == image1 && lastScan) || buff.inquire.scan ); 337 lastScan = localScan; 336 338 } 337 339 // … … 342 344 img->seekSector( mylba + workOffset ); 343 345 img->readSector( &buff.w[0] ); 346 lastScan = 0; 344 347 } 345 348
Note:
See TracChangeset
for help on using the changeset viewer.