src/mess/video/pc_vga.c
| r1286 | r1287 | |
| 64 | 64 | ***************************************************************************/ |
| 65 | 65 | |
| 66 | 66 | /* grabbed from dac inited by et4000 bios */ |
| 67 | | static unsigned char ega_palette[] = |
| 67 | static const unsigned char ega_palette[] = |
| 68 | 68 | { |
| 69 | 69 | 0x00, 0x00, 0x00, |
| 70 | 70 | 0x00, 0x00, 0xa8, |
| r1286 | r1287 | |
| 132 | 132 | 0xfc, 0xfc, 0xfc |
| 133 | 133 | }; |
| 134 | 134 | |
| 135 | | static unsigned short vga_colortable[] = |
| 135 | static const unsigned short vga_colortable[] = |
| 136 | 136 | { |
| 137 | 137 | 0, 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0,10, 0,11, 0,12, 0,13, 0,14, 0,15, |
| 138 | 138 | 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1,10, 1,11, 1,12, 1,13, 1,14, 1,15, |
| r1286 | r1287 | |
| 428 | 428 | |color_bitplane_to_packed[3][number][latch[3]]; |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | | static READ8_HANDLER(vga_ega_r) |
| 431 | static READ8_HANDLER(vga_ega_r) |
| 432 | 432 | { |
| 433 | 433 | int data; |
| 434 | 434 | vga.gc.latch[0]=vga.memory[(offset<<2)]; |
| r1286 | r1287 | |
| 526 | 526 | vga_dirty_font_w(((offset&~3)<<2)|(offset&3),data); |
| 527 | 527 | } |
| 528 | 528 | |
| 529 | static READ64_HANDLER( vga_text64_r ) { return read64be_with_read8_handler(vga_text_r, offset, mem_mask); } |
| 530 | static READ64_HANDLER( vga_vga64_r ) { return read64be_with_read8_handler(vga_vga_r, offset, mem_mask); } |
| 531 | static WRITE64_HANDLER( vga_text64_w ) { write64be_with_write8_handler(vga_text_w, offset, data, mem_mask); } |
| 532 | static WRITE64_HANDLER( vga_vga64_w ) { write64be_with_write8_handler(vga_vga_w, offset, data, mem_mask); } |
| 533 | |
| 529 | 534 | static void vga_cpu_interface(void) |
| 530 | 535 | { |
| 531 | 536 | static int sequencer, gc; |
| 532 | 537 | read8_handler read_handler; |
| 533 | 538 | write8_handler write_handler; |
| 539 | read64_handler read_handler64; |
| 540 | write64_handler write_handler64; |
| 534 | 541 | UINT8 sel; |
| 535 | 542 | int buswidth; |
| 536 | 543 | |
| r1286 | r1287 | |
| 543 | 550 | { |
| 544 | 551 | read_handler = vga_vga_r; |
| 545 | 552 | write_handler = vga_vga_w; |
| 553 | read_handler64 = vga_vga64_r; |
| 554 | write_handler64 = vga_vga64_w; |
| 546 | 555 | } |
| 547 | 556 | else if (vga.sequencer.data[4] & 4) |
| 548 | 557 | { |
| 549 | 558 | read_handler = vga_ega_r; |
| 550 | 559 | write_handler = vga_ega_w; |
| 560 | read_handler64 = NULL; /* FIXME */ |
| 561 | write_handler64 = NULL; /* FIXME */ |
| 551 | 562 | } |
| 552 | 563 | else |
| 553 | 564 | { |
| 554 | 565 | read_handler = vga_text_r; |
| 555 | 566 | write_handler = vga_text_w; |
| 567 | read_handler64 = vga_text64_r; |
| 568 | write_handler64 = vga_text64_w; |
| 556 | 569 | } |
| 557 | 570 | |
| 558 | 571 | /* remap the VGA memory */ |
| r1286 | r1287 | |
| 612 | 625 | } |
| 613 | 626 | break; |
| 614 | 627 | |
| 628 | case 64: |
| 629 | sel = vga.gc.data[6] & 0x0c; |
| 630 | if (sel) |
| 631 | { |
| 632 | memory_install_read64_handler(0, ADDRESS_SPACE_PROGRAM, 0xa0000, 0xaffff, 0, 0, (sel == 0x04) ? read_handler64 : MRA64_NOP); |
| 633 | memory_install_read64_handler(0, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb7fff, 0, 0, (sel == 0x08) ? read_handler64 : MRA64_NOP); |
| 634 | memory_install_read64_handler(0, ADDRESS_SPACE_PROGRAM, 0xb8000, 0xbffff, 0, 0, (sel == 0x0C) ? read_handler64 : MRA64_NOP); |
| 635 | memory_install_write64_handler(0, ADDRESS_SPACE_PROGRAM, 0xa0000, 0xaffff, 0, 0, (sel == 0x04) ? write_handler64 : MWA64_NOP); |
| 636 | memory_install_write64_handler(0, ADDRESS_SPACE_PROGRAM, 0xb0000, 0xb7fff, 0, 0, (sel == 0x08) ? write_handler64 : MWA64_NOP); |
| 637 | memory_install_write64_handler(0, ADDRESS_SPACE_PROGRAM, 0xb8000, 0xbffff, 0, 0, (sel == 0x0C) ? write_handler64 : MWA64_NOP); |
| 638 | } |
| 639 | else |
| 640 | { |
| 641 | memory_set_bankptr(1, vga.memory); |
| 642 | memory_install_read64_handler(0, ADDRESS_SPACE_PROGRAM, 0xa0000, 0xbffff, 0, 0, MRA64_BANK1 ); |
| 643 | memory_install_write64_handler(0, ADDRESS_SPACE_PROGRAM, 0xa0000, 0xbffff, 0, 0, MWA64_BANK1 ); |
| 644 | } |
| 645 | break; |
| 646 | |
| 615 | 647 | default: |
| 616 | 648 | fatalerror("VGA: Bus width %d not supported\n", buswidth); |
| 617 | 649 | break; |
docs/messnew.txt
| r1286 | r1287 | |
| 15 | 15 | ---------------------- |
| 16 | 16 | - [ADAM] Input ports cleanup, natural keyboard support. [Stefano Priore] |
| 17 | 17 | |
| 18 | - [ATARIST] Implemented iKBD<->68000 communications, so the keyboard is working |
| 19 | now. [Curt Coder] |
| 20 | |
| 21 | - [BEBOX] Fixed VGA regression introduced in 0.119. [Tomas Karlsson] |
| 22 | |
| 18 | 23 | - [COCO] Updated to use MAME's 6242 RTC implementation. [tim lindner] |
| 19 | 24 | |
| 20 | 25 | - [COCO] Modified the CoCo's keyboard handler to pass along the tri-state |
| r1286 | r1287 | |
| 29 | 34 | - [GAMEGEAR/SMS] The internal video data buffer should hold the data written |
| 30 | 35 | to the data port. (bug #1378 and bug #1418) [Wilbert Pol] |
| 31 | 36 | |
| 37 | - [MEPHISTO] Implemented artwork/code for real chess board usage. [Ralf |
| 38 | Schäfer, Cowering] |
| 39 | |
| 32 | 40 | - [ORIC] Fixed floppy interface detection. [Dirk Best] |
| 33 | 41 | |
| 34 | 42 | - [PET] Updated to use MAME's CRTC6548 implementation. [Wilbert Pol] |
| 35 | 43 | |
| 36 | | - [PET] Fixed keyboard regression introduced in 0.116. (bug #1405) [Wilbert Pol] |
| 44 | - [PET] Fixed keyboard regression introduced in 0.116. (bug #1405) [Wilbert |
| 45 | Pol] |
| 37 | 46 | |
| 47 | - [QL] Added revision 0.7 of the IPC ROM. [MikeB] |
| 48 | |
| 38 | 49 | - [SYM1] Rewrote, still many issues and doesn't fully work. [Dirk Best] |
| 39 | 50 | |
| 40 | 51 | - [X68000] Raster effects, DMA and vblank improvements. [Barry Rodewald] |
| 41 | 52 | |
| 42 | | - [ATARIST] Implemented iKBD<->68000 communications, so the keyboard is working now. [Curt Coder] |
| 43 | 53 | |
| 44 | | - [MEPHISTO] Implemented artwork/code for real chess board usage. [Ralf Schäfer, Cowering] |
| 45 | 54 | |
| 46 | | - [QL] Added revision 0.7 of the IPC ROM. [MikeB] |
| 47 | | |
| 48 | | |
| 49 | | |
| 50 | 55 | User Interface Changes: |
| 51 | 56 | ----------------------- |
| 52 | 57 | (none) |