Changeset 175 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS
- Timestamp:
- Oct 22, 2011, 9:04:01 PM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r173 r175 12 12 .bFlagsHigh resb 1 13 13 .bIdevarsOffset resb 1 ; Offset to IDEVARS for this drive 14 resb 1 14 %ifdef MODULE_SERIAL 15 .bSerialPortAndBaud resb 1 ; Packed I/O port and baud rate for serial drives 16 %else 17 resb 1 ; without serial port support, alignment byte 18 %endif 15 19 16 20 ; IDE Drive related … … 44 48 FLGH_DPT_REVERSED_A0_AND_A3 EQU (1<<0) ; XTIDE mod, Address lines 0 and 3 reversed 45 49 FLGH_DPT_BLOCK_MODE_SUPPORTED EQU (1<<1) ; Use block transfer commands (must be bit 1!) 50 %ifdef MODULE_SERIAL 46 51 FLGH_DPT_SERIAL_DEVICE EQU (1<<2) ; Serial Port Device 52 %endif 47 53 FLGH_DPT_INTERRUPT_IN_SERVICE EQU (1<<3) ; Set when waiting for IRQ 48 54 FLGH_DPT_RESET_nDRDY EQU (1<<4) ; Drive ready to accept commands -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r150 r175 27 27 .ideVars2 resb IDEVARS_size 28 28 .ideVars3 resb IDEVARS_size 29 30 .ideVarsSerialAuto resb IDEVARS_size 29 31 endstruc 30 32 … … 32 34 FLG_ROMVARS_FULLMODE EQU (1<<0) ; Full operating mode (steals base RAM, supports EBIOS etc.) 33 35 FLG_ROMVARS_DRVXLAT EQU (1<<2) ; Enable drive number translation 36 %ifdef MODULE_SERIAL 37 FLG_ROMVARS_MODULE_SERIAL EQU (1<<3) 38 %else 39 FLG_ROMVARS_MODULE_SERIAL EQU 0 40 %endif 34 41 35 42 ; Boot Menu Display Modes (see Assembly Library Display.inc for standard modes) … … 47 54 endstruc 48 55 49 ; Device types for IDEVARS.bDevice Type56 ; Device types for IDEVARS.bDevice 50 57 DEVICE_8BIT_DUAL_PORT_XTIDE EQU (0<<1) 51 58 DEVICE_XTIDE_WITH_REVERSED_A3_AND_A0 EQU (1<<1) … … 53 60 DEVICE_16BIT_ATA EQU (3<<1) 54 61 DEVICE_32BIT_ATA EQU (4<<1) 62 %ifdef MODULE_SERIAL 55 63 DEVICE_SERIAL_PORT EQU (5<<1) 56 64 %endif 57 65 58 66 ; Master/Slave drive specific parameters -
trunk/XTIDE_Universal_BIOS/Src/Device/Device.asm
r161 r175 17 17 ;-------------------------------------------------------------------- 18 18 Device_FinalizeDPT: 19 %ifdef MODULE_SERIAL 19 20 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 20 jnz SHORT ReturnSuccessForSerialPort 21 jnz SHORT .FinalizeDptForSerialPortDevice 22 %endif 21 23 jmp IdeDPT_Finalize 22 ;.FinalizeDptForSerialPortDevice: ; Dead label 23 ; jmp SerialDPT_Finalize ; and code 24 24 %ifdef MODULE_SERIAL 25 .FinalizeDptForSerialPortDevice: 26 jmp SerialDPT_Finalize 27 %endif 25 28 26 29 ;-------------------------------------------------------------------- … … 35 38 ;-------------------------------------------------------------------- 36 39 Device_ResetMasterAndSlaveController: 40 %ifdef MODULE_SERIAL 37 41 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 38 42 jnz SHORT ReturnSuccessForSerialPort 43 %endif 39 44 jmp IdeCommand_ResetMasterAndSlaveController 40 45 … … 54 59 ;-------------------------------------------------------------------- 55 60 Device_IdentifyToBufferInESSIwithDriveSelectByteInBH: 61 %ifdef MODULE_SERIAL 56 62 cmp BYTE [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT 57 63 je SHORT .IdentifyDriveFromSerialPort 64 %endif 58 65 jmp IdeCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 66 %ifdef MODULE_SERIAL 59 67 .IdentifyDriveFromSerialPort: 60 68 jmp SerialCommand_IdentifyDeviceToBufferInESSIwithDriveSelectByteInBH 61 69 %endif 62 70 63 71 ;-------------------------------------------------------------------- … … 77 85 ALIGN JUMP_ALIGN 78 86 Device_OutputCommandWithParameters: 87 %ifdef MODULE_SERIAL 79 88 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 80 89 jnz SHORT .OutputCommandToSerialPort 90 %endif 81 91 jmp IdeCommand_OutputWithParameters 92 %ifdef MODULE_SERIAL 82 93 ALIGN JUMP_ALIGN 83 94 .OutputCommandToSerialPort: 84 95 jmp SerialCommand_OutputWithParameters 85 96 %endif 86 97 87 98 ;-------------------------------------------------------------------- … … 98 109 ALIGN JUMP_ALIGN 99 110 Device_SelectDrive: 111 %ifdef MODULE_SERIAL 100 112 test BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 101 113 jnz SHORT ReturnSuccessForSerialPort 114 %endif 102 115 jmp IdeCommand_SelectDrive 116 %ifdef MODULE_SERIAL 103 117 ReturnSuccessForSerialPort: 104 118 xor ax, ax 105 119 ret 120 %endif -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r150 r175 21 21 mov bp, ROMVARS.ideVars0 ; CS:BP now points to first IDEVARS 22 22 .DriveDetectLoop: 23 call DetectDrives_WithIDEVARS ; Detect Master and Slave23 call .DetectDrives_WithIDEVARS ; Detect Master and Slave 24 24 add bp, BYTE IDEVARS_size ; Point to next IDEVARS 25 25 loop .DriveDetectLoop 26 27 %ifdef MODULE_SERIAL 28 test BYTE [es:BDA.bKBFlgs1], (1<<2) 29 ;; jz .done 30 mov bp, ROMVARS.ideVarsAutoSerial 31 ;;; fall-through 32 %else 26 33 ret 27 34 %endif 28 35 29 36 ;-------------------------------------------------------------------- … … 40 47 ; AX, BX, DX, SI, DI 41 48 ;-------------------------------------------------------------------- 42 DetectDrives_WithIDEVARS:49 .DetectDrives_WithIDEVARS: 43 50 push cx 44 51 mov ax, g_szMaster … … 50 57 call StartDetectionWithDriveSelectByteInBHandStringInAX 51 58 pop cx 59 .done: 52 60 ret 53 61 54 62 55 63 ;-------------------------------------------------------------------- 56 64 ; StartDetectionWithDriveSelectByteInBHandStringInAX -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r165 r175 54 54 ;---------------------------; 55 55 %ifdef USE_AT 56 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT 56 at ROMVARS.wFlags, dw FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL 57 57 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 58 58 at ROMVARS.wBootTimeout, dw 30 * TICKS_PER_SECOND ; Boot Menu selection timeout … … 89 89 at ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 90 90 at ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 91 92 %ifdef MODULE_SERIAL 93 at ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice, db DEVICE_SERIAL_PORT 94 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 95 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 96 %endif 91 97 %else 92 98 ;-----------------------------------; 93 99 ; XT and XT+ Build default settings ; 94 100 ;-----------------------------------; 95 at ROMVARS.wFlags, dw FLG_ROMVARS_DRVXLAT 101 at ROMVARS.wFlags, dw FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MODULE_SERIAL 96 102 at ROMVARS.wDisplayMode, dw DEFAULT_TEXT_MODE 97 103 at ROMVARS.wBootTimeout, dw 30 * TICKS_PER_SECOND ; Boot Menu selection timeout … … 116 122 at ROMVARS.ideVars3+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 117 123 at ROMVARS.ideVars3+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 124 125 %ifdef MODULE_SERIAL 126 at ROMVARS.ideVarsSerialAuto+IDEVARS.bDevice, db DEVICE_SERIAL_PORT 127 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 128 at ROMVARS.ideVarsSerialAuto+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db FLG_DRVPARAMS_BLOCKMODE 129 %endif 118 130 %endif 119 131 iend … … 165 177 %include "IdeError.asm" ; Must be included after IdeWait.asm 166 178 179 %ifdef MODULE_SERIAL 167 180 ; Serial Port Device support 168 181 %include "SerialCommand.asm" 169 182 %include "SerialDPT.asm" 183 %endif 170 184 171 185 ; INT 13h Hard Disk BIOS functions -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r173 r175 63 63 .StoreFlags: 64 64 mov [di+DPT.wFlags], ax 65 66 %ifdef MODULE_SERIAL 67 cmp byte [cs:bp+IDEVARS.bDevice], DEVICE_SERIAL_PORT 68 jnz .around 69 or byte [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE 70 .around: 71 %endif 72 65 73 ; Fall to .StoreAddressing 66 74
Note:
See TracChangeset
for help on using the changeset viewer.