src/mess/video/pc_t1t.c
| r2552 | r2553 | |
| 693 | 693 | pc_t1t_mode_switch(); |
| 694 | 694 | } |
| 695 | 695 | |
| 696 | |
| 697 | static void pc_pcjr_bank_w(int data) |
| 698 | { |
| 699 | if (pcjr.bank != data) |
| 700 | { |
| 701 | int dram, vram; |
| 702 | pcjr.bank = data; |
| 703 | /* it seems the video ram is mapped to the last 128K of main memory */ |
| 704 | #if 1 |
| 705 | if ((data&0xc0)==0xc0) /* needed for lemmings */ |
| 706 | { |
| 707 | dram = 0x80000 + ((data & 0x06) << 14); |
| 708 | vram = 0x80000 + ((data & 0x30) << (14-3)); |
| 709 | } |
| 710 | else |
| 711 | { |
| 712 | dram = 0x80000 + ((data & 0x07) << 14); |
| 713 | vram = 0x80000 + ((data & 0x38) << (14-3)); |
| 714 | } |
| 715 | #else |
| 716 | dram = (data & 0x07) << 14; |
| 717 | vram = (data & 0x38) << (14-3); |
| 718 | #endif |
| 719 | videoram = &memory_region(REGION_CPU1)[vram]; |
| 720 | pcjr.displayram = &memory_region(REGION_CPU1)[dram]; |
| 721 | } |
| 722 | pc_pcjr_mode_switch(); |
| 723 | } |
| 724 | |
| 725 | |
| 696 | 726 | static int pc_t1t_bank_r(void) |
| 697 | 727 | { |
| 698 | 728 | return pcjr.bank; |
| r2552 | r2553 | |
| 776 | 806 | case 12: |
| 777 | 807 | break; |
| 778 | 808 | case 15: |
| 779 | | pc_t1t_bank_w(data); |
| 809 | pc_pcjr_bank_w(data); |
| 780 | 810 | break; |
| 781 | 811 | |
| 782 | 812 | default: |