Changeset 567 in xtideuniversalbios
- Timestamp:
- May 26, 2014, 1:25:15 PM (11 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 56 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Delay.inc
r287 r567 30 30 ; 31 31 ; LOOP instruction uses two bytes so aligned fetching will require: 32 ; 33 ; 34 ; 35 ; 32 ; 8088: 8 cycles (two BYTE reads) 33 ; 8086: 4 cycles (one WORD read) 34 ; 286: 2 cycles + wait states (usually 1) 35 ; 386: ? 36 36 ; 486: Fetched only once to internal cache 37 37 ; -
trunk/Assembly_Library/Src/Display/DisplayFormatCompressed.asm
r526 r567 65 65 ; Parameters: 66 66 ; DS: BDA segment (zero) 67 ; AX: 67 ; AX: Parameter to Format 68 68 ; ES:DI: Ptr to cursor location in video RAM 69 69 ; Returns: … … 94 94 DisplayFormatCompressed_Format_5_x: 95 95 mov si,16 ; hex output, change base to 16 96 mov bx,(04<<8) + 'h' 96 mov bx,(04<<8) + 'h' ; 4 bytes, with postfix character 'h' to emit 97 97 ; (note that the count includes the 'h') 98 98 jmp DisplayFormatCompressed_Format_u -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r532 r567 400 400 ; Parameters: 401 401 ; AL: Character to display 402 ; 402 ; Zero value is ignored (no character is printed) 403 403 ; DS: BDA segment (zero) 404 404 ; ES:DI: Ptr to cursor location in video RAM -
trunk/Assembly_Library/Src/Serial/SerialServer.asm
r566 r567 27 27 ; SerialServer_SendReceive: 28 28 ; Parameters: 29 ; 29 ; DX: Packed I/O port and baud rate 30 30 ; ES:SI: Ptr to buffer (for data transfer commands) 31 31 ; SS:BP: Ptr to SerialServer_Command structure 32 32 ; Returns: 33 33 ; AH: INT 13h Error Code 34 ; CX:Number of 512-byte blocks transferred34 ; CX: Number of 512-byte blocks transferred 35 35 ; CF: Cleared if success, Set if error 36 36 ; Corrupts registers: … … 334 334 ; Returns: 335 335 ; BP/SI: Checksum for written bytes, compared against ACK from server in .readLoop 336 ; CX: 336 ; CX: Zero 337 337 ; DL: Receive/Transmit Register address 338 ; ES:DI: 338 ; ES:DI: Ptr to buffer 339 339 ; Corrupts registers: 340 340 ; AX … … 401 401 ; Parameters: 402 402 ; AH: UART_LineStatus bit to test (20h for write, or 1h for read) 403 ; 403 ; One entry point fills in AH with 20h for write 404 404 ; DX: Port address (OK if already incremented to UART_lineStatus) 405 ; 406 ; 405 ; BX: 406 ; Stack: 2 words on the stack below the command/count word 407 407 ; Returns: 408 ; 409 ; 408 ; Returns when desired UART_LineStatus bit is cleared 409 ; Jumps directly to error exit if timeout elapses (and cleans up stack) 410 410 ; Corrupts registers: 411 ; 411 ; AX 412 412 ;-------------------------------------------------------------------- 413 413 -
trunk/Assembly_Library/Src/Serial/SerialServerScan.asm
r526 r567 31 31 ; SerialServerScan_ScanForServer: 32 32 ; Parameters: 33 ; 34 ; 35 ; 33 ; BH: Drive Select byte for Drive and Head Select Register 34 ; 0xAx: Scan for drive, low nibble indicates drive 35 ; 0x0: Scan for Server, independent of drives 36 36 ; DX: Port and Baud to Scan for 37 37 ; 0: Scan a known set of ports and bauds … … 89 89 ; Note: hardware baud multipliers (2x, 4x) will impact the final baud rate and are not known at this level 90 90 ; 91 mov dh,030h * 2 91 mov dh,030h * 2 ; multiply by 2 since we are about to divide by 2 92 92 mov dl,[cs:di] ; restore single byte port address for scan 93 93 … … 119 119 ; SerialServer_CheckForServer_PortAndBaudInDX: 120 120 ; Parameters: 121 ; 122 ; 123 ; 121 ; BH: Drive Select byte for Drive and Head Select Register 122 ; 0xAx: Scan for drive, low nibble indicates drive 123 ; 0x0: Scan for Server, independent of drives 124 124 ; DX: Baud and Port 125 125 ; CH: 1: We are doing a scan for the serial server 126 ; 126 ; 0: We are working off a specific port given by the user 127 127 ; CL: 1, for one sector to read 128 128 ; ES:SI: Ptr to buffer for return -
trunk/Assembly_Library/Src/Util/Size.asm
r526 r567 113 113 rcr si, 1 ; Update remainder 114 114 loop .ShiftLoop 115 eSHR_IM si, 6 ; Remainder to SI beginning 115 %ifdef USE_186 116 shr si, 6 ; Remainder to SI beginning 117 %else 118 mov cl, 6 119 shr si, cl 120 %endif 116 121 pop cx 117 122 inc cx ; Increment magnitude -
trunk/BIOS_Drive_Information_Tool/Src/Print.asm
r558 r567 250 250 ; Print_EbiosVersionFromBXandExtensionsFromCX 251 251 ; Parameters: 252 ; 252 ; BX: Version of extensions 253 253 ; CX: Interface support bit map 254 254 ; Returns: -
trunk/XTIDE_Universal_BIOS/Inc/ATA_ID.inc
r526 r567 86 86 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified) 87 87 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred 88 ; 89 ; 88 ; per interrupt on read and write multiple commands 89 ; (00h=Read/write multiple commands not implemented) 90 90 resb 1 ; 47[8-15]X 91 91 .wDWIO resw 1 ; 48F, Can perform doubleword I/O (boolean) … … 106 106 ; Words 59-63 are always valid 107 107 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that 108 ; 108 ; can be transferred per interrupt on R/W multiple command 109 109 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid 110 110 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA mode only) … … 168 168 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified) 169 169 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred 170 ; 171 ; 170 ; per interrupt on read and write multiple commands 171 ; (00h=Read/write multiple commands not implemented) 172 172 resb 1 ; 47[8-15]X 173 173 resw 1 ; 48R … … 188 188 ; Words 59-63 are always valid 189 189 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that 190 ; 190 ; can be transferred per interrupt on R/W multiple command 191 191 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid 192 192 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA mode only) … … 253 253 .strModel resb 40 ; 27...46F, Model number (40 ASCII characters, 0000h=not specified) 254 254 .bBlckSize resb 1 ; 47[0-7]F, Maximum number of sectors that can be transferred 255 ; 256 ; 255 ; per interrupt on read and write multiple commands 256 ; (00h=Read/write multiple commands not implemented) 257 257 resb 1 ; 47[8-15]F, 80h 258 258 resw 1 ; 48R … … 271 271 ; Words 59-63 are always valid 272 272 .bBlockSel resb 1 ; 59[0-7]V, Current setting for number of sectors that 273 ; 273 ; can be transferred per interrupt on R/W multiple command 274 274 .bBlockFlgs resb 1 ; 59[8-15]VR, bit 0 set if Multiple sector setting is valid 275 275 .dwLBACnt resd 1 ; 60...61F, Total number of user addressable sectors (LBA-28) -
trunk/XTIDE_Universal_BIOS/Inc/Controllers/XTCF.inc
r558 r567 1 1 ; Project name : XTIDE Universal BIOS 2 ; Description : Lo-tech XT-CF v2board specifications.2 ; Description : Lo-tech XT-CF board specifications. 3 3 ; 4 4 ; More information at http://www.lo-tech.co.uk/XT-CF … … 19 19 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 20 20 ; 21 22 ; Modified by JJP for XT-CFv3 support, Mar-1323 24 21 25 22 %ifndef XTCF_INC … … 56 53 ; For XT-CFv3 adapter, DMA transfers are also supported via channel 3. 57 54 ; 58 ; XT-CFv3 cannot be distinguis ed by software, so user must decide and set55 ; XT-CFv3 cannot be distinguished by software, so user must decide and set 59 56 ; the mode via a call to Int 13h function 1Eh accordingly (see AH1E_XTCF.asm). 60 57 ; -
trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
r550 r567 61 61 FLGL_DPT_LBA EQU FLG_DRVNHEAD_LBA ; Bit 6, Drive supports LBA and so EBIOS functions can be supported 62 62 %ifdef MODULE_EBIOS 63 FLGL_DPT_LBA48 EQU (1<<7) ; Bit 7, Drive supports 48-bit LBA ( Must be bit 7!)63 FLGL_DPT_LBA48 EQU (1<<7) ; Bit 7, Drive supports 48-bit LBA (must be bit 7!) 64 64 %endif 65 65 66 66 67 67 ; Bit definitions for DPT.bFlagsHigh 68 FLGH_DPT_USE_BLOCK_MODE_COMMANDS EQU (1<<1) ; Bit 1, Use block transfer commands (must be bit 1!)68 FLGH_DPT_USE_BLOCK_MODE_COMMANDS EQU (1<<1) ; Bit 1, Use block transfer commands (must be bit 1!) 69 69 %ifdef MODULE_SERIAL 70 FLGH_DPT_SERIAL_DEVICE EQU (1<<2) ; Bit 2, Serial Port Device70 FLGH_DPT_SERIAL_DEVICE EQU (1<<2) ; Bit 2, Serial Port Device 71 71 %endif 72 %ifdef MODULE_ FEATURE_SETS73 FLGH_DPT_POWER_MANAGEMENT_SUPPORTED EQU (1<< 5) ; Bit 5, Drive supports power management72 %ifdef MODULE_POWER_MANAGEMENT 73 FLGH_DPT_POWER_MANAGEMENT_SUPPORTED EQU (1<<3) ; Bit 3, Drive supports power management (must be bit 3!) 74 74 %endif 75 75 %ifdef MODULE_ADVANCED_ATA 76 FLGH_DPT_IORDY EQU (1<<7) ; Bit 7, Controller and Drive supports IORDY76 FLGH_DPT_IORDY EQU (1<<7) ; Bit 7, Controller and Drive supports IORDY 77 77 %endif 78 78 79 79 ; Serial device only 80 80 %ifdef MODULE_SERIAL_FLOPPY 81 FLGH_DPT_SERIAL_FLOPPY EQU (1<<4) 82 FLGH_DPT_SERIAL_FLOPPY_TYPE_MASK EQU 0e0h 83 FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION EQU 5 81 FLGH_DPT_SERIAL_FLOPPY EQU (1<<4) ; Bit 4, Drive is a serial floppy drive 82 FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION EQU 5 ; Bits 7...5, Serial floppy drive type 84 83 %endif 85 84 -
trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc
r526 r567 31 31 TIMEOUT_MAXIMUM EQU 255 ; We would actually want 31 seconds here but I don't think there are so slow drives 32 32 33 %ifdef MODULE_ FEATURE_SETS33 %ifdef MODULE_POWER_MANAGEMENT 34 34 TIMEOUT_BSY EQU TIMEOUT_MOTOR_STARTUP 35 35 TIMEOUT_DRDY EQU TIMEOUT_MOTOR_STARTUP -
trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
r550 r567 130 130 %endif 131 131 132 %ifdef MODULE_ FEATURE_SETS133 MAIN_FLG_MODULE_ FEATURE_SETS EQU FLG_ROMVARS_MODULE_FEATURE_SETS132 %ifdef MODULE_POWER_MANAGEMENT 133 MAIN_FLG_MODULE_POWER_MANAGEMENT EQU FLG_ROMVARS_MODULE_POWER_MANAGEMENT 134 134 %else 135 MAIN_FLG_MODULE_ FEATURE_SETSEQU 0135 MAIN_FLG_MODULE_POWER_MANAGEMENT EQU 0 136 136 %endif 137 137 … … 142 142 %endif 143 143 144 MASK_ROMVARS_INCLUDED_MODULES EQU MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_ FEATURE_SETS| MAIN_FLG_MODULE_8BIT_IDE_ADVANCED144 MASK_ROMVARS_INCLUDED_MODULES EQU MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_POWER_MANAGEMENT | MAIN_FLG_MODULE_8BIT_IDE_ADVANCED 145 145 -
trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
r558 r567 72 72 73 73 ; Here in case the configuration needs to know functionality is present 74 FLG_ROMVARS_MODULE_ FEATURE_SETSEQU (1<<5)74 FLG_ROMVARS_MODULE_POWER_MANAGEMENT EQU (1<<5) 75 75 FLG_ROMVARS_MODULE_8BIT_IDE EQU (1<<6) 76 76 FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED EQU (1<<7) -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm
r564 r567 34 34 IdeDPT_Finalize: 35 35 36 %ifdef MODULE_ FEATURE_SETS36 %ifdef MODULE_POWER_MANAGEMENT 37 37 ;-------------------------------------------------------------------- 38 38 ; .DetectPowerManagementSupport … … 43 43 ; Nothing 44 44 ; Corrupts registers: 45 ; Nothing45 ; AL 46 46 ;-------------------------------------------------------------------- 47 47 .DetectPowerManagementSupport: 48 test BYTE [es:si+ATA6.wSetSup82], A6_wSetSup82_POWERMAN 49 jz SHORT .NoPowerManagementSupport 50 or BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 51 .NoPowerManagementSupport: 52 %endif ; MODULE_FEATURE_SETS 48 mov al, [es:si+ATA6.wSetSup82] 49 and al, A6_wSetSup82_POWERMAN ; A6_wSetSup82_POWERMAN (bit 3) is the same 50 or [di+DPT.bFlagsHigh], al ; bit as FLGH_DPT_POWER_MANAGEMENT_SUPPORTED 51 %endif ; MODULE_POWER_MANAGEMENT 53 52 54 53 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDmaBlock.asm
r558 r567 2 2 ; Description : IDE Read/Write functions for transferring block using DMA. 3 3 ; These functions should only be called from IdeTransfer.asm. 4 5 ; Modified JJP 05-Jun-136 4 7 5 ; … … 91 89 ; Calculate bytes for first page 92 90 mov ax, di 93 neg ax ; 2s compl iment91 neg ax ; 2s complement 94 92 95 93 ; If DI was zero carry flag will be cleared (and set otherwise) … … 187 185 jz SHORT .TransferNextBlock ; All bytes transferred? 188 186 %else ; Fast DMA code - perform computed number of transfers, then check DMA status register to be sure 189 add cx, BYTE 15 ; We'll divide transfers in 16-byte atomic transfers, 190 eSHR_IM cx, 4 ; so include any partial block, which will be terminated 191 ALIGN JUMP_ALIGN ; by the DMA controller raising T/C 187 ; We'll divide transfers in 16-byte atomic transfers, so include any partial block, which will be terminated by the DMA controller raising T/C 188 add cx, BYTE 15 189 190 %ifdef USE_186 191 shr cx, 4 192 %else 193 xchg cx, ax 194 mov cl, 4 195 shr ax, cl 196 xchg cx, ax 197 %endif 198 199 ALIGN JUMP_ALIGN 192 200 .TransferNextDmaBlock: 193 201 out dx, al ; Transfer up to 16 bytes to/from XT-CF card -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm
r566 r567 20 20 ; Section containing code 21 21 SECTION .text 22 23 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 24 %if $ <> PollBsyOnly.End 25 %error "IdeError.asm must come immediately after IdeWait.asm (PollBsyOnly falls into IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL)!" 26 %endif 27 %endif 22 28 23 29 ;-------------------------------------------------------------------- -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdePioBlock.asm
r558 r567 18 18 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 19 19 ; 20 21 ; Modified by JJP for XT-CFv3 support, Mar-1322 20 23 21 ; Section containing code -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
r558 r567 228 228 229 229 ; Get transfer function based on bus type 230 xchg ax, bx ; Lookup table offset to AX231 mov bl, [di+DPT_ATA.bDevice]230 mov al, [di+DPT_ATA.bDevice] 231 add bx, ax 232 232 %ifdef MODULE_8BIT_IDE_ADVANCED 233 mov dl, bl 234 %endif 235 add bx, ax 233 cmp al, DEVICE_8BIT_XTCF_DMA 234 %endif 236 235 mov ax, [cs:bx] ; Load offset to transfer function 237 236 mov [bp+PIOVARS.fnXfer], ax … … 239 238 ; Normalize pointer for PIO-transfers and convert to physical address for DMA transfers 240 239 %ifdef MODULE_8BIT_IDE_ADVANCED 241 cmp dl, DEVICE_8BIT_XTCF_DMA242 240 jb SHORT IdeTransfer_NormalizePointerInESSI 243 241 244 242 ; Convert ES:SI to physical address 245 %ifdef USE_186 ; Bytes EU Cycles(286) 243 %ifdef USE_186 244 ; Bytes EU Cycles(286) 246 245 mov ax, es ; 2 2 247 246 rol ax, 4 ; 3 9 … … 255 254 ; 18 24 256 255 %else ; 808x 257 258 %if 0259 256 ; Bytes EU Cycles(808x) 260 257 mov al, 4 ; 2 4 … … 279 276 ; In other words, we could use a real world test here. 280 277 ; 281 % endif ;0278 %if 0 282 279 ; Bytes EU Cycles(808x/286) 283 280 xor dx, dx ; 2 3/2 … … 291 288 mov es, dx ; 2 2/2 292 289 ;------------------------------------ 293 %endif ; 26 29/26 294 clc 295 ret 290 ; 26 29/26 291 %endif ; 0 292 %endif 293 294 ret ; With CF cleared (taken care of by the physical address conversion) 296 295 %endif ; MODULE_8BIT_IDE_ADVANCED 297 296 ; Fall to IdeTransfer_NormalizePointerInESSI if no MODULE_8BIT_IDE_ADVANCED -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm
r532 r567 130 130 call Timer_SetCFifTimeout ; Update timeout counter 131 131 jnc SHORT .PollLoop ; Loop if time left (sets CF on timeout) 132 jmp SHORT IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 132 .End: ; Label used for sanity check during assembly 133 ; Fall to IdeError_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL 134 -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialCommand.asm
r558 r567 28 28 ; Parameters: 29 29 ; BH: Non-zero if 48-bit addressing used 30 ; 30 ; (ignored at present as 48-bit addressing is not supported) 31 31 ; BL: IDE Status Register bit to poll after command 32 ; 32 ; (ignored at present, since there is no IDE status register to poll) 33 33 ; ES:SI: Ptr to buffer (for data transfer commands) 34 34 ; DS:DI: Ptr to DPT (in RAMVARS segment) … … 122 122 ; wSerialPortAndBaud Non-Zero: -> Continue with wSerialPortAndBaud (1) 123 123 ; wSerialPortAndBaud Zero: 124 ; 125 ; 124 ; previous serial drive not found: -> Scan (2) 125 ; previous serial drive found: -> Continue with previous serial drive info (3) 126 126 ; 127 127 ; Slave: 128 128 ; wSerialPortAndBaud Non-Zero: 129 ; 129 ; previous serial drive not found: -> Error - Not Found (4) 130 130 ; previous serial drive found: -> Continue with wSerialPackedAndBaud (5) 131 ; 132 ; 131 ; wSerialPortAndBaud Zero: 132 ; previous serial drive not found: -> Error - Not Found (4) 133 133 ; previous serial drive found: -> Continue with previous serial drive info (6) 134 134 ; -
trunk/XTIDE_Universal_BIOS/Src/Device/Serial/SerialDPT.asm
r547 r567 28 28 ; Returns: 29 29 ; CF: Set, indicates that this is a floppy disk 30 ; 30 ; Clear, indicates that this is a hard disk 31 31 ; Corrupts registers: 32 32 ; AX … … 49 49 %ifndef CHECK_FOR_UNUSED_ENTRYPOINTS 50 50 %ifdef MODULE_SERIAL_FLOPPY 51 %if FLGH_DPT_SERIAL_DEVICE != 0x4 || FLGH_DPT_SERIAL_FLOPPY != 0x10 || FLGH_DPT_SERIAL_FLOPPY_TYPE_ MASK != 0xe0 || FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION != 551 %if FLGH_DPT_SERIAL_DEVICE != 0x4 || FLGH_DPT_SERIAL_FLOPPY != 0x10 || FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION != 5 52 52 %error "The serial server passes FLGH values into SerialDPT_Finalize directly. If the flag positions are changed, corresponding changes will need to be made in the serial server, and likely a version check put in to deal with servers talking to incompatible clients" 53 53 %endif -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r561 r567 309 309 ; Returns: 310 310 ; Depends on function 311 ; 312 ; 311 ; NOTE: ES:DI needs to be returned from the previous interrupt 312 ; handler, for floppy DPT in function 08h 313 313 ; Corrupts registers: 314 314 ; None -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH0h_HReset.asm
r555 r567 119 119 mov dl, ROMVARS.ideVars0 ; starting Idevars offset 120 120 121 122 121 ; Get count of ALL Idevars structures, not just the ones that are configured. This may seem odd, 122 ; but it catches the .ideVarsSerialAuto structure, which would not be scanned if the count from 123 123 ; RamVars_GetIdeControllerCountToCX was used. Unused controllers won't make a difference, since no DPT 124 124 ; will point to them. Performance isn't an issue, as this is a reset operation. 125 125 ; 126 126 mov cx, NUMBER_OF_IDEVARS 127 127 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH15h_HSize.asm
r547 r567 37 37 ; If successful: 38 38 ; AH: Hard Disk: 3 (Hard disk accessible) 39 ; 39 ; Floppy: 1 (Floppy disk, without change detection) 40 40 ; CX:DX: Total number of sectors 41 41 ; CF: 0 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH1Eh_XTCF.asm
r558 r567 19 19 ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 20 20 ; 21 22 ; Modified by JJP for XT-CFv3 support, Mar-1323 21 24 22 ; Section containing code -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r545 r567 31 31 ; SS:BP: Ptr to IDEPACK 32 32 ; Returns with INTPACK: 33 ; BL: Drive Type (forfloppies only)33 ; BL: Drive Type (for serial floppies only) 34 34 ; CH: Maximum cylinder number, bits 7...0 35 35 ; CL: Bits 7...6: Cylinder number bits 9...8 … … 37 37 ; DH: Maximum head number (0...254) 38 38 ; DL: Number of drives!!! 39 ; ES:DI: Floppy DPT (forfloppies only)39 ; ES:DI: Floppy DPT (for serial floppies only) 40 40 ; AH: Int 13h/40h floppy return status 41 41 ; CF: 0 if successful, 1 if error … … 57 57 call RamVars_GetCountOfKnownDrivesToAX ; assume hard disk for now, will discard if for floppies 58 58 59 test byte [bp+IDEPACK.intpack+INTPACK.dl], 080h59 test BYTE [bp+IDEPACK.intpack+INTPACK.dl], 80h 60 60 jnz SHORT .CalledForHardDrive 61 61 … … 93 93 ; DS:DI: Ptr to DPT (in RAMVARS segment) 94 94 ; Returns: 95 ; BL: Drive Type (for serial floppies only) 95 96 ; CH: Maximum cylinder number, bits 7...0 96 97 ; CL: Bits 7...6: Cylinder number bits 9...8 … … 98 99 ; DH: Maximum head number (0...254) 99 100 ; Corrupts registers: 100 ; AX, B X101 ; AX, BH 101 102 ;-------------------------------------------------------------------- 102 103 AH8h_GetDriveParameters: … … 115 116 ; DS: RAMVARS segment 116 117 ; Returns: 118 ; BL: Drive Type (for serial floppies only) 117 119 ; CH: Maximum cylinder number, bits 7...0 118 120 ; CL: Bits 7...6: Cylinder number bits 9...8 … … 120 122 ; DH: Maximum head number (0...254) 121 123 ; Corrupts registers: 122 ; AX, B X124 ; AX, BH 123 125 ;-------------------------------------------------------------------- 124 126 .PackReturnValues: … … 172 174 173 175 db 1h << 1 | 0 ; Offset 1: Typical values of 1 for head load time 174 ; 176 ; DMA used (although it actually is not, but is more restrictive) 175 177 db 25h ; Offset 2: Inactivity motor turn-off delay, 176 178 ; Typical value of 25h for 2 second delay -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r566 r567 194 194 195 195 196 %ifdef MODULE_ FEATURE_SETS196 %ifdef MODULE_POWER_MANAGEMENT 197 197 ;;; InitStandbyTimer 198 198 ; Initialize the standby timer (if supported) … … 206 206 STORE_ERROR_FLAG_TO_DPT FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER 207 207 .NoPowerManagementSupport: 208 %endif ; MODULE_ FEATURE_SETS208 %endif ; MODULE_POWER_MANAGEMENT 209 209 210 210 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm
r550 r567 39 39 AH41h_HandlerForCheckIfExtensionsPresent: 40 40 cmp WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh 41 %ifdef USE_386 42 jne Int13h_DirectCallToAnotherBios 43 %else 41 44 jne SHORT .EbiosNotSupported 45 %endif 42 46 43 47 mov BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION … … 53 57 and BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF ; Return with CF cleared 54 58 jmp Int13h_ReturnFromHandlerWithoutStoringErrorCode 59 60 %ifndef USE_386 55 61 .EbiosNotSupported: 56 62 jmp Int13h_DirectCallToAnotherBios 63 %endif 57 64 58 65 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/Tools/Prepare.asm
r558 r567 113 113 ; Prepare_ByValidatingSectorsInALforOldInt13h 114 114 ; Parameters: 115 ; AL: Number of sectors to transfer 115 ; AL: Number of sectors to transfer (1...128 is valid) 116 116 ; Returns: 117 117 ; Exits INT 13h if invalid number of sectors in AL … … 120 120 ;-------------------------------------------------------------------- 121 121 Prepare_ByValidatingSectorsInALforOldInt13h: 122 test al, al 123 js SHORT .CheckZeroOffsetFor128Sectors ; 128 or more 124 jz SHORT InvalidNumberOfSectorsRequested ; Zero not allowed for old INT 13h 122 test al, al ; Check if 0 < AL < 128 (Clears OF) 123 jle SHORT .CheckIf128Sectors ; Jump if not 125 124 ret ; Continue with transfer 126 125 127 126 ALIGN JUMP_ALIGN 128 .Check ZeroOffsetFor128Sectors:127 .CheckIf128Sectors: 129 128 cmp al, 128 130 j aSHORT InvalidNumberOfSectorsRequested129 jne SHORT InvalidNumberOfSectorsRequested 131 130 test si, si ; Offset must be zero to xfer 128 sectors 132 131 jnz SHORT CannotAlignPointerProperly -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r561 r567 31 31 sti ; Enable interrupts 32 32 cld ; String instructions to increment pointers 33 %ifdef MODULE_VERY_LATE_INIT IALIZATION33 %ifdef MODULE_VERY_LATE_INIT 34 34 LOAD_BDA_SEGMENT_TO ds, ax ; Load BDA segment (zero) to DS 35 35 les ax, [TEMPORARY_VECTOR_FOR_SYSTEM_INT13h*4] … … 214 214 ; Parameters: 215 215 ; DL: Drive to boot from (translated, 00h or 80h) 216 ; CF:Set for Boot Sector Boot217 ; 218 ; 216 ; CF: Set for Boot Sector Boot 217 ; Clear for ROM Boot 218 ; ES:BX: (if CF set) Ptr to boot sector 219 219 ; 220 220 ; Returns: -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/AdvAtaInit.asm
r564 r567 88 88 call AdvAtaInit_LoadMasterDPTtoDSSIifSlaveInDSDI 89 89 call Vision_InitializeWithIDinAHandConfigInAL 90 xor ax, ax ; Success 90 91 91 92 pop si … … 93 94 94 95 .NoAdvancedController: 95 xor ax, ax ; Success96 96 ret 97 97 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
r550 r567 27 27 ; ES:SI: Ptr to 512-byte ATA information read from the drive 28 28 ; Returns: 29 ; CF: Set if failed to verify ATA-ID30 ; Cleared if ATA-ID verified successfully29 ; ZF: Set if ATA-ID verified successfully 30 ; Cleared if failed to verify ATA-ID 31 31 ; Corrupts registers: 32 32 ; AX, BX, CX … … 41 41 ; Verify P-CHS cylinders 42 42 mov bx, ATA1.wCylCnt 43 mov cx, MAX_VALID_PCHS_CYLINDERS44 call .CompareCHorSfromOffsetBXtoMaxValueIn CX43 mov ax, MAX_VALID_PCHS_CYLINDERS 44 call .CompareCHorSfromOffsetBXtoMaxValueInAX 45 45 46 46 mov bl, ATA1.wHeadCnt & 0FFh 47 mov cx, MAX_VALID_PCHS_HEADS48 call .CompareCHorSfromOffsetBXtoMaxValueIn CX47 mov ax, MAX_VALID_PCHS_HEADS 48 call .CompareCHorSfromOffsetBXtoMaxValueInAX 49 49 50 50 mov bl, ATA1.wSPT & 0FFh 51 mov cl, MAX_VALID_PCHS_SECTORS_PER_TRACK52 call .CompareCHorSfromOffsetBXtoMaxValueIn CX51 mov al, MAX_VALID_PCHS_SECTORS_PER_TRACK 52 call .CompareCHorSfromOffsetBXtoMaxValueInAX 53 53 54 54 ; Check signature byte. It is only found on ATA-5 and later. It should be zero on … … 62 62 ; Check checksum byte since signature was present 63 63 mov cx, ATA6_size 64 call Memory_SumCXbytesFromESSItoAL ; Returns with ZF set according to result 65 jnz SHORT .FailedToVerifyAtaID 66 67 ; ATA-ID is now verified to be valid 68 .AtaIDverifiedSuccessfully: 69 clc 70 ret 71 72 ;-------------------------------------------------------------------- 73 ; .CompareCHorSfromOffsetBXtoMaxValueInCX 74 ; Parameters: 64 jmp Memory_SumCXbytesFromESSItoAL ; Returns with ZF set according to result 65 66 ;-------------------------------------------------------------------- 67 ; .CompareCHorSfromOffsetBXtoMaxValueInAX 68 ; Parameters: 69 ; AX: Maximum valid C, H or S value 75 70 ; BX: C, H or S offset to ATA-ID 76 ; CX: Maximum valid C, H or S value 77 ; ES:SI: Ptr to 512-byte ATA information read from the drive 78 ; Returns: 79 ; Exits from AtaID_VerifyFromESSI with CF set if invalid value 80 ; Corrupts registers: 81 ; AX 82 ;-------------------------------------------------------------------- 83 .CompareCHorSfromOffsetBXtoMaxValueInCX: 84 mov ax, [es:bx+si] 85 test ax, ax 86 jz SHORT .InvalidPCHorSinOffsetBX 87 cmp ax, cx ; Compare to max valid value 71 ; ES:SI: Ptr to 512-byte ATA information read from the drive 72 ; Returns: 73 ; Exits from AtaID_VerifyFromESSI with ZF cleared if invalid value 74 ; Corrupts registers: 75 ; CX 76 ;-------------------------------------------------------------------- 77 .CompareCHorSfromOffsetBXtoMaxValueInAX: 78 mov cx, [es:bx+si] 79 jcxz .InvalidPCHorSinOffsetBX 80 cmp cx, ax ; Compare to max valid value 88 81 jbe SHORT .ValidPCHorSinOffsetBX 89 82 .InvalidPCHorSinOffsetBX: 90 add sp, BYTE 2 ; Clear return address for this function 83 pop cx ; Clear return address for this function 84 inc cx ; Clear ZF to indicate invalid ATA-ID (safe to do since return address in CX will never be FFFFh) 85 .AtaIDverifiedSuccessfully: 91 86 .FailedToVerifyAtaID: 92 stc ; Set carry to indicate invalid ATA-ID93 87 .ValidPCHorSinOffsetBX: 94 88 ret … … 97 91 ;-------------------------------------------------------------------- 98 92 ; Writes user defined limits from ROMVARS to ATA ID read from the drive. 99 ; Modifying the ATA ID reduces code and possibilit es for bugs since100 ; only little fur her checks are needed elsewhere.93 ; Modifying the ATA ID reduces code and possibilities for bugs since 94 ; only little further checks are needed elsewhere. 101 95 ; 102 96 ; AtaID_ModifyESSIforUserDefinedLimitsAndReturnTranslateModeInDX -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r558 r567 62 62 ; if serial drive detected, do not scan (avoids duplicate drives and isn't needed - we already have a connection) 63 63 ; 64 call FindDPT_ToDSDIforSerialDevice ; does not modify AX64 call FindDPT_ToDSDIforSerialDevice ; Does not modify AX 65 65 jnc .AddHardDisks 66 66 … … 68 68 69 69 %ifdef MODULE_HOTKEYS 70 cmp al, COM_DETECT_HOTKEY_SCANCODE 70 cmp al, COM_DETECT_HOTKEY_SCANCODE ; Set by last call to HotkeyBar_UpdateDuringDriveDetection above 71 71 je .DriveDetectLoop 72 72 %endif … … 134 134 mov [RAMVARS.xlateVars+XLATEVARS.bFlopCntAndFirst], al 135 135 %endif 136 137 %ifdef MODULE_8BIT_IDE_ADVANCED138 NoSlaveDriveAvailable:139 %endif140 136 ret 141 137 … … 156 152 ; ES: Zero (BDA segment) 157 153 ; Returns: 158 ; 154 ; Nothing 159 155 ; Corrupts registers: 160 156 ; AX, BL, CX, DX, SI, DI 161 157 ;-------------------------------------------------------------------- 162 158 StartDetectionWithDriveSelectByteInBHandStringInCX: 163 %ifdef MODULE_8BIT_IDE_ADVANCED164 mov al, [cs:bp+IDEVARS.bDevice]165 cmp al, DEVICE_8BIT_XTCF_PIO8166 jb SHORT .DoNotSkipSlaveDriveDetection167 cmp al, DEVICE_8BIT_XTCF_DMA168 ja SHORT .DoNotSkipSlaveDriveDetection169 170 ; XT-CF do not support slave drives so skip detection171 test bh, FLG_DRVNHEAD_DRV172 jnz SHORT NoSlaveDriveAvailable173 .DoNotSkipSlaveDriveDetection:174 %endif ; MODULE_8BIT_IDE_ADVANCED175 176 159 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 177 160 … … 221 204 ; Nothing 222 205 ; Returns: 223 ; CF: 206 ; CF: Set (from DetectPrint_NullTerminatedStringFromCSSIandSetCF) 224 207 ; Corrupts registers: 225 208 ; AX, SI … … 248 231 call AtaID_VerifyFromESSI 249 232 pop bx 250 j cSHORT DetectDrives_DriveNotFound233 jnz SHORT DetectDrives_DriveNotFound 251 234 call CreateDPT_FromAtaInformation 252 235 jc SHORT DetectDrives_DriveNotFound -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r547 r567 60 60 ;-------------------------------------------------------------------- 61 61 DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP: 62 mov ax, [cs:bp+IDEVARS.wBasePort] ; for IDE: AX=port address, DH=.bDevice63 ; fall throughto DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP62 mov ax, [cs:bp+IDEVARS.wBasePort] ; For IDE: AX=port address, DH=.bDevice 63 ; Fall to DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP 64 64 65 65 ;-------------------------------------------------------------------- … … 75 75 ;-------------------------------------------------------------------- 76 76 DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP: 77 mov dx, [cs:bp+IDEVARS.bDevice-1] ; for Serial: AL=port address>>2, AH=baud rate77 mov dx, [cs:bp+IDEVARS.bDevice-1] ; For Serial: AL=port address>>2, AH=baud rate 78 78 ; DL=COM number character, DH=.bDevice 79 push bp ; setup stack for call to79 push bp ; Setup stack for call to 80 80 mov bp, sp ; BootMenuPrint_FormatCSSIfromParamsInSSBP 81 81 … … 89 89 90 90 %ifdef MODULE_SERIAL 91 cmp dh, DEVICE_SERIAL_PORT 91 cmp dh, DEVICE_SERIAL_PORT ; Check if this is a serial device 92 92 93 93 jnz .pushAndPrint ; CX = string to print, AX = port address, DX won't be used -
trunk/XTIDE_Universal_BIOS/Src/Initialization/FloppyDrive.asm
r551 r567 161 161 ;-------------------------------------------------------------------- 162 162 FloppyDrive_GetCountFromBIOS_or_BDA: 163 push es 164 163 %ifdef USE_AT 165 164 ; Reads Floppy Drive Count from BIOS. 166 165 ; Does not work on most XT systems. Call .GetCountFromBDA 167 166 ; if this function fails. 168 %ifdef USE_AT 167 168 push es 169 169 push di 170 170 push bx … … 181 181 pop bx 182 182 pop di 183 183 pop es 184 185 %else ; ifndef USE_AT 184 186 ; Reads Floppy Drive Count (0...4) from BIOS Data Area. 185 187 ; This function should be used only if .GetCountFromBIOS fails. 186 %else ; ifndef USE_AT 187 LOAD_BDA_SEGMENT_TO es, ax 188 mov al, [es:BDA.wEquipment] ; Load Equipment WORD low byte 188 189 push ds 190 LOAD_BDA_SEGMENT_TO ds, ax 191 mov al, [BDA.wEquipment] ; Load Equipment WORD low byte 192 pop ds 189 193 190 194 %ifdef USE_UNDOC_INTEL … … 200 204 %endif ; USE_AT 201 205 202 pop es 203 ret 206 ret -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r561 r567 47 47 mov [BIOS_BOOT_LOADER_INTERRUPT_19h*4+2], cs 48 48 49 %ifdef MODULE_VERY_LATE_INIT IALIZATION49 %ifdef MODULE_VERY_LATE_INIT 50 50 push es 51 ; Install special INT 13h hand er that initializes XTIDE Universal BIOS51 ; Install special INT 13h handler that initializes XTIDE Universal BIOS 52 52 ; when our INT 19h is not called 53 53 les ax, [BIOS_DISK_INTERRUPT_13h*4] ; Load system INT 13h handler … … 95 95 ; Nothing 96 96 ; Corrupts registers: 97 ; AX, CX, DX, SI, DI97 ; AX, BX, CX, DX, SI, DI 98 98 ;-------------------------------------------------------------------- 99 99 %ifdef MODULE_COMPATIBLE_TABLES … … 101 101 %ifndef USE_AT 102 102 test BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE 103 jz SHORT . CompatibleDPTsCreated; Only Full operating mode has extra RAM to spare103 jz SHORT .SkipToReturn ; Only Full operating mode has extra RAM to spare 104 104 %endif 105 105 106 mov bx, HD0_DPT_POINTER_41h * 4 106 107 mov dl, 80h 107 call FindDPT_ForDriveNumberInDL ; DPT to DS:DI 108 jc SHORT .FindForDrive81h ; Store nothing if not our drive 108 .FindForNextDrive: 109 call FindDPT_ForDriveNumberInDL ; DPT to DS:DI 110 jc SHORT .NextDrive ; Store nothing if not our drive 109 111 112 push dx 110 113 call CompatibleDPT_CreateToAXSIforDriveDL 111 mov [es:HD0_DPT_POINTER_41h*4], si 112 mov [es:HD0_DPT_POINTER_41h*4+2], ax 114 pop dx 113 115 114 .FindForDrive81h: 115 mov dl, 81h 116 call FindDPT_ForDriveNumberInDL 117 jc SHORT .CompatibleDPTsCreated 116 mov [es:bx], si 117 mov [es:bx+2], ax 118 118 119 call CompatibleDPT_CreateToAXSIforDriveDL 120 mov [es:HD1_DPT_POINTER_46h*4], si 121 mov [es:HD1_DPT_POINTER_46h*4+2], ax 122 .CompatibleDPTsCreated: 119 .NextDrive: 120 inc dx 121 add bx, (HD1_DPT_POINTER_46h - HD0_DPT_POINTER_41h) * 4 122 cmp dl, 82h 123 jb SHORT .FindForNextDrive 124 125 .SkipToReturn: 123 126 %endif ; MODULE_COMPATIBLE_TABLES 124 127 ret -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r560 r567 34 34 %define EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS ; Exclude unused library functions 35 35 %ifdef MODULE_BOOT_MENU 36 %define MENUEVENT_INLINE_OFFSETS 36 %define MENUEVENT_INLINE_OFFSETS ; Only one menu required, save space and inline offsets 37 37 %define INCLUDE_MENU_LIBRARY 38 %define MENU_NO_ESC 38 %define MENU_NO_ESC ; User cannot 'esc' out of the menu 39 39 %else ; If no boot menu included 40 40 %define INCLUDE_DISPLAY_LIBRARY … … 128 128 at ROMVARS.wBootTimeout, dw BOOT_MENU_DEFAULT_TIMEOUT 129 129 %endif 130 at 130 at ROMVARS.bIdeCnt, db 1 131 131 at ROMVARS.bBootDrv, db 80h ; Boot Menu default drive 132 132 at ROMVARS.bMinFddCnt, db 0 ; Do not force minimum number of floppy drives … … 218 218 219 219 ; Boot loader 220 %ifdef MODULE_VERY_LATE_INIT IALIZATION220 %ifdef MODULE_VERY_LATE_INIT 221 221 %include "Int13hBiosInit.asm" 222 222 %endif -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenu.asm
r526 r567 55 55 ; Returns: 56 56 ; DX: Drive number to be used for booting 57 ; CF:Set: There is a selected menu item, DL is valid58 ; 57 ; CF: Set: There is a selected menu item, DL is valid 58 ; Clear: The item selected is Rom Boot, DL is not valid 59 59 ; Corrupts registers: 60 60 ; AX, BX -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r562 r567 66 66 ret 67 67 68 MENUEVENT_InitializeMenuinitFromDSSI equ (EventInitializeMenuinitFromSSBP- FirstEvent)69 MENUEVENT_ExitMenu equ (BootMenuEvent_Completed- FirstEvent)70 MENUEVENT_ItemHighlightedFromCX equ (EventItemHighlightedFromCX- FirstEvent)71 MENUEVENT_KeyStrokeInAX equ (EventKeyStrokeInAX- FirstEvent)72 MENUEVENT_ItemSelectedFromCX equ (EventItemSelectedFromCX- FirstEvent)73 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings- FirstEvent)74 MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation- FirstEvent)75 MENUEVENT_RefreshItemFromCX equ (BootMenuPrint_RefreshItem- FirstEvent)68 MENUEVENT_InitializeMenuinitFromDSSI equ (EventInitializeMenuinitFromSSBP - FirstEvent) 69 MENUEVENT_ExitMenu equ (BootMenuEvent_Completed - FirstEvent) 70 MENUEVENT_ItemHighlightedFromCX equ (EventItemHighlightedFromCX - FirstEvent) 71 MENUEVENT_KeyStrokeInAX equ (EventKeyStrokeInAX - FirstEvent) 72 MENUEVENT_ItemSelectedFromCX equ (EventItemSelectedFromCX - FirstEvent) 73 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - FirstEvent) 74 MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - FirstEvent) 75 MENUEVENT_RefreshItemFromCX equ (BootMenuPrint_RefreshItem - FirstEvent) 76 76 ; 77 77 ; Note that there is no entry for MENUEVENT_IdleProcessing. If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined, … … 95 95 dw EventNotHandled ; MENUEVENT.IdleProcessing 96 96 dw EventItemHighlightedFromCX ; MENUEVENT.ItemHighlightedFromCX 97 97 98 98 dw EventItemSelectedFromCX ; MENUEVENT.ItemSelectedFromCX 99 99 dw EventKeyStrokeInAX ; MENUEVENT.KeyStrokeInAX -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
r526 r567 125 125 .around: 126 126 127 mov ax, g_szFddSizeOr 127 mov ax, g_szFddSizeOr ; .PrintXTFloppyType 128 128 test bl, bl ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD) 129 129 jz SHORT .PushAXAndOutput 130 130 131 mov al, (g_szFddUnknown - $$) & 0xff 131 mov al, (g_szFddUnknown - $$) & 0xff ; .PrintUnknownFloppyType 132 132 cmp bl, FLOPPY_TYPE_35_ED 133 133 ja SHORT .PushAXAndOutput … … 146 146 ; Floppy Drive Types: 147 147 ; 148 ; 149 ; 1 FLOPPY_TYPE_525_DD5 1/4 360K150 ; 2 FLOPPY_TYPE_525_HD5 1/4 1.2M151 ; 3 FLOPPY_TYPE_35_DD3 1/2 720K152 ; 4 FLOPPY_TYPE_35_HD3 1/2 1.44M153 ; 5 3.5" ED on some BIOSes3 1/2 2.88M154 ; 155 ; 148 ; 0 Handled above 149 ; 1 FLOPPY_TYPE_525_DD 5 1/4 360K 150 ; 2 FLOPPY_TYPE_525_HD 5 1/4 1.2M 151 ; 3 FLOPPY_TYPE_35_DD 3 1/2 720K 152 ; 4 FLOPPY_TYPE_35_HD 3 1/2 1.44M 153 ; 5 3.5" ED on some BIOSes 3 1/2 2.88M 154 ; 6 FLOPPY_TYPE_35_ED 3 1/2 2.88M 155 ; >6 Unknown, handled above 156 156 ; 157 157 ;-------------------------------------------------------------------- … … 169 169 xor bh, bh 170 170 mov al,FloppyTypes.rgbCapacityMultiplier 171 mul BYTE [cs:bx+FloppyTypes.rgbCapacity - 1] 171 mul BYTE [cs:bx+FloppyTypes.rgbCapacity - 1] ; -1 since 0 is handled above and not in the table 172 172 173 173 .PushAXAndOutput: -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r547 r567 372 372 ; ES: BDA segment (zero) 373 373 ; Returns: 374 ; AL:Last scancode seen374 ; AL: Last scancode seen 375 375 ; CF: Set if valid hotkey in AL 376 376 ; Clear if scancode in AL is not for any hotkey -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
r545 r567 173 173 ; Returns: 174 174 ; AX: Translate Mode (TRANSLATEMODE_NORMAL, TRANSLATEMODE_LARGE or TRANSLATEMODE_ASSISTED_LBA) 175 ; 176 ; ZF:Set based on value in AL175 ; unshifted (still shifted where it is in bFlagsLow) 176 ; ZF: Set based on value in AL 177 177 ; Corrupts registers: 178 178 ; Nothing -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
r549 r567 199 199 dec cx ; CX = 15 200 200 div cx ; AX = (Cylinders * 16) / 15 201 ; Fall to ConvertPCHfromAXB XtoEnhancedCHinAXBX201 ; Fall to ConvertPCHfromAXBLtoEnhancedCHinAXBL 202 202 203 203 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
r558 r567 109 109 call AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI 110 110 dec dl ; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL 111 js SHORT .NothingToChange 112 jz SHORT .LimitHeadsForLargeAddressingMode 111 jle SHORT .JumpOverSetBitForAssistedLBA 113 112 114 113 ; Set LBA bit for Assisted LBA 115 114 or cl, FLGL_DPT_LBA 116 jmp SHORT .NothingToChange 115 .JumpOverSetBitForAssistedLBA: 116 jnz SHORT .NothingToChange 117 117 118 118 .LimitHeadsForLargeAddressingMode: … … 218 218 ; Since the floppy DPT's come after the hard disk DPT's, without expensive (code size) code to relocate a DPT, 219 219 ; this was necessary. Now, this situation shouldn't happen in normal operation, for a couple of reasons: 220 ; 221 ; 222 ; 220 ; A. xtidecfg always puts configured serial ports at the end of the IDEVARS list 221 ; B. the auto serial code is always executed last 222 ; C. the serial server always returns floppy drives last 223 223 ; 224 224 adc byte [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt], 0 -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/FindDPT.asm
r526 r567 75 75 jb SHORT .DiskIsNotHandledByThisBIOS 76 76 %endif 77 ; fall-through toCalcDPTForDriveNumber77 ; Fall to .CalcDPTForDriveNumber 78 78 79 79 ;-------------------------------------------------------------------- … … 81 81 ; Not intended to be called except by FindDPT_ForDriveNumberInDL 82 82 ; 83 ; CalcDPTForDriveNumber83 ; .CalcDPTForDriveNumber 84 84 ; Parameters: 85 85 ; DL: Drive number 86 86 ; DS: RAMVARS segment 87 ; DI:Saved copy of AX from entry at FindDPT_ForDriveNumberInDL87 ; DI: Saved copy of AX from entry at FindDPT_ForDriveNumberInDL 88 88 ; Returns: 89 89 ; DS:DI: Ptr to DPT 90 ; CF:Clear90 ; CF: Clear 91 91 ; Corrupts registers: 92 92 ; Nothing … … 136 136 137 137 ;-------------------------------------------------------------------- 138 ; FindDPT_MasterOrSingleForIdevarsOffsetInDL139 ; Parameters:140 ; DL: Offset to IDEVARS to search for141 ; DS: RAMVARS segment142 ; Returns:143 ; DS:DI: Ptr to first DPT with same IDEVARS as in DL144 ; CF: Clear if wanted DPT found145 ; Set if DPT not found, or no DPTs present146 ; Corrupts registers:147 ; SI148 ;--------------------------------------------------------------------149 FindDPT_MasterOrSingleForIdevarsOffsetInDL:150 mov si, IterateFindFirstDPTforIdevars ; iteration routine (see below)151 jmp SHORT FindDPT_IterateAllDPTs ; look for the first drive on this controller, if any152 153 ;--------------------------------------------------------------------154 ; FindDPT_SlaveForIdevarsOffsetInDL155 ; Parameters:156 ; DL: Offset to IDEVARS to search for157 ; DS: RAMVARS segment158 ; Returns:159 ; DS:DI: Ptr to second DPT with same IDEVARS as in DL160 ; CF: Clear if wanted DPT found161 ; Set if DPT not found, or no DPTs present162 ; Corrupts registers:163 ; SI164 ;--------------------------------------------------------------------165 FindDPT_SlaveForIdevarsOffsetInDL:166 mov si, IterateFindSecondDPTforIdevars ; iteration routine (see below)167 jmp SHORT FindDPT_IterateAllDPTs ; look for the second drive on this controller, if any168 169 ;--------------------------------------------------------------------170 138 ; Iteration routines for FindDPT_MasterOrSingleForIdevarsOffsetInDL and 171 139 ; FindDPT_SlaveForIdevarsOffsetInDL, for use with IterateAllDPTs … … 175 143 ; IterateFindSecondDPTforIdevars 176 144 ; IterateFindFirstDPTforIdevars 177 ; 145 ; DL: Offset to IDEVARS to search from DPTs 178 146 ; SI: Offset to this callback function 179 147 ; DS:DI: Ptr to DPT to examine 180 148 ; Returns: 181 ; CF: Clear if wanted DPT found149 ; CF: Cleared if wanted DPT found 182 150 ; Set if wrong DPT 183 151 ;-------------------------------------------------------------------- … … 192 160 IterateFindFirstDPTforIdevars: 193 161 cmp dl, [di+DPT.bIdevarsOffset] ; Clears CF if matched 194 je . done162 je .Done 195 163 stc ; Set CF for not found 196 . done:164 .Done: 197 165 ret 198 166 … … 221 189 %endif 222 190 223 jmp shortFindDPT_ForDriveNumberInDL.CalcDPTForNewDrive191 jmp SHORT FindDPT_ForDriveNumberInDL.CalcDPTForNewDrive 224 192 225 193 ;-------------------------------------------------------------------- … … 227 195 ; Parameters: 228 196 ; DS:DI: Ptr to DPT to examine 229 ; 230 ; Returns: 231 ; CF: Clear if wanted DPT found197 ; BL: Bit(s) to test in DPT.bFlagsHigh 198 ; Returns: 199 ; CF: Cleared if wanted DPT found 232 200 ; Set if wrong DPT 233 201 ; Corrupts registers: 234 202 ; Nothing 235 203 ;-------------------------------------------------------------------- 204 %ifdef MODULE_SERIAL 236 205 ALIGN JUMP_ALIGN 237 206 IterateToDptWithFlagsHighInBL: … … 241 210 .ReturnRightDPT: 242 211 ret 212 %endif 243 213 244 214 ;-------------------------------------------------------------------- … … 248 218 ; Returns: 249 219 ; DS:DI: Ptr to DPT 250 ; CF: Setif wanted DPT found251 ; Cleared if DPT not found220 ; CF: Cleared if wanted DPT found 221 ; Set if DPT not found, or no DPTs present 252 222 ; Corrupts registers: 253 223 ; SI … … 257 227 FindDPT_ToDSDIforSerialDevice: 258 228 mov bl, FLGH_DPT_SERIAL_DEVICE 259 ; fall-through 260 %endif 261 262 ;-------------------------------------------------------------------- 263 ; FindDPT_ToDSDIforFlagsHigh 264 ; Parameters: 265 ; DS: RAMVARS segment 266 ; 229 ; Fall to FindDPT_ToDSDIforFlagsHighInBL 230 %endif 231 232 ;-------------------------------------------------------------------- 233 ; FindDPT_ToDSDIforFlagsHighInBL 234 ; Parameters: 235 ; DS: RAMVARS segment 236 ; BL: Bit(s) to test in DPT.bFlagsHigh 267 237 ; Returns: 268 238 ; DS:DI: Ptr to DPT 269 ; CF: Setif wanted DPT found270 ; Cleared if DPT not found239 ; CF: Cleared if wanted DPT found 240 ; Set if DPT not found, or no DPTs present 271 241 ; Corrupts registers: 272 242 ; SI 273 243 ;-------------------------------------------------------------------- 274 %ifdef MODULE_IRQ 275 ALIGN JUMP_ALIGN 276 FindDPT_ToDSDIforFlagsHighInBL: 277 %endif 244 %ifdef MODULE_SERIAL 245 ;%ifdef MODULE_IRQ 246 ;ALIGN JUMP_ALIGN 247 ;FindDPT_ToDSDIforFlagsHighInBL: ; This label is unused 248 ;%endif 278 249 mov si, IterateToDptWithFlagsHighInBL 279 ; Fall to IterateAllDPTs 250 jmp SHORT FindDPT_IterateAllDPTs 251 %endif 252 253 ;-------------------------------------------------------------------- 254 ; FindDPT_MasterOrSingleForIdevarsOffsetInDL 255 ; Parameters: 256 ; DL: Offset to IDEVARS to search for 257 ; DS: RAMVARS segment 258 ; Returns: 259 ; DS:DI: Ptr to first DPT with same IDEVARS as in DL 260 ; CF: Cleared if wanted DPT found 261 ; Set if DPT not found, or no DPTs present 262 ; Corrupts registers: 263 ; SI 264 ;-------------------------------------------------------------------- 265 FindDPT_MasterOrSingleForIdevarsOffsetInDL: 266 mov si, IterateFindFirstDPTforIdevars 267 jmp SHORT FindDPT_IterateAllDPTs 268 269 ;-------------------------------------------------------------------- 270 ; FindDPT_SlaveForIdevarsOffsetInDL 271 ; Parameters: 272 ; DL: Offset to IDEVARS to search for 273 ; DS: RAMVARS segment 274 ; Returns: 275 ; DS:DI: Ptr to second DPT with same IDEVARS as in DL 276 ; CF: Cleared if wanted DPT found 277 ; Set if DPT not found, or no DPTs present 278 ; Corrupts registers: 279 ; SI 280 ;-------------------------------------------------------------------- 281 FindDPT_SlaveForIdevarsOffsetInDL: 282 mov si, IterateFindSecondDPTforIdevars 283 ; Fall to FindDPT_IterateAllDPTs 280 284 281 285 ;-------------------------------------------------------------------- … … 286 290 ; AX,BX,DX: Parameters to callback function 287 291 ; CS:SI: Ptr to callback function 288 ; 292 ; Callback routine should return CF=clear if found 289 293 ; DS: RAMVARS segment 290 294 ; Returns: 291 295 ; DS:DI: Ptr to wanted DPT (if found) 292 296 ; If not found, points to first empty DPT 293 ; CF: Clear if wanted DPT found297 ; CF: Cleared if wanted DPT found 294 298 ; Set if DPT not found, or no DPTs present 295 299 ; Corrupts registers: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r556 r567 44 44 ; DS: RAMVARS segment 45 45 ; Corrupts registers: 46 ; AX 46 ; AX, CL 47 47 ;-------------------------------------------------------------------- 48 48 .StealMemoryForRAMVARS: … … 56 56 mov al, [cs:ROMVARS.bStealSize] 57 57 sub [BDA.wBaseMem], ax 58 mov ax, [BDA.wBaseMem] ; We can save a byte here by using INT 12h instead 59 eSHL_IM ax, 6 ; Segment to first stolen kB (*=40h) 58 mov ax, [BDA.wBaseMem] 59 %ifdef USE_186 60 shl ax, 6 ; Segment to first stolen kB (*=40h) 61 %else 62 mov cl, 6 63 shl ax, cl 64 %endif 60 65 ; Fall to .InitializeRamvars 61 66 … … 186 191 ; Returns: 187 192 ; AL: First floppy drive number supported 188 ; 193 ; CF: Number of floppy drives supported (clear = 1, set = 2) 189 194 ; SF: Emulating drives (clear = yes, set = no) 190 195 ; Corrupts registers: -
trunk/XTIDE_Universal_BIOS/makefile
r561 r567 27 27 # MODULE_SERIAL_FLOPPY Virtual floppy drives using serial port (requires MODULE_SERIAL) # 28 28 # MODULE_STRINGS_COMPRESSED Use compressed strings to save space # 29 # MODULE_VERY_LATE_INIT IALIZATION Initialize on INT 13h if our INT 19h handler is not called#30 # MODULE_ FEATURE_SETSPower Management support #29 # MODULE_VERY_LATE_INIT Initialize on INT 13h if our INT 19h handler is not called # 30 # MODULE_POWER_MANAGEMENT Power Management support # 31 31 # # 32 32 # Not modules but these affect the assembly: # … … 101 101 # Assembler preprocessor defines. # 102 102 ################################################################# 103 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ FEATURE_SETSRESERVE_DIAGNOSTIC_CYLINDER103 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_8BIT_IDE MODULE_EBIOS MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_POWER_MANAGEMENT RESERVE_DIAGNOSTIC_CYLINDER 104 104 DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE_ADVANCED MODULE_COMPATIBLE_TABLES 105 105 106 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE_ADVANCED MODULE_VERY_LATE_INITIALIZATION106 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE_ADVANCED 107 107 DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186 108 108 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_ADVANCED_ATA MODULE_COMPATIBLE_TABLES … … 115 115 DEFINES_386_8K = $(DEFINES_AT) USE_386 116 116 117 DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_8BIT_IDE_ADVANCED MODULE_ADVANCED_ATA MODULE_EBIOS MODULE_BOOT_MENU MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_ FEATURE_SETSMODULE_COMPATIBLE_TABLES117 DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_8BIT_IDE_ADVANCED MODULE_ADVANCED_ATA MODULE_EBIOS MODULE_BOOT_MENU MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_POWER_MANAGEMENT MODULE_COMPATIBLE_TABLES 118 118 DEFINES_ALL_FEATURES += ELIMINATE_CGA_SNOW RELOCATE_INT13H_STACK RESERVE_DIAGNOSTIC_CYLINDER 119 119 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc
r526 r567 47 47 FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte 48 48 FLG_MENUITEM_PROGRAMVAR EQU (1<<4) ; Item is for configuring program, not BIOS 49 FLG_MENUITEM_CHOICESTRINGS EQU (1<<5); ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,49 FLG_MENUITEM_CHOICESTRINGS EQU (1<<5) ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table, 50 50 ; ChoiceToStringLookup table must also be NULL terminated 51 51 FLG_MENUITEM_MASKVALUE EQU (1<<6) ; Item value is more than one bit among other bits -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r526 r567 43 43 ; Returns: 44 44 ; ZF: Set if supported version of XTIDE Universal BIOS is loaded 45 ; Cleared no file or some other file is loaded45 ; Cleared if no file or some other file is loaded 46 46 ; Corrupts registers: 47 47 ; CX, SI, DI, ES … … 50 50 Buffers_IsXtideUniversalBiosLoaded: 51 51 test WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED 52 jz SHORT .NoFileOrBiosLoaded 53 54 call Buffers_GetFileBufferToESDI 55 jmp SHORT Buffers_IsXtideUniversalBiosSignatureInESDI 56 .NoFileOrBiosLoaded: 52 jnz SHORT .FileOrBiosLoaded 57 53 or cl, 1 ; Clear ZF 58 54 ret 59 55 56 .FileOrBiosLoaded: 57 call Buffers_GetFileBufferToESDI 58 ; Fall to Buffers_IsXtideUniversalBiosSignatureInESDI 59 60 60 61 61 ;-------------------------------------------------------------------- … … 65 65 ; Returns: 66 66 ; ZF: Set if supported version of XTIDE Universal BIOS is loaded 67 ; Cleared no file or some other file is loaded67 ; Cleared if no file or some other file is loaded 68 68 ; Corrupts registers: 69 69 ; CX, SI … … 183 183 mov cx, [cs:di+g_rgwEepromTypeToSizeInWords] 184 184 sub cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords] ; CX = WORDs to append 185 j le SHORT .NoNeedToAppendZeroes185 jbe SHORT .NoNeedToAppendZeroes 186 186 187 187 call Buffers_GetFileBufferToESDI -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/IdeAutodetect.asm
r526 r567 38 38 ;-------------------------------------------------------------------- 39 39 IdeAutodetect_DetectIdeDeviceFromPortDXAndReturnControlBlockInSI: 40 cmp d x, FIRST_MEMORY_SEGMENT_ADDRESS40 cmp dh, FIRST_MEMORY_SEGMENT_ADDRESS >> 8 41 41 jb SHORT DetectPortMappedDeviceFromPortDX 42 42 ; Fall to DetectMemoryMappedDeviceFromSegmentDX … … 55 55 ;-------------------------------------------------------------------- 56 56 DetectMemoryMappedDeviceFromSegmentDX: 57 ; *** Try to detect JR-IDE/ISA (only if MODULE_8BIT_IDE_ADVANCED is present) ***57 ; *** Try to detect JR-IDE/ISA and ADP50L (only if MODULE_8BIT_IDE_ADVANCED is present) *** 58 58 test WORD [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED 59 jz SHORT NoIdeDeviceFound 59 stc 60 jz SHORT .NoIdeDeviceFound 60 61 61 62 push ds 62 63 mov ds, dx 63 cli ; Disable Interrupts 64 65 cli 64 66 mov ah, [JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET + STATUS_REGISTER_in] 65 67 mov al, [JRIDE_CONTROL_BLOCK_REGISTER_WINDOW_OFFSET + ALTERNATE_STATUS_REGISTER_in] 66 sti ; Enable Interrupts 68 sti 69 call CompareIdeStatusRegistersFromALandAH 70 mov al, DEVICE_8BIT_JRIDE_ISA 71 jnc .IdeDeviceFound 72 73 cli 74 mov ah, [ADP50L_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET + (STATUS_REGISTER_in << 1)] 75 mov al, [ADP50L_CONTROL_BLOCK_REGISTER_WINDOW_OFFSET + (ALTERNATE_STATUS_REGISTER_in << 1)] 76 sti 77 call CompareIdeStatusRegistersFromALandAH 78 mov al, DEVICE_8BIT_ADP50L 79 80 .IdeDeviceFound: 81 mov si, dx ; For IDEDTCT.COM 67 82 pop ds 68 call CompareIdeStatusRegistersFromALandAH 69 mov al, DEVICE_8BIT_JRIDE_ISA ; Assume CF was cleared 70 mov si, dx ; For IDEDTCT.COM 71 ret ; No need to return Control Block Port 83 .NoIdeDeviceFound: 84 ret 72 85 73 86 … … 110 123 111 124 ; Detect 8-bit devices only if MODULE_8BIT_IDE is available 112 test BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE 125 test BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE | FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED 113 126 jz SHORT NoIdeDeviceFound 127 jpo SHORT .SkipXTCF ; Only 1 bit set means no MODULE_8BIT_IDE_ADVANCED 114 128 115 129 ; *** Try to detect XT-CF *** … … 120 134 mov al, DEVICE_8BIT_XTCF_PIO8 121 135 jnc SHORT .IdeDeviceFound 122 136 shr bx, 1 137 .SkipXTCF: 123 138 124 139 ; *** Try to detect 8-bit XT-IDE rev 1 or rev 2 *** … … 126 141 ; Status Register addresses. That is why we need another step 127 142 ; to check is this XT-IDE rev 1 or rev 2. 128 sub si, BYTE XTCF_CONTROL_BLOCK_OFFSET >> 1129 shr bx, 1143 mov si, dx 144 add si, BYTE XTIDE_CONTROL_BLOCK_OFFSET 130 145 call DetectIdeDeviceFromPortsDXandSIwithOffsetsInBLandBH 131 146 jc SHORT NoIdeDeviceFound ; No XT-IDE rev 1 or rev 2 found … … 210 225 test al, FLG_STATUS_DRDY 211 226 jz SHORT NoIdeDeviceFound ; Device needs to be ready 212 ret 227 ret ; Return with CF cleared 213 228 214 229 NoIdeDeviceFound: … … 305 320 dw 3C0h 306 321 dw 3E0h 307 ; JR-IDE/ISA (Memory Segment Addresses) 308 dw 0C000h 309 dw 0C400h 310 dw 0C800h 311 dw 0CC00h 312 dw 0D000h 313 dw 0D400h 314 dw 0D800h 322 ; Memory Segment Addresses 323 dw 0C000h ; JR-IDE/ISA 324 dw 0C400h ; JR-IDE/ISA 325 dw 0C800h ; JR-IDE/ISA and ADP50L 326 dw 0CA00h ; ADP50L 327 dw 0CC00h ; JR-IDE/ISA and ADP50L 328 dw 0CE00h ; ADP50L 329 dw 0D000h ; JR-IDE/ISA 330 dw 0D400h ; JR-IDE/ISA 331 dw 0D800h ; JR-IDE/ISA 315 332 .wLastIdePort: 316 dw 0DC00h 333 dw 0DC00h ; JR-IDE/ISA -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
r526 r567 389 389 mov di, g_cfgVars 390 390 ret 391 392 393 ;-------------------------------------------------------------------- 394 ; EnableMenuitemFromCSBX 395 ; DisableMenuitemFromCSBX 396 ; Parameters: 397 ; CS:BX: Ptr to MENUITEM 398 ; Returns: 399 ; Nothing 400 ; Corrupts registers: 401 ; Nothing 402 ;-------------------------------------------------------------------- 403 ALIGN JUMP_ALIGN 404 EnableMenuitemFromCSBX: 405 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 406 ret 407 408 ALIGN JUMP_ALIGN 409 DisableMenuitemFromCSBX: 410 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 411 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm
r526 r567 235 235 ALIGN JUMP_ALIGN 236 236 .EnableMenuitemFromCSBX: 237 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 238 ret 237 jmp EnableMenuitemFromCSBX 239 238 240 239 ALIGN JUMP_ALIGN 241 240 .DisableMenuitemFromCSBX: 242 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 243 ret 241 jmp DisableMenuitemFromCSBX 244 242 245 243 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
r526 r567 217 217 .DisableAllIdeControllerMenuitems: 218 218 mov cx, MAX_ALLOWED_IDE_CONTROLLERS-1 219 mov bx, g_MenuitemConfigurationSecondaryIdeController 220 ALIGN JUMP_ALIGN 221 .DisableNextIdeControllerMenuitem: 222 call .DisableMenuitemFromCSBX 223 add bx, BYTE MENUITEM_size 224 loop .DisableNextIdeControllerMenuitem 225 ret 219 mov ax, DisableMenuitemFromCSBX 220 jmp SHORT .Go 226 221 227 222 ALIGN JUMP_ALIGN … … 230 225 dec cx ; Primary always enabled 231 226 jz SHORT .PrimaryControllerAlreadyEnabled 227 mov ax, EnableMenuitemFromCSBX 228 .Go: 232 229 mov bx, g_MenuitemConfigurationSecondaryIdeController 233 230 ALIGN JUMP_ALIGN 234 .Enable NextIdeControllerMenuitem:235 call .EnableMenuitemFromCSBX231 .EnableOrDisableNextIdeControllerMenuitem: 232 call ax 236 233 add bx, BYTE MENUITEM_size 237 loop .Enable NextIdeControllerMenuitem234 loop .EnableOrDisableNextIdeControllerMenuitem 238 235 .PrimaryControllerAlreadyEnabled: 239 236 ret … … 288 285 call Buffers_GetRomvarsFlagsToAX 289 286 mov bx, g_MenuitemConfigurationIdleTimeout 290 test ax, FLG_ROMVARS_MODULE_ FEATURE_SETS287 test ax, FLG_ROMVARS_MODULE_POWER_MANAGEMENT 291 288 jz SHORT .DisableMenuitemFromCSBX 292 289 ; Fall to .EnableMenuitemFromCSBX … … 305 302 ALIGN JUMP_ALIGN 306 303 .EnableMenuitemFromCSBX: 307 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 308 ret 304 jmp EnableMenuitemFromCSBX 309 305 310 306 ALIGN JUMP_ALIGN 311 307 .DisableMenuitemFromCSBX: 312 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 313 ret 314 308 jmp DisableMenuitemFromCSBX 315 309 316 310 … … 419 413 jnz .next 420 414 mov si, di 421 jmp .next415 SKIP2B f 422 416 423 417 .notSerial: -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r546 r567 242 242 dw NULL 243 243 244 SERIAL_DEFAULT_CUSTOM_PORT EQU 300h ; can't be any of the pre-defined COM values 245 246 PackedCOMPortAddresses: ; COM1 - COMC (or COM12) 247 db SERIAL_COM1_IOADDRESS >> 2 244 SERIAL_DEFAULT_CUSTOM_PORT EQU 300h ; can't be any of the pre-defined COM values 245 SERIAL_DEFAULT_COM EQU '1' 246 SERIAL_DEFAULT_BAUD EQU ((115200 / 9600) & 0xff) 247 248 PackedCOMPortAddresses: ; COM1 - COMC (or COM12) 249 db SERIAL_COM1_IOADDRESS >> 2 248 250 db SERIAL_COM2_IOADDRESS >> 2 249 251 db SERIAL_COM3_IOADDRESS >> 2 … … 258 260 db SERIAL_COMC_IOADDRESS >> 2 259 261 db SERIAL_DEFAULT_CUSTOM_PORT >> 2 ; must be last entry (see reader/writer routines) 260 SERIAL_DEFAULT_COM EQU '1'261 262 262 263 g_rgbChoiceToValueLookupForBaud: … … 279 280 dw g_szValueCfgBaud2400 280 281 dw NULL 281 SERIAL_DEFAULT_BAUD EQU ((115200 / 9600) & 0xff)282 282 283 283 ; Section containing code … … 339 339 push cs 340 340 pop ds 341 call .EnableOrDisableCommandBlockPort 341 342 call .EnableOrDisableControlBlockPort 342 343 call .DisableIRQchannelSelection … … 345 346 mov si, g_MenupageForIdeControllerMenu 346 347 jmp Menupage_ChangeToNewMenupageInDSSI 348 349 350 ;-------------------------------------------------------------------- 351 ; .EnableOrDisableCommandBlockPort 352 ; Parameters: 353 ; SS:BP: Menu handle 354 ; Returns: 355 ; Nothing 356 ; Corrupts registers: 357 ; AX, BX 358 ;-------------------------------------------------------------------- 359 ALIGN JUMP_ALIGN 360 .EnableOrDisableCommandBlockPort: 361 mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 362 call Buffers_GetRomvarsValueToAXfromOffsetInBX 363 mov bx, g_MenuitemIdeControllerCommandBlockAddress 364 cmp al, DEVICE_SERIAL_PORT 365 je SHORT .DisableMenuitemFromCSBX 366 jmp SHORT .EnableMenuitemFromCSBX 347 367 348 368 … … 385 405 call Buffers_GetRomvarsValueToAXfromOffsetInBX 386 406 mov bx, g_MenuitemIdeControllerEnableInterrupt 387 cmp al, DEVICE_8BIT_XT IDE_REV2407 cmp al, DEVICE_8BIT_XTCF_PIO8 388 408 jae SHORT .DisableMenuitemFromCSBX 389 409 390 call .EnableMenuitemFromCSBX410 call EnableMenuitemFromCSBX 391 411 ; Fall to .EnableOrDisableIRQchannelSelection 392 412 … … 424 444 ALIGN JUMP_ALIGN 425 445 .DisableMenuitemFromCSBX: 426 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 427 ret 446 jmp DisableMenuitemFromCSBX 428 447 429 448 ALIGN JUMP_ALIGN 430 449 .EnableMenuitemFromCSBX: 431 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 432 ret 450 jmp EnableMenuitemFromCSBX 433 451 434 452 435 453 .EnableOrDisableSerial: 436 454 mov bx, g_MenuitemIdeControllerSerialBaud 437 call .DisableMenuitemFromCSBX455 call DisableMenuitemFromCSBX 438 456 439 457 mov bx, g_MenuitemIdeControllerSerialCOM 440 call .DisableMenuitemFromCSBX458 call DisableMenuitemFromCSBX 441 459 442 460 mov bx, g_MenuitemIdeControllerSerialPort 443 call .DisableMenuitemFromCSBX461 call DisableMenuitemFromCSBX 444 462 445 463 mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 446 464 call Buffers_GetRomvarsValueToAXfromOffsetInBX 447 465 cmp al, DEVICE_SERIAL_PORT 448 jn z.DisableAllSerial466 jne .DisableAllSerial 449 467 450 468 mov bx, g_MenuitemIdeControllerSerialCOM 451 call .EnableMenuitemFromCSBX469 call EnableMenuitemFromCSBX 452 470 453 471 mov bx, g_MenuitemIdeControllerSerialBaud 454 call .EnableMenuitemFromCSBX472 call EnableMenuitemFromCSBX 455 473 456 474 mov bx, [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 457 475 call Buffers_GetRomvarsValueToAXfromOffsetInBX 458 476 mov bx, g_MenuitemIdeControllerSerialPort 459 cmp al, 'x'460 j z.EnableMenuitemFromCSBX461 jmp .DisableMenuitemFromCSBX477 cmp al, 'x' 478 je SHORT .EnableMenuitemFromCSBX 479 jmp SHORT .DisableMenuitemFromCSBX 462 480 .DisableAllSerial: 463 481 ret … … 485 503 DisplayMasterSlaveMenu: 486 504 ; 487 ; block mode is not supported on serial drives, disable/enable the optionas appropriate505 ; "Block Mode Transfers" and "Internal Write Cache" are not supported on serial drives, disable/enable the options as appropriate 488 506 ; 489 507 push bx … … 491 509 call Buffers_GetRomvarsValueToAXfromOffsetInBX 492 510 mov bx, g_MenuitemMasterSlaveBlockModeTransfers 493 cmp al,DEVICE_SERIAL_PORT 494 jz .isSerial 495 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 511 512 cmp al, DEVICE_SERIAL_PORT 513 je .isSerial 514 515 call EnableMenuitemFromCSBX 516 mov bx, g_MenuitemMasterSlaveWriteCache 517 call EnableMenuitemFromCSBX 496 518 jmp .isDone 519 497 520 .isSerial: 498 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 521 call DisableMenuitemFromCSBX 522 mov bx, g_MenuitemMasterSlaveWriteCache 523 call DisableMenuitemFromCSBX 524 499 525 .isDone: 500 526 pop bx … … 515 541 ; Writers: 516 542 ; Parameters: 517 ; AX:Value that the MENUITEM system was interacting with518 ; ES:DI: 519 ; DS:SI:MENUITEM pointer543 ; AX: Value that the MENUITEM system was interacting with 544 ; ES:DI: ROMVARS location where the value is to be stored 545 ; DS:SI: MENUITEM pointer 520 546 ; Returns: 521 547 ; AX: Value to actually write to ROMVARS … … 525 551 ; Readers: 526 552 ; Parameters: 527 ; AX:Value read from the ROMVARS location528 ; ES:DI: 529 ; DS:SI:MENUITEM pointer553 ; AX: Value read from the ROMVARS location 554 ; ES:DI: ROMVARS location where the value was just read from 555 ; DS:SI: MENUITEM pointer 530 556 ; Returns: 531 557 ; AX: Value that the MENUITEM system will interact with and display … … 535 561 ALIGN JUMP_ALIGN 536 562 WriterForXTCFwindow: 537 mov al, ah 563 xor al, al 564 SKIP2B f 565 ReaderForXTCFwindow: 538 566 xor ah, ah 539 ret 540 541 ALIGN JUMP_ALIGN 542 ReaderForXTCFwindow: 543 mov ah, al 544 xor al, al 567 xchg al, ah 545 568 ret 546 569 … … 552 575 ALIGN JUMP_ALIGN 553 576 IdeControllerMenu_WriteDevice: 554 push bx 555 push di 556 push di 557 push ax 558 559 ; Note! AL is the choice index, not device code 560 shl ax, 1 ; Selection to device code 561 mov bl, [es:di] ; what is the current Device we are changing from? 562 sub di, BYTE IDEVARS.bDevice - IDEVARS.wBasePort ; Get ready to set the Port addresses 563 cmp al, DEVICE_SERIAL_PORT 564 je SHORT .changingToSerial 565 cmp al, DEVICE_8BIT_JRIDE_ISA 566 je SHORT .ChangingToJrIdeIsa 567 cmp al, DEVICE_8BIT_ADP50L 568 je SHORT .ChangingToADP50L 569 570 ; Restore ports to default values 571 cmp al, DEVICE_8BIT_ATA ; Standard ATA controllers, including 8-bit mode 572 mov ax, DEVICE_ATA_PRIMARY_PORT ; Defaults for 16-bit and better ATA devices 573 mov bx, DEVICE_ATA_PRIMARY_PORTCTRL 574 jbe SHORT .writeNonSerial 575 576 mov ax, DEVICE_XTIDE_DEFAULT_PORT ; Defaults for 8-bit XTIDE and XT-CF devices 577 mov bx, DEVICE_XTIDE_DEFAULT_PORTCTRL 578 579 .writeNonSerial: 580 stosw ; Store defaults in IDEVARS.wBasePort and IDEVARS.wBasePortCtrl 581 xchg bx, ax 582 stosw 583 jmp SHORT .done 577 push bx 578 push di 579 push ax 580 581 ; Note! AL is the choice index, not device code 582 shl ax, 1 ; Selection to device code 583 mov bl, [es:di] ; what is the current Device we are changing from? 584 sub di, BYTE IDEVARS.bDevice - IDEVARS.wBasePort ; Get ready to set the Port addresses 585 cmp al, DEVICE_SERIAL_PORT 586 je SHORT .ChangingToSerial 587 cmp al, DEVICE_8BIT_JRIDE_ISA 588 je SHORT .ChangingToJrIdeIsa 589 cmp al, DEVICE_8BIT_ADP50L 590 je SHORT .ChangingToADP50L 591 592 ; Restore ports to default values 593 cmp al, DEVICE_8BIT_ATA ; Standard ATA controllers, including 8-bit mode 594 mov ax, DEVICE_ATA_PRIMARY_PORT ; Defaults for 16-bit and better ATA devices 595 mov bx, DEVICE_ATA_PRIMARY_PORTCTRL 596 jbe SHORT .WriteNonSerial 597 598 mov ax, DEVICE_XTIDE_DEFAULT_PORT ; Defaults for 8-bit XTIDE and XT-CF devices 599 mov bx, DEVICE_XTIDE_DEFAULT_PORTCTRL 600 601 .WriteNonSerial: 602 stosw ; Store defaults in IDEVARS.wBasePort and IDEVARS.wBasePortCtrl 603 xchg bx, ax 604 stosw 605 jmp SHORT .Done 584 606 585 607 .ChangingToJrIdeIsa: 586 587 608 mov ah, JRIDE_DEFAULT_SEGMENT_ADDRESS >> 8 609 SKIP2B bx 588 610 589 611 .ChangingToADP50L: 590 mov ah, ADP50L_DEFAULT_BIOS_SEGMENT_ADDRESS >> 8 591 xor al, al 592 xor bx, bx 593 jmp SHORT .writeNonSerial 594 595 .changingToSerial: 596 cmp bl, DEVICE_SERIAL_PORT 597 je SHORT .done ; if we were already serial, nothing to do 598 599 mov BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD 600 601 mov al, SERIAL_DEFAULT_COM 602 sub di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar 603 call IdeControllerMenu_SerialWriteCOM 604 stosb 605 606 .done: 607 pop ax 608 pop di ; IDEVARS.bDevice 609 pop di 610 pop bx 611 ret 612 mov ah, ADP50L_DEFAULT_BIOS_SEGMENT_ADDRESS >> 8 613 xor al, al 614 xor bx, bx 615 jmp SHORT .WriteNonSerial 616 617 .ChangingToSerial: 618 cmp bl, DEVICE_SERIAL_PORT 619 je SHORT .Done ; if we were already serial, nothing to do 620 621 mov BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD 622 623 mov al, SERIAL_DEFAULT_COM 624 sub di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar 625 call IdeControllerMenu_SerialWriteCOM 626 stosb 627 628 .Done: 629 pop ax 630 pop di ; IDEVARS.bDevice 631 pop bx 632 ret 612 633 613 634 ; … … 617 638 ALIGN JUMP_ALIGN 618 639 IdeControllerMenu_SerialWriteCOM: 619 620 621 622 623 mov si,g_rgbChoiceToValueLookupForCOM624 mov bx,PackedCOMPortAddresses640 push ax 641 push bx 642 push si 643 644 mov si, g_rgbChoiceToValueLookupForCOM 645 mov bx, PackedCOMPortAddresses 625 646 626 647 .loop: 627 mov ah,[bx]628 629 cmp ah,(SERIAL_DEFAULT_CUSTOM_PORT >> 2)630 jz.notFound631 632 cmp al,[si]633 jz.found634 635 636 637 638 639 648 mov ah, [bx] 649 650 cmp ah, (SERIAL_DEFAULT_CUSTOM_PORT >> 2) 651 je .notFound 652 653 cmp al, [si] 654 je .found 655 656 inc si 657 inc si 658 inc bx 659 660 jmp .loop 640 661 641 662 .notFound: 642 663 mov al, 'x' 643 664 644 665 .found: 645 646 647 648 649 650 651 666 mov [es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah 667 668 pop si 669 pop bx 670 pop ax 671 672 ret 652 673 653 674 … … 657 678 ALIGN JUMP_ALIGN 658 679 IdeControllerMenu_SerialReadPort: 659 xor ah,ah660 661 680 xor ah, ah 681 eSHL_IM ax, 2 682 ret 662 683 663 684 ; … … 667 688 ALIGN JUMP_ALIGN 668 689 IdeControllerMenu_SerialWritePort: 669 670 671 672 673 and al,0feh ; force 8-byte boundary674 675 mov si,g_rgbChoiceToValueLookupForCOM676 mov bx,PackedCOMPortAddresses ; loop, looking for port address in known COM address list690 push bx 691 push si 692 693 eSHR_IM ax, 2 694 and al, 0feh ; force 8-byte boundary 695 696 mov si, g_rgbChoiceToValueLookupForCOM 697 mov bx, PackedCOMPortAddresses ; loop, looking for port address in known COM address list 677 698 678 699 .loop: 679 mov ah,[si]680 cmp ah,'x'681 jz.found682 683 cmp al,[bx]684 jz.found685 686 687 688 689 690 700 mov ah, [si] 701 cmp ah, 'x' 702 je .found 703 704 cmp al, [bx] 705 je .found 706 707 inc si 708 inc si 709 inc bx 710 711 jmp .loop 691 712 692 713 .found: 693 694 695 696 697 698 699 714 mov [es:di+IDEVARS.bSerialCOMPortChar-IDEVARS.bSerialPort], ah 715 716 pop si 717 pop bx 718 719 ret 720 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MasterSlaveMenu.asm
r548 r567 290 290 ; Enable both 291 291 mov bx, g_MenuitemMasterSlaveUserCHS 292 call .EnableMenuitemFromCSBX292 call EnableMenuitemFromCSBX 293 293 mov bx, g_MenuitemMasterSlaveUserLBA 294 jmp .EnableMenuitemFromCSBX294 jmp SHORT .EnableMenuitemFromCSBX 295 295 296 296 ALIGN JUMP_ALIGN 297 297 .EnableCHSandDisableLBA: 298 298 mov bx, g_MenuitemMasterSlaveUserCHS 299 call .EnableMenuitemFromCSBX299 call EnableMenuitemFromCSBX 300 300 mov bx, g_MenuitemMasterSlaveUserLBA 301 jmp .DisableMenuitemFromCSBX301 jmp SHORT .DisableMenuitemFromCSBX 302 302 303 303 ALIGN JUMP_ALIGN 304 304 .DisableCHSandEnableLBA: 305 305 mov bx, g_MenuitemMasterSlaveUserLBA 306 call .EnableMenuitemFromCSBX306 call EnableMenuitemFromCSBX 307 307 mov bx, g_MenuitemMasterSlaveUserCHS 308 jmp .DisableMenuitemFromCSBX308 jmp SHORT .DisableMenuitemFromCSBX 309 309 310 310 … … 328 328 329 329 mov bx, g_MenuitemMasterSlaveCylinders 330 call .EnableMenuitemFromCSBX330 call EnableMenuitemFromCSBX 331 331 mov bx, g_MenuitemMasterSlaveHeads 332 call .EnableMenuitemFromCSBX332 call EnableMenuitemFromCSBX 333 333 mov bx, g_MenuitemMasterSlaveSectors 334 334 jmp SHORT .EnableMenuitemFromCSBX … … 337 337 .DisableCHandS: 338 338 mov bx, g_MenuitemMasterSlaveCylinders 339 call .DisableMenuitemFromCSBX339 call DisableMenuitemFromCSBX 340 340 mov bx, g_MenuitemMasterSlaveHeads 341 call .DisableMenuitemFromCSBX341 call DisableMenuitemFromCSBX 342 342 mov bx, g_MenuitemMasterSlaveSectors 343 343 jmp SHORT .DisableMenuitemFromCSBX … … 377 377 ALIGN JUMP_ALIGN 378 378 .EnableMenuitemFromCSBX: 379 or BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE 380 ret 379 jmp EnableMenuitemFromCSBX 381 380 382 381 ALIGN JUMP_ALIGN 383 382 .DisableMenuitemFromCSBX: 384 and BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE 385 ret 383 jmp DisableMenuitemFromCSBX 386 384 387 385 … … 407 405 408 406 xchg ax, dx ; SHR 16 409 eSH IFT_IM ax, 4, shr; SHR 4 => AX = DX:AX / (1024*1024)407 eSHR_IM ax, 4 ; SHR 4 => AX = DX:AX / (1024*1024) 410 408 411 409 pop dx … … 429 427 430 428 xor dx, dx 431 eSH IFT_IM ax, 4, shl429 eSHL_IM ax, 4 432 430 xchg dx, ax ; DX:AX now holds AX * 1024 * 1024 433 431 … … 445 443 ALIGN JUMP_ALIGN 446 444 MasterSlaveMenu_WriteCHSFlag: 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 445 test word [es:di], FLG_DRVPARAMS_USERCHS 446 jnz .alreadySet 447 448 push ax 449 push di 450 push si 451 452 mov ax, MASTERSLAVE_CYLINDERS_DEFAULT 453 mov si, g_MenuitemMasterSlaveCylinders 454 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 455 456 mov ax, MASTERSLAVE_HEADS_DEFAULT 457 mov si, g_MenuitemMasterSlaveHeads 458 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 459 460 mov ax, MASTERSLAVE_SECTORS_DEFAULT 461 mov si, g_MenuitemMasterSlaveSectors 462 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 463 464 pop si 465 pop di 466 pop ax 469 467 470 468 .alreadySet: 471 469 ret 472 470 473 471 ; … … 477 475 ALIGN JUMP_ALIGN 478 476 MasterSlaveMenu_WriteLBAFlag: 479 480 481 482 483 484 485 486 487 488 489 490 491 492 477 test word [es:di], FLG_DRVPARAMS_USERLBA 478 jnz .alreadySet 479 480 push ax 481 push di 482 push si 483 484 mov ax, MASTERSLAVE_USERLBA_DEFAULT 485 mov si, g_MenuitemMasterSlaveUserLbaValue 486 call Menuitem_StoreValueFromAXtoMenuitemInDSSI 487 488 pop si 489 pop di 490 pop ax 493 491 494 492 .alreadySet: 495 493 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r565 r567 69 69 g_szItemMainFlash: db "Flash EEPROM",NULL 70 70 g_szItemMainSave: db "Save BIOS back to original file",NULL 71 g_szItemMainLicense: db 72 g_szItemMainHomePage: db 71 g_szItemMainLicense: db "Copyright and License Information",NULL 72 g_szItemMainHomePage: db "Web Links",NULL 73 73 74 74 g_szDlgMainLoadROM: db "Successfully loaded XTIDE Universal BIOS from EEPROM.",NULL … … 128 128 g_szNfoCfgIdleTimeout: db "Enable Power Management to set the harddrive(s) to spin down after idling a certain amount of time.",NULL 129 129 130 g_szSerialMoved: db 130 g_szSerialMoved: db "A Serial Controller has been moved to the end of the Controller list." 131 131 db " No further action is required. Serial Controllers must be placed at the end of the list.",NULL 132 132 … … 294 294 g_szValueCfgDeviceSerial: db "Serial",NULL 295 295 296 g_szSerialCOMChoice: db 296 g_szSerialCOMChoice: db "COM1 - address 3F8h",LF 297 297 db "COM2 - address 2F8h",LF 298 db 299 db 300 db 301 db 298 db "COM3 - address 3E8h",LF 299 db "COM4 - address 2E8h",LF 300 db "COM5 - address 2F0h",LF 301 db "COM6 - address 3E0h",LF 302 302 db "COM7 - address 2E0h",LF 303 303 db "COM8 - address 260h",LF … … 306 306 db "COMB - address 360h",LF 307 307 db "COMC - address 270h",LF 308 db 308 db "COMx - Custom address",NULL 309 309 310 310 g_szValueCfgCOM1: db "COM1",NULL … … 322 322 g_szValueCfgCOMx: db "Custom",NULL 323 323 324 g_szSerialBaudChoice: db 325 db 324 g_szSerialBaudChoice: db "115.2K baud",LF 325 db "57.6K baud",LF 326 326 db "38.4K baud",LF 327 db 328 db 327 db "28.8K baud",LF 328 db "19.2K baud",LF 329 329 db "9600 baud",LF 330 db 331 db 330 db "4800 baud",LF 331 db "2400 baud",NULL 332 332 333 333 g_szValueCfgBaud115_2: db "115.2K",NULL … … 377 377 db " least one drive with buggy Block Mode implementation.",NULL 378 378 379 g_szHelpDrvWriteCache: db "Modern Hard Drives have largeinternal write cache."380 db " The cache will speed up writes since the drive can free the bus right after data has been written incache."381 db " The drive then starts to write the data from cache by itself."382 db " Th atcan be dangerous since all unwritten data in cache is lost if power is turned off or the system is reset."379 g_szHelpDrvWriteCache: db "Modern Hard Drives have a large amount of internal write cache." 380 db " The cache will speed up writes since the drive can free the bus right after data has been written to cache." 381 db " The drive then starts to write the data from cache to disk by itself." 382 db " This can be dangerous since all unwritten data in cache is lost if power is turned off or the system is reset." 383 383 db " Modern operating systems will flush the cache when user shuts down the system." 384 384 db " DOS does not have that sort of protection so it is up to the user to make sure cache is flushed."
Note:
See TracChangeset
for help on using the changeset viewer.