Changeset 483 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2
- Timestamp:
- Oct 28, 2012, 12:13:47 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_CommandPort.txt
r68 r483 1 IDE controller command block address is the usual address mentioned for IDE controllers. By default the primary IDE controller uses port 1F0h and secondary controller uses port 170h. XTIDE card uses port 300h by default. 1 IDE controller command block address is the usual address mentioned for IDE controllers. By default the primary IDE controller uses port 1F0h and secondary controller uses port 170h. XTIDE card uses port 300h by default. JR-IDE/ISA do not use ports but you need to set ROM space segment address for JR-IDE/ISA. -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Main.asm
r481 r483 25 25 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first! 26 26 %include "Romvars.inc" ; XTIDE Universal BIOS variables 27 %include "JRIDE_ISA.inc" ; For JR-IDE/ISA default segment 27 28 %include "XTCF.inc" ; For XT-CF modes 28 29 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
r481 r483 26 26 at MENUPAGE.fnEnter, dw IdeControllerMenu_EnterMenuOrModifyItemVisibility 27 27 at MENUPAGE.fnBack, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility 28 at MENUPAGE.wMenuitems, dw 1 128 at MENUPAGE.wMenuitems, dw 12 29 29 iend 30 30 … … 83 83 at MENUITEM.szQuickInfo, dw g_szNfoIdeCmdPort 84 84 at MENUITEM.szHelp, dw g_szHelpIdeCmdPort 85 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE85 at MENUITEM.bFlags, db NULL 86 86 at MENUITEM.bType, db TYPE_MENUITEM_HEX 87 87 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL … … 98 98 at MENUITEM.szQuickInfo, dw g_szNfoIdeCtrlPort 99 99 at MENUITEM.szHelp, dw g_szHelpIdeCtrlPort 100 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE100 at MENUITEM.bFlags, db NULL 101 101 at MENUITEM.bType, db TYPE_MENUITEM_HEX 102 102 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL … … 185 185 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 2 186 186 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 15 187 iend 188 189 g_MenuitemIdeControllerXTCFwindow: 190 istruc MENUITEM 191 at MENUITEM.fnActivate, dw Menuitem_ActivateHexInputForMenuitemInDSSI 192 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI 193 at MENUITEM.szName, dw g_szItemIdeXTCFwindow 194 at MENUITEM.szQuickInfo, dw g_szNfoIdeXTCFwindow 195 at MENUITEM.szHelp, dw g_szNfoIdeXTCFwindow 196 at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE 197 at MENUITEM.bType, db TYPE_MENUITEM_HEX 198 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw NULL 199 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgIdeXTCFwindow 200 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 0A000h 201 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 0E800h 202 at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw ReaderForXTCFwindow 203 at MENUITEM.itemValue + ITEM_VALUE.fnValueWriter, dw WriterForXTCFwindow 187 204 iend 188 205 … … 209 226 dw g_szValueCfgDeviceJrIdeIsa 210 227 dw g_szValueCfgDeviceSerial 211 212 228 213 229 g_rgbChoiceToValueLookupForCOM: … … 315 331 mov [cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 316 332 333 lea ax, [bx+IDEVARS.bXTCFcontrolRegister] 334 mov [cs:g_MenuitemIdeControllerXTCFwindow+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax 335 317 336 lea ax, [bx+IDEVARS.bSerialCOMPortChar] 318 337 mov [cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax … … 338 357 push cs 339 358 pop ds 359 call .EnableOrDisableCommandBlockPort 360 call .EnableOrDisableControlBlockPort 340 361 call .DisableIRQchannelSelection 341 362 call .EnableOrDisableEnableInterrupt 363 call .EnableOrDisableXTCFwindow 342 364 call .EnableOrDisableSerial 343 365 mov si, g_MenupageForIdeControllerMenu 344 366 jmp Menupage_ChangeToNewMenupageInDSSI 367 368 369 ;-------------------------------------------------------------------- 370 ; .EnableOrDisableCommandBlockPort 371 ; Parameters: 372 ; SS:BP: Menu handle 373 ; Returns: 374 ; Nothing 375 ; Corrupts registers: 376 ; AX, BX 377 ;-------------------------------------------------------------------- 378 ALIGN JUMP_ALIGN 379 .EnableOrDisableCommandBlockPort: 380 mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 381 call Buffers_GetRomvarsValueToAXfromOffsetInBX 382 mov bx, g_MenuitemIdeControllerCommandBlockAddress 383 cmp al, DEVICE_8BIT_XTCF_PIO8 384 jb SHORT .EnableMenuitemFromCSBX 385 cmp al, DEVICE_SERIAL_PORT 386 je SHORT .DisableMenuitemFromCSBX 387 cmp al, DEVICE_8BIT_XTCF_MEMMAP 388 ja SHORT .EnableMenuitemFromCSBX 389 jmp SHORT .DisableMenuitemFromCSBX 390 391 392 ;-------------------------------------------------------------------- 393 ; .EnableOrDisableControlBlockPort 394 ; Parameters: 395 ; SS:BP: Menu handle 396 ; Returns: 397 ; Nothing 398 ; Corrupts registers: 399 ; AX, BX 400 ;-------------------------------------------------------------------- 401 ALIGN JUMP_ALIGN 402 .EnableOrDisableControlBlockPort: 403 mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 404 call Buffers_GetRomvarsValueToAXfromOffsetInBX 405 mov bx, g_MenuitemIdeControllerControlBlockAddress 406 cmp al, DEVICE_8BIT_XTCF_PIO8 407 jb SHORT .EnableMenuitemFromCSBX 408 jmp SHORT .DisableMenuitemFromCSBX 345 409 346 410 … … 389 453 mov bx, g_MenuitemIdeControllerIdeIRQ 390 454 jz SHORT .DisableMenuitemFromCSBX 455 jmp SHORT .DisableMenuitemFromCSBX 456 457 458 ;-------------------------------------------------------------------- 459 ; .EnableOrDisableXTCFwindow 460 ; Parameters: 461 ; SS:BP: Menu handle 462 ; Returns: 463 ; Nothing 464 ; Corrupts registers: 465 ; AX, BX 466 ;-------------------------------------------------------------------- 467 ALIGN JUMP_ALIGN 468 .EnableOrDisableXTCFwindow: 469 mov bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset] 470 call Buffers_GetRomvarsValueToAXfromOffsetInBX 471 mov bx, g_MenuitemIdeControllerXTCFwindow 472 cmp al, DEVICE_8BIT_XTCF_MEMMAP 473 je SHORT .EnableMenuitemFromCSBX 391 474 ; Fall to .DisableMenuitemFromCSBX 392 475 … … 414 497 415 498 .EnableOrDisableSerial: 416 mov bx, g_MenuitemIdeControllerCommandBlockAddress417 call .DisableMenuitemFromCSBX418 419 mov bx, g_MenuitemIdeControllerControlBlockAddress420 call .DisableMenuitemFromCSBX421 422 499 mov bx, g_MenuitemIdeControllerSerialBaud 423 500 call .DisableMenuitemFromCSBX … … 446 523 jz .EnableMenuitemFromCSBX 447 524 jmp .DisableMenuitemFromCSBX 448 449 525 .DisableAllSerial: 450 451 mov bx, g_MenuitemIdeControllerCommandBlockAddress452 call .EnableMenuitemFromCSBX453 454 mov bx, g_MenuitemIdeControllerControlBlockAddress455 call .EnableMenuitemFromCSBX456 457 526 ret 458 527 … … 527 596 ; AX 528 597 ; 598 ALIGN JUMP_ALIGN 599 WriterForXTCFwindow: 600 mov al, ah 601 xor ah, ah 602 ret 603 604 ALIGN JUMP_ALIGN 605 ReaderForXTCFwindow: 606 mov ah, al 607 xor al, al 608 ret 609 529 610 530 611 ; … … 534 615 ALIGN JUMP_ALIGN 535 616 IdeControllerMenu_WriteDevice: 536 push ax537 617 push bx 538 618 push di 539 540 mov bl,[es:di] ; what is the current Device? 541 542 add di,IDEVARS.wBasePort - IDEVARS.bDevice ; Get ready to set the Port addresses 543 544 cmp al,DEVICE_SERIAL_PORT 545 jz .changingToSerial 546 547 cmp bl,DEVICE_SERIAL_PORT 548 jnz .done ; if we weren't Serial before, nothing to do 549 550 .changingFromSerial: 551 cmp al,DEVICE_16BIT_ATA 552 553 mov ax,DEVICE_XTIDE_DEFAULT_PORT ; Defaults for 8-bit XTIDE devices 554 mov bx,DEVICE_XTIDE_DEFAULT_PORTCTRL 555 556 jb .writeNonSerial 557 619 push di 620 push ax 621 622 ; Note! AL is the choice index, not device code 623 shl ax, 1 ; Selection to device code 624 mov bl, [es:di] ; what is the current Device we are changing from? 625 sub di, BYTE IDEVARS.bDevice - IDEVARS.wBasePort ; Get ready to set the Port addresses 626 cmp al, DEVICE_SERIAL_PORT 627 je SHORT .changingToSerial 628 cmp al, DEVICE_8BIT_JRIDE_ISA 629 je SHORT .ChangingToJrIdeIsa 630 631 ; Restore ports to default values 632 cmp al, DEVICE_8BIT_ATA ; Standard ATA controllers, including 8-bit mode 558 633 mov ax, DEVICE_ATA_PRIMARY_PORT ; Defaults for 16-bit and better ATA devices 559 634 mov bx, DEVICE_ATA_PRIMARY_PORTCTRL 635 jbe SHORT .writeNonSerial 636 637 mov ax, DEVICE_XTIDE_DEFAULT_PORT ; Defaults for 8-bit XTIDE devices 638 mov bx, DEVICE_XTIDE_DEFAULT_PORTCTRL 560 639 561 640 .writeNonSerial: … … 563 642 xchg bx, ax 564 643 stosw 565 566 jmp .done 644 jmp SHORT .done 645 646 .ChangingToJrIdeIsa: 647 mov ax, JRIDE_DEFAULT_SEGMENT_ADDRESS 648 xor bx, bx 649 jmp SHORT .writeNonSerial 567 650 568 651 .changingToSerial: 569 cmp bl, DEVICE_SERIAL_PORT570 j z .done; if we were already serial, nothing to do571 572 mov byte [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort],SERIAL_DEFAULT_BAUD573 574 mov al, SERIAL_DEFAULT_COM575 add di,IDEVARS.bSerialCOMPortChar-IDEVARS.wBasePort652 cmp bl, DEVICE_SERIAL_PORT 653 je SHORT .done ; if we were already serial, nothing to do 654 655 mov BYTE [es:di+IDEVARS.bSerialBaud-IDEVARS.wBasePort], SERIAL_DEFAULT_BAUD 656 657 mov al, SERIAL_DEFAULT_COM 658 sub di, IDEVARS.wBasePort - IDEVARS.bSerialCOMPortChar 576 659 call IdeControllerMenu_SerialWriteCOM 577 660 stosb 578 661 579 662 .done: 663 ; See if we are changing to XT-CF. If we are, store 664 ; byte for Control Register. 665 pop ax 666 pop di ; IDEVARS.bDevice 667 sub di, BYTE IDEVARS.bDevice - IDEVARS.bXTCFcontrolRegister ; IDEVARS.bXTCFcontrolRegister 668 cmp al, DEVICE_8BIT_XTCF_PIO8 >> 1 669 je SHORT .ChangingToPioModeXTCF 670 cmp al, DEVICE_8BIT_XTCF_DMA >> 1 671 je SHORT .ChangingToDmaModeXTCF 672 cmp al, DEVICE_8BIT_XTCF_MEMMAP >> 1 673 jne SHORT .NoNeedToChangeXTCFsettings 674 675 ; XT-CF Memory Mapped Mode 676 mov WORD [es:di], DEFAULT_XTCF_SECTOR_WINDOW_SEGMENT >> 8 ; Store word to clear Control Block Port high byte 677 jmp SHORT .NoNeedToChangeXTCFsettings 678 .ChangingToPioModeXTCF: 679 mov BYTE [es:di], XTCF_8BIT_PIO_MODE 680 jmp SHORT .NoNeedToChangeXTCFsettings 681 .ChangingToDmaModeXTCF: 682 mov BYTE [es:di], XTCF_DMA_MODE 683 ; Fall to .NoNeedToChangeXTCFsettings 684 685 .NoNeedToChangeXTCFsettings: 580 686 pop di 581 687 pop bx 582 pop ax583 584 688 ret 585 689 -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
r481 r483 196 196 g_szItemIdeEnIRQ: db "Enable interrupt",NULL 197 197 g_szItemIdeIRQ: db "IRQ",NULL 198 g_szItemIdeXTCFwindow: db "XT-CF Sector Window",NULL 198 199 g_szItemSerialCOM: db "COM Port",NULL 199 200 g_szItemSerialBaud: db "Baud Rate",NULL 200 201 g_szItemSerialPort: db "COM Port I/O address",NULL 201 202 202 g_szItemIdeSerialComPort: db "COM port",NULL 203 203 g_szItemIdeSerialBaudRate: db "Baud rate",NULL … … 208 208 g_szDlgIdeEnIRQ: db "Enable interrupt?",NULL 209 209 g_szDlgIdeIRQ: db "Enter IRQ channel (2...7 for 8-bit controllers, 2...15 for any other controller).",NULL 210 g_szDlgIdeXTCFwindow: db "XT-CF Sector Window segment (A000h...E800h).",NULL 210 211 211 212 g_szNfoIdeBackToCfgMenu:db "Back to XTIDE Universal BIOS Configuration Menu.",NULL … … 213 214 g_szNfoIdeSlave: db "Settings for Slave Drive.",NULL 214 215 g_szNfoIdeDevice: db "Select controller device type.",NULL 215 g_szNfoIdeCmdPort: db "IDE Controller Command Block (base port) address .",NULL216 g_szNfoIdeCmdPort: db "IDE Controller Command Block (base port) address or segment address for JR-IDE/ISA.",NULL 216 217 g_szNfoIdeCtrlPort: db "IDE Controller Control Block address. Usually Cmd Block + 8 for XTIDE, and Cmd Block + 200h for ATA.",NULL 217 218 g_szNfoIdeEnIRQ: db "Interrupt or polling mode.",NULL 218 219 g_szNfoIdeIRQ: db "IRQ channel to use.",NULL 220 g_szNfoIdeXTCFwindow: db "Segment Address for XT-CF 4 kiB Sector Access Window.",NULL 219 221 g_szNfoIdeSerialCOM: db "Select a COM port by number.",NULL 220 222 g_szNfoIdeSerialBaud: db "Select the COM port's Baud Rate. The server must match this speed."
Note:
See TracChangeset
for help on using the changeset viewer.