Changeset 567 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Timestamp:
- May 26, 2014, 1:25:15 PM (11 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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.