Changeset 33041 in vbox for trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
- Timestamp:
- Oct 11, 2010 1:12:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/BIOS/vbe.c
r33001 r33041 44 44 //#define VBE2_NO_VESA_CHECK 45 45 46 // use bytewise i/o by default (Longhorn beta issue, not in released Vista) 47 #define VBE_BYTEWISE_IO 46 // use bytewise i/o (Longhorn beta issue, not in released Vista) 47 //#define VBE_BYTEWISE_IO 48 49 #ifdef VBE_BYTEWISE_IO 50 #define in_ax_dx call do_in_ax_dx 51 #define out_dx_ax call do_out_dx_ax 52 #else 53 #define in_ax_dx in ax, dx 54 #define out_dx_ax out dx, ax 55 #endif 56 48 57 49 58 // Use VBE new dynamic mode list. Note that without this option, no … … 240 249 ;; Bytewise in/out 241 250 #ifdef VBE_BYTEWISE_IO 242 out_dx_ax:251 do_out_dx_ax: 243 252 xchg ah, al 244 253 out dx, al … … 247 256 ret 248 257 249 in_ax_dx:258 do_in_ax_dx: 250 259 in al, dx 251 260 xchg ah, al … … 260 269 mov dx, # VBE_DISPI_IOPORT_INDEX 261 270 mov ax, # VBE_DISPI_INDEX_ID 262 #ifdef VBE_BYTEWISE_IO 263 call out_dx_ax 264 #else 265 out dx, ax 266 #endif 267 mov dx, # VBE_DISPI_IOPORT_DATA 268 #ifdef VBE_BYTEWISE_IO 269 call in_ax_dx 270 #else 271 in ax, dx 272 #endif 271 out_dx_ax 272 mov dx, # VBE_DISPI_IOPORT_DATA 273 in_ax_dx 273 274 pop dx 274 275 ret … … 279 280 mov dx, # VBE_DISPI_IOPORT_INDEX 280 281 mov ax, # VBE_DISPI_INDEX_ID 281 #ifdef VBE_BYTEWISE_IO 282 call out_dx_ax 283 #else 284 out dx, ax 285 #endif 286 pop ax 287 mov dx, # VBE_DISPI_IOPORT_DATA 288 #ifdef VBE_BYTEWISE_IO 289 call out_dx_ax 290 #else 291 out dx, ax 292 #endif 282 out_dx_ax 283 pop ax 284 mov dx, # VBE_DISPI_IOPORT_DATA 285 out_dx_ax 293 286 pop dx 294 287 ret … … 306 299 mov dx, # VBE_DISPI_IOPORT_INDEX 307 300 mov ax, # VBE_DISPI_INDEX_XRES 308 #ifdef VBE_BYTEWISE_IO 309 call out_dx_ax 310 #else 311 out dx, ax 312 #endif 301 out_dx_ax 313 302 mov dx, # VBE_DISPI_IOPORT_DATA 314 303 mov ax, 4[bp] ; xres 315 #ifdef VBE_BYTEWISE_IO 316 call out_dx_ax 317 #else 318 out dx, ax 319 #endif 304 out_dx_ax 320 305 pop dx 321 306 pop ax … … 336 321 mov dx, # VBE_DISPI_IOPORT_INDEX 337 322 mov ax, # VBE_DISPI_INDEX_YRES 338 #ifdef VBE_BYTEWISE_IO 339 call out_dx_ax 340 #else 341 out dx, ax 342 #endif 323 out_dx_ax 343 324 mov dx, # VBE_DISPI_IOPORT_DATA 344 325 mov ax, 4[bp] ; yres 345 #ifdef VBE_BYTEWISE_IO 346 call out_dx_ax 347 #else 348 out dx, ax 349 #endif 326 out_dx_ax 350 327 pop dx 351 328 pop ax … … 370 347 mov dx, # VBE_DISPI_IOPORT_INDEX 371 348 mov ax, # VBE_DISPI_INDEX_BPP 372 #ifdef VBE_BYTEWISE_IO 373 call out_dx_ax 374 #else 375 out dx, ax 376 #endif 349 out_dx_ax 377 350 mov dx, # VBE_DISPI_IOPORT_DATA 378 351 mov ax, 4[bp] ; bpp 379 #ifdef VBE_BYTEWISE_IO 380 call out_dx_ax 381 #else 382 out dx, ax 383 #endif 352 out_dx_ax 384 353 pop dx 385 354 pop ax … … 398 367 mov dx, # VBE_DISPI_IOPORT_INDEX 399 368 mov ax, # VBE_DISPI_INDEX_BPP 400 #ifdef VBE_BYTEWISE_IO 401 call out_dx_ax 402 #else 403 out dx, ax 404 #endif 405 mov dx, # VBE_DISPI_IOPORT_DATA 406 #ifdef VBE_BYTEWISE_IO 407 call in_ax_dx 408 #else 409 in ax, dx 410 #endif 369 out_dx_ax 370 mov dx, # VBE_DISPI_IOPORT_DATA 371 in_ax_dx 411 372 cmp al, #4 412 373 jbe get_bpp_noinc … … 431 392 mov dx, # VBE_DISPI_IOPORT_INDEX 432 393 mov ax, # VBE_DISPI_INDEX_XRES 433 #ifdef VBE_BYTEWISE_IO 434 call out_dx_ax 435 #else 436 out dx, ax 437 #endif 438 mov dx, # VBE_DISPI_IOPORT_DATA 439 #ifdef VBE_BYTEWISE_IO 440 call in_ax_dx 441 #else 442 in ax, dx 443 #endif 394 out_dx_ax 395 mov dx, # VBE_DISPI_IOPORT_DATA 396 in_ax_dx 444 397 push ax 445 398 mov ax, bx … … 459 412 mov dx, # VBE_DISPI_IOPORT_INDEX 460 413 mov ax, # VBE_DISPI_INDEX_BPP 461 #ifdef VBE_BYTEWISE_IO 462 call out_dx_ax 463 #else 464 out dx, ax 465 #endif 466 mov dx, # VBE_DISPI_IOPORT_DATA 467 #ifdef VBE_BYTEWISE_IO 468 call in_ax_dx 469 #else 470 in ax, dx 471 #endif 414 out_dx_ax 415 mov dx, # VBE_DISPI_IOPORT_DATA 416 in_ax_dx 472 417 push ax 473 418 mov ax, bx … … 483 428 mov dx, # VBE_DISPI_IOPORT_INDEX 484 429 mov ax, # VBE_DISPI_INDEX_ENABLE 485 #ifdef VBE_BYTEWISE_IO 486 call out_dx_ax 487 #else 488 out dx, ax 489 #endif 490 pop ax 491 mov dx, # VBE_DISPI_IOPORT_DATA 492 #ifdef VBE_BYTEWISE_IO 493 call out_dx_ax 494 #else 495 out dx, ax 496 #endif 430 out_dx_ax 431 pop ax 432 mov dx, # VBE_DISPI_IOPORT_DATA 433 out_dx_ax 497 434 pop dx 498 435 ret … … 502 439 mov dx, # VBE_DISPI_IOPORT_INDEX 503 440 mov ax, # VBE_DISPI_INDEX_ENABLE 504 #ifdef VBE_BYTEWISE_IO 505 call out_dx_ax 506 #else 507 out dx, ax 508 #endif 509 mov dx, # VBE_DISPI_IOPORT_DATA 510 #ifdef VBE_BYTEWISE_IO 511 call in_ax_dx 512 #else 513 in ax, dx 514 #endif 441 out_dx_ax 442 mov dx, # VBE_DISPI_IOPORT_DATA 443 in_ax_dx 515 444 pop dx 516 445 ret … … 521 450 mov dx, # VBE_DISPI_IOPORT_INDEX 522 451 mov ax, # VBE_DISPI_INDEX_BANK 523 #ifdef VBE_BYTEWISE_IO 524 call out_dx_ax 525 #else 526 out dx, ax 527 #endif 528 pop ax 529 mov dx, # VBE_DISPI_IOPORT_DATA 530 #ifdef VBE_BYTEWISE_IO 531 call out_dx_ax 532 #else 533 out dx, ax 534 #endif 452 out_dx_ax 453 pop ax 454 mov dx, # VBE_DISPI_IOPORT_DATA 455 out_dx_ax 535 456 pop dx 536 457 ret … … 540 461 mov dx, # VBE_DISPI_IOPORT_INDEX 541 462 mov ax, # VBE_DISPI_INDEX_BANK 542 #ifdef VBE_BYTEWISE_IO 543 call out_dx_ax 544 #else 545 out dx, ax 546 #endif 547 mov dx, # VBE_DISPI_IOPORT_DATA 548 #ifdef VBE_BYTEWISE_IO 549 call in_ax_dx 550 #else 551 in ax, dx 552 #endif 463 out_dx_ax 464 mov dx, # VBE_DISPI_IOPORT_DATA 465 in_ax_dx 553 466 pop dx 554 467 ret … … 567 480 mov ax,# VBE_DISPI_INDEX_BANK 568 481 mov dx,# VBE_DISPI_IOPORT_INDEX 569 #ifdef VBE_BYTEWISE_IO 570 call out_dx_ax 571 #else 572 out dx,ax 573 #endif 482 out_dx_ax 574 483 pop ax 575 484 mov dx,# VBE_DISPI_IOPORT_DATA 576 #ifdef VBE_BYTEWISE_IO 577 call out_dx_ax 578 #else 579 out dx,ax 580 #endif 581 #ifdef VBE_BYTEWISE_IO 582 call in_ax_dx 583 #else 584 in ax,dx 585 #endif 485 out_dx_ax 486 in_ax_dx 586 487 pop dx 587 488 cmp dx,ax … … 592 493 mov ax,# VBE_DISPI_INDEX_BANK 593 494 mov dx,# VBE_DISPI_IOPORT_INDEX 594 #ifdef VBE_BYTEWISE_IO 595 call out_dx_ax 596 #else 597 out dx,ax 598 #endif 495 out_dx_ax 599 496 mov dx,# VBE_DISPI_IOPORT_DATA 600 #ifdef VBE_BYTEWISE_IO 601 call in_ax_dx 602 #else 603 in ax,dx 604 #endif 497 in_ax_dx 605 498 mov dx,ax 606 499 retf … … 617 510 mov dx, # VBE_DISPI_IOPORT_INDEX 618 511 mov ax, # VBE_DISPI_INDEX_X_OFFSET 619 #ifdef VBE_BYTEWISE_IO 620 call out_dx_ax 621 #else 622 out dx, ax 623 #endif 624 pop ax 625 mov dx, # VBE_DISPI_IOPORT_DATA 626 #ifdef VBE_BYTEWISE_IO 627 call out_dx_ax 628 #else 629 out dx, ax 630 #endif 512 out_dx_ax 513 pop ax 514 mov dx, # VBE_DISPI_IOPORT_DATA 515 out_dx_ax 631 516 pop dx 632 517 ret … … 636 521 mov dx, # VBE_DISPI_IOPORT_INDEX 637 522 mov ax, # VBE_DISPI_INDEX_X_OFFSET 638 #ifdef VBE_BYTEWISE_IO 639 call out_dx_ax 640 #else 641 out dx, ax 642 #endif 643 mov dx, # VBE_DISPI_IOPORT_DATA 644 #ifdef VBE_BYTEWISE_IO 645 call in_ax_dx 646 #else 647 in ax, dx 648 #endif 523 out_dx_ax 524 mov dx, # VBE_DISPI_IOPORT_DATA 525 in_ax_dx 649 526 pop dx 650 527 ret … … 655 532 mov dx, # VBE_DISPI_IOPORT_INDEX 656 533 mov ax, # VBE_DISPI_INDEX_Y_OFFSET 657 #ifdef VBE_BYTEWISE_IO 658 call out_dx_ax 659 #else 660 out dx, ax 661 #endif 662 pop ax 663 mov dx, # VBE_DISPI_IOPORT_DATA 664 #ifdef VBE_BYTEWISE_IO 665 call out_dx_ax 666 #else 667 out dx, ax 668 #endif 534 out_dx_ax 535 pop ax 536 mov dx, # VBE_DISPI_IOPORT_DATA 537 out_dx_ax 669 538 pop dx 670 539 ret … … 674 543 mov dx, # VBE_DISPI_IOPORT_INDEX 675 544 mov ax, # VBE_DISPI_INDEX_Y_OFFSET 676 #ifdef VBE_BYTEWISE_IO 677 call out_dx_ax 678 #else 679 out dx, ax 680 #endif 681 mov dx, # VBE_DISPI_IOPORT_DATA 682 #ifdef VBE_BYTEWISE_IO 683 call in_ax_dx 684 #else 685 in ax, dx 686 #endif 545 out_dx_ax 546 mov dx, # VBE_DISPI_IOPORT_DATA 547 in_ax_dx 687 548 pop dx 688 549 ret … … 702 563 mov ah, bl 703 564 mov al, #0x13 704 #ifdef VBE_BYTEWISE_IO705 call out_dx_ax706 #else707 565 out dx, ax 708 #endif709 566 pop dx 710 567 pop bx … … 718 575 mov dx, # VBE_DISPI_IOPORT_INDEX 719 576 mov ax, # VBE_DISPI_INDEX_VIRT_WIDTH 720 #ifdef VBE_BYTEWISE_IO 721 call out_dx_ax 722 #else 723 out dx, ax 724 #endif 725 pop ax 726 mov dx, # VBE_DISPI_IOPORT_DATA 727 #ifdef VBE_BYTEWISE_IO 728 call out_dx_ax 729 #else 730 out dx, ax 731 #endif 577 out_dx_ax 578 pop ax 579 mov dx, # VBE_DISPI_IOPORT_DATA 580 out_dx_ax 732 581 pop dx 733 582 ret … … 737 586 mov dx, # VBE_DISPI_IOPORT_INDEX 738 587 mov ax, # VBE_DISPI_INDEX_VIRT_WIDTH 739 #ifdef VBE_BYTEWISE_IO 740 call out_dx_ax 741 #else 742 out dx, ax 743 #endif 744 mov dx, # VBE_DISPI_IOPORT_DATA 745 #ifdef VBE_BYTEWISE_IO 746 call in_ax_dx 747 #else 748 in ax, dx 749 #endif 588 out_dx_ax 589 mov dx, # VBE_DISPI_IOPORT_DATA 590 in_ax_dx 750 591 pop dx 751 592 ret … … 755 596 mov dx, # VBE_DISPI_IOPORT_INDEX 756 597 mov ax, # VBE_DISPI_INDEX_VIRT_HEIGHT 757 #ifdef VBE_BYTEWISE_IO 758 call out_dx_ax 759 #else 760 out dx, ax 761 #endif 762 mov dx, # VBE_DISPI_IOPORT_DATA 763 #ifdef VBE_BYTEWISE_IO 764 call in_ax_dx 765 #else 766 in ax, dx 767 #endif 598 out_dx_ax 599 mov dx, # VBE_DISPI_IOPORT_DATA 600 in_ax_dx 768 601 pop dx 769 602 ret … … 776 609 mov dx, # VBE_DISPI_IOPORT_INDEX 777 610 mov ax, # VBE_DISPI_INDEX_XRES 778 #ifdef VBE_BYTEWISE_IO 779 call out_dx_ax 780 #else 781 out dx, ax 782 #endif 783 mov dx, # VBE_DISPI_IOPORT_DATA 784 #ifdef VBE_BYTEWISE_IO 785 call in_ax_dx 786 #else 787 in ax, dx 788 #endif 611 out_dx_ax 612 mov dx, # VBE_DISPI_IOPORT_DATA 613 in_ax_dx 789 614 push ax 790 615 mov dx, # VGAREG_VGA_CRTC_ADDRESS 791 616 mov ax, #0x0011 792 #ifdef VBE_BYTEWISE_IO793 call out_dx_ax794 #else795 617 out dx, ax 796 #endif797 618 pop ax 798 619 push ax … … 801 622 mov ah, al 802 623 mov al, #0x01 803 #ifdef VBE_BYTEWISE_IO804 call out_dx_ax805 #else806 624 out dx, ax 807 #endif808 625 pop ax 809 626 call vga_set_virt_width … … 812 629 mov dx, # VBE_DISPI_IOPORT_INDEX 813 630 mov ax, # VBE_DISPI_INDEX_YRES 814 #ifdef VBE_BYTEWISE_IO 815 call out_dx_ax 816 #else 817 out dx, ax 818 #endif 819 mov dx, # VBE_DISPI_IOPORT_DATA 820 #ifdef VBE_BYTEWISE_IO 821 call in_ax_dx 822 #else 823 in ax, dx 824 #endif 631 out_dx_ax 632 mov dx, # VBE_DISPI_IOPORT_DATA 633 in_ax_dx 825 634 dec ax 826 635 push ax … … 828 637 mov ah, al 829 638 mov al, #0x12 830 #ifdef VBE_BYTEWISE_IO831 call out_dx_ax832 #else833 639 out dx, ax 834 #endif835 640 pop ax 836 641 mov al, #0x07 … … 852 657 mov dx, # VGAREG_VGA_CRTC_ADDRESS 853 658 mov ax, #0x0009 854 #ifdef VBE_BYTEWISE_IO855 call out_dx_ax856 #else857 659 out dx, ax 858 #endif859 660 mov al, #0x17 860 661 out dx, al … … 877 678 mov dx, # VGAREG_GRDC_ADDRESS 878 679 mov ax, #0x0506 879 #ifdef VBE_BYTEWISE_IO880 call out_dx_ax881 #else882 680 out dx, ax 883 #endif884 681 mov dx, # VGAREG_SEQU_ADDRESS 885 682 mov ax, #0x0f02 886 #ifdef VBE_BYTEWISE_IO887 call out_dx_ax888 #else889 683 out dx, ax 890 #endif891 684 892 685 ; settings for >= 8bpp 893 686 mov dx, # VBE_DISPI_IOPORT_INDEX 894 687 mov ax, # VBE_DISPI_INDEX_BPP 895 #ifdef VBE_BYTEWISE_IO 896 call out_dx_ax 897 #else 898 out dx, ax 899 #endif 900 mov dx, # VBE_DISPI_IOPORT_DATA 901 #ifdef VBE_BYTEWISE_IO 902 call in_ax_dx 903 #else 904 in ax, dx 905 #endif 688 out_dx_ax 689 mov dx, # VBE_DISPI_IOPORT_DATA 690 in_ax_dx 906 691 cmp al, #0x08 907 692 jb vga_compat_end
Note:
See TracChangeset
for help on using the changeset viewer.