Changeset 199 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Nov 21, 2011, 11:01:08 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
r196 r199 119 119 mov cl, dl 120 120 121 and cl, SerialCommand_PackedPortAndBaud_BaudMask121 and cl, DEVICE_SERIAL_PACKEDPORTANDBAUD_BAUDMASK 122 122 shl cl, 1 123 123 mov ch, SerialCommand_UART_divisorLow_startingBaud … … 125 125 adc ch, 0 126 126 127 and dl, SerialCommand_PackedPortAndBaud_PortMask127 and dl, DEVICE_SERIAL_PACKEDPORTANDBAUD_PORTMASK 128 128 mov dh, 0 129 129 shl dx, 1 ; port offset already x4, needs one more shift to be x8 130 add dx, SerialCommand_PackedPortAndBaud_StartingPort130 add dx, DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT 131 131 132 132 ; … … 501 501 SerialCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH: 502 502 503 mov d l,[cs:bp+IDEVARS.bSerialPackedPortAndBaud]503 mov dx,[cs:bp+IDEVARS.bSerialCOMDigit] 504 504 test dl,dl 505 505 jz SerialCommand_AutoSerial 506 506 507 xchg dh,dl ; dh (the COM character to print) will be transmitted to the server, 508 ; so we know this is not an auto detect 509 507 510 ; fall-through 508 511 SerialCommand_IdentifyDeviceInDL_DriveInBH: … … 543 546 ; 544 547 545 SerialCommand_ScanPortAddresses: db 0b8h, 0f8h, 0bch, 0bah, 0fah, 0beh, 0feh, 0 546 ; Corresponds to I/O port: 3f8, 2f8, 3e8, 2e8, 2f0, 3e0, 2e0, 260, 368, 268, 360, 270 547 ; COM Assignments: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 548 ; Corresponds to Packed I/O port (hex): 37, 17, 35, 15, 16, 34, 14, 4, 25, 5, 24, 6 548 SerialCommand_ScanPortAddresses: db DEVICE_SERIAL_COM7 >> 2 549 db DEVICE_SERIAL_COM6 >> 2 550 db DEVICE_SERIAL_COM5 >> 2 551 db DEVICE_SERIAL_COM4 >> 2 552 db DEVICE_SERIAL_COM3 >> 2 553 db DEVICE_SERIAL_COM2 >> 2 554 db DEVICE_SERIAL_COM1 >> 2 555 db 0 549 556 550 557 ALIGN JUMP_ALIGN … … 581 588 ; Pack into dl, baud rate starts at 0 582 589 ; 583 add dx,-(SerialCommand_PackedPortAndBaud_StartingPort) 584 shr dx,1 590 add dx,-(DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) 591 shr dx,1 ; dh is zero at this point, and will be sent to the server, 592 ; so we know this is an auto detect 585 593 586 594 jmp .testFirstBaud -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r196 r199 31 31 add bp, BYTE IDEVARS_size ; Point to next IDEVARS 32 32 loop .DriveDetectLoop 33 34 33 %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 37 38 mov bp, ROMVARS.ideVarsSerialAuto 38 39 mov si, g_szDetectCOMAuto 39 ;;; fall-through 40 ;;; fall-through 40 41 %else 41 42 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." 42 47 %endif 43 48 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r196 r199 53 53 %ifdef MODULE_SERIAL 54 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 ; 55 ; Print baud rate from .wSerialPackedPrintBaud, in two parts - %u and then %c 56 ; 63 57 mov ax,cx ; Unpack baud rate number 64 and ax, 03ffh58 and ax,DEVICE_SERIAL_PRINTBAUD_NUMBERMASK 65 59 push ax 66 60 67 61 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 70 64 push ax 71 65 %endif -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r192 r199 82 82 at ROMVARS.bStealSize, db 1 ; Steal 1kB from base memory 83 83 84 at ROMVARS.ideVars0+IDEVARS.wPort, dw 1F0h; Controller Command Block base port85 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw 3F0h; Controller Control Block base port84 at ROMVARS.ideVars0+IDEVARS.wPort, dw DEVICE_ATA_DEFAULT_PORT ; Controller Command Block base port 85 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw DEVICE_ATA_DEFAULT_PORTCTRL ; Controller Control Block base port 86 86 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_16BIT_ATA 87 87 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 0 … … 96 96 at ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 97 97 98 at ROMVARS.ideVars2+IDEVARS.wPort, dw 300h; Controller Command Block base port99 at ROMVARS.ideVars2+IDEVARS.wPortCtrl, dw 308h; Controller Control Block base port98 at ROMVARS.ideVars2+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 99 at ROMVARS.ideVars2+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port 100 100 at ROMVARS.ideVars2+IDEVARS.bDevice, db DEVICE_8BIT_DUAL_PORT_XTIDE 101 101 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 … … 127 127 at ROMVARS.bStealSize, db 1 ; Steal 1kB from base memory in full mode 128 128 129 at ROMVARS.ideVars0+IDEVARS.wPort, dw 300h; Controller Command Block base port130 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw 308h; Controller Control Block base port129 at ROMVARS.ideVars0+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port 130 at ROMVARS.ideVars0+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port 131 131 at ROMVARS.ideVars0+IDEVARS.bDevice, db DEVICE_8BIT_DUAL_PORT_XTIDE 132 132 at ROMVARS.ideVars0+IDEVARS.bIRQ, db 0 ; IRQ
Note:
See TracChangeset
for help on using the changeset viewer.