src/mess/machine/at.c
| r6659 | r6660 | |
| 654 | 654 | |
| 655 | 655 | static const struct pc_vga_interface vga_interface = |
| 656 | 656 | { |
| 657 | | 1, |
| 658 | | NULL, //at_map_vga_memory, |
| 657 | NULL, |
| 658 | NULL, |
| 659 | 659 | |
| 660 | 660 | input_port_0_r, |
| 661 | 661 | |
| r6659 | r6660 | |
| 725 | 725 | intel82439tx_init(machine); |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | | |
| 729 | | #ifdef UNUSED_FUNCTION |
| 730 | | static void at_map_vga_memory(running_machine *machine, offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh) |
| 731 | | { |
| 732 | | int buswidth; |
| 733 | | const address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 734 | | buswidth = cpu_get_databus_width(cputag_get_cpu(machine, "maincpu"), ADDRESS_SPACE_PROGRAM); |
| 735 | | switch(buswidth) |
| 736 | | { |
| 737 | | case 8: |
| 738 | | memory_install_read8_handler(space, 0xA0000, 0xBFFFF, 0, 0, SMH_NOP); |
| 739 | | memory_install_write8_handler(space, 0xA0000, 0xBFFFF, 0, 0, SMH_NOP); |
| 740 | | |
| 741 | | memory_install_read8_handler(space, begin, end, 0, 0, rh); |
| 742 | | memory_install_write8_handler(space, begin, end, 0, 0, wh); |
| 743 | | break; |
| 744 | | } |
| 745 | | } |
| 746 | | #endif |
| 747 | | |
| 748 | | |
| 749 | | |
| 750 | | |
| 751 | 728 | DRIVER_INIT( at_vga ) |
| 752 | 729 | { |
| 753 | 730 | static const struct kbdc8042_interface at8042 = |
src/mess/machine/bebox.c
| r6659 | r6660 | |
| 553 | 553 | * |
| 554 | 554 | *************************************/ |
| 555 | 555 | |
| 556 | | static read8_space_func bebox_vga_memory_rh; |
| 557 | | static write8_space_func bebox_vga_memory_wh; |
| 558 | | |
| 559 | 556 | static READ64_HANDLER( bebox_video_r ) |
| 560 | 557 | { |
| 561 | 558 | const UINT64 *mem = (const UINT64 *) pc_vga_memory(); |
| r6659 | r6660 | |
| 572 | 569 | } |
| 573 | 570 | |
| 574 | 571 | |
| 575 | | static READ64_HANDLER( bebox_vga_memory_r ) |
| 576 | | { |
| 577 | | return read64be_with_read8_handler(bebox_vga_memory_rh, space, offset, mem_mask); |
| 578 | | } |
| 579 | | |
| 580 | | |
| 581 | | static WRITE64_HANDLER( bebox_vga_memory_w ) |
| 582 | | { |
| 583 | | write64be_with_write8_handler(bebox_vga_memory_wh, space, offset, data, mem_mask); |
| 584 | | } |
| 585 | | |
| 586 | | |
| 587 | 572 | static void bebox_map_vga_memory(running_machine *machine, offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh) |
| 588 | 573 | { |
| 589 | 574 | const address_space *space = cputag_get_address_space(machine, "ppc1", ADDRESS_SPACE_PROGRAM); |
| 590 | 575 | |
| 591 | | read64_space_func rh64 = (rh == SMH_BANK(4)) ? SMH_BANK(4) : bebox_vga_memory_r; |
| 592 | | write64_space_func wh64 = (wh == SMH_BANK(4)) ? SMH_BANK(4) : bebox_vga_memory_w; |
| 576 | memory_nop_readwrite(space, 0xC00A0000, 0xC00BFFFF, 0, 0); |
| 593 | 577 | |
| 594 | | bebox_vga_memory_rh = rh; |
| 595 | | bebox_vga_memory_wh = wh; |
| 596 | | |
| 597 | | memory_install_read64_handler(space, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 598 | | memory_install_write64_handler(space, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 599 | | |
| 600 | | memory_install_read64_handler(space, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, rh64); |
| 601 | | memory_install_write64_handler(space, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, wh64); |
| 578 | memory_install_readwrite_bank(space, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, "bank4"); |
| 602 | 579 | } |
| 603 | 580 | |
| 604 | 581 | |
| 605 | 582 | static const struct pc_vga_interface bebox_vga_interface = |
| 606 | 583 | { |
| 607 | | 4, |
| 584 | "bank4", |
| 608 | 585 | bebox_map_vga_memory, |
| 609 | 586 | |
| 610 | 587 | NULL, |
| r6659 | r6660 | |
| 1118 | 1095 | mpc105_init(machine, 0); |
| 1119 | 1096 | |
| 1120 | 1097 | /* set up boot and flash ROM */ |
| 1121 | | memory_set_bankptr(machine, 2, memory_region(machine, "user2")); |
| 1098 | memory_set_bankptr(machine, "bank2", memory_region(machine, "user2")); |
| 1122 | 1099 | intelflash_init(machine, 0, FLASH_FUJITSU_29F016A, memory_region(machine, "user1")); |
| 1123 | 1100 | |
| 1124 | 1101 | /* install MESS managed RAM */ |
| 1125 | | memory_install_read64_handler(space_0, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, SMH_BANK(3)); |
| 1126 | | memory_install_write64_handler(space_0, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, SMH_BANK(3)); |
| 1127 | | memory_install_read64_handler(space_1, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, SMH_BANK(3)); |
| 1128 | | memory_install_write64_handler(space_1, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, SMH_BANK(3)); |
| 1129 | | memory_set_bankptr(machine, 3, messram_get_ptr(devtag_get_device(machine, "messram"))); |
| 1102 | memory_install_readwrite_bank(space_0, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, "bank3"); |
| 1103 | memory_install_readwrite_bank(space_1, 0, messram_get_size(devtag_get_device(machine, "messram")) - 1, 0, 0x02000000, "bank3"); |
| 1104 | memory_set_bankptr(machine, "bank3", messram_get_ptr(devtag_get_device(machine, "messram"))); |
| 1130 | 1105 | |
| 1131 | 1106 | mc146818_init(machine, MC146818_STANDARD); |
| 1132 | 1107 | pc_vga_init(machine, &bebox_vga_interface, &cirrus_svga_interface); |
| r6659 | r6660 | |
| 1135 | 1110 | /* install VGA memory */ |
| 1136 | 1111 | vram_begin = 0xC1000000; |
| 1137 | 1112 | vram_end = vram_begin + pc_vga_memory_size() - 1; |
| 1138 | | memory_install_read64_handler(space_0, vram_begin, vram_end, 0, 0, bebox_video_r); |
| 1139 | | memory_install_write64_handler(space_0, vram_begin, vram_end, 0, 0, bebox_video_w); |
| 1140 | | memory_install_read64_handler(space_1, vram_begin, vram_end, 0, 0, bebox_video_r); |
| 1141 | | memory_install_write64_handler(space_1, vram_begin, vram_end, 0, 0, bebox_video_w); |
| 1113 | memory_install_readwrite64_handler(space_0, vram_begin, vram_end, 0, 0, bebox_video_r, bebox_video_w); |
| 1114 | memory_install_readwrite64_handler(space_1, vram_begin, vram_end, 0, 0, bebox_video_r, bebox_video_w); |
| 1142 | 1115 | |
| 1143 | 1116 | /* The following is a verrrry ugly hack put in to support NetBSD for |
| 1144 | 1117 | * NetBSD. When NetBSD/bebox it does most of its work on CPU #0 and then |
| r6659 | r6660 | |
| 1158 | 1131 | /* bcctr 0x14, 0 */ |
| 1159 | 1132 | U64(0x4E80042000000000) |
| 1160 | 1133 | }; |
| 1161 | | memory_install_read64_handler(space_1, 0x9421FFF0, 0x9421FFFF, 0, 0, SMH_BANK(1)); |
| 1162 | | memory_set_bankptr(machine, 1, ops); |
| 1134 | memory_install_read_bank(space_1, 0x9421FFF0, 0x9421FFFF, 0, 0, "bank1"); |
| 1135 | memory_set_bankptr(machine, "bank1", ops); |
| 1163 | 1136 | } |
| 1164 | 1137 | } |
src/mess/machine/pc.c
| r6659 | r6660 | |
| 1294 | 1294 | mess_init_pc_common(machine, PCCOMMON_KEYBOARD_PC, pcjr_set_keyb_int, pc_set_irq_line); |
| 1295 | 1295 | } |
| 1296 | 1296 | |
| 1297 | | |
| 1298 | | #ifdef UNUSED_FUNCTION |
| 1299 | | static void pc_map_vga_memory(running_machine *machine, offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh) |
| 1300 | | { |
| 1301 | | const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM ); |
| 1302 | | int buswidth; |
| 1303 | | buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM); |
| 1304 | | switch(buswidth) |
| 1305 | | { |
| 1306 | | case 8: |
| 1307 | | memory_install_read8_handler(space, 0xA0000, 0xBFFFF, 0, 0, SMH_NOP); |
| 1308 | | memory_install_write8_handler(space, 0xA0000, 0xBFFFF, 0, 0, SMH_NOP); |
| 1309 | | |
| 1310 | | memory_install_read8_handler(space, begin, end, 0, 0, rh); |
| 1311 | | memory_install_write8_handler(space, begin, end, 0, 0, wh); |
| 1312 | | break; |
| 1313 | | |
| 1314 | | default: |
| 1315 | | fatalerror("VGA: Bus width %d not supported\n", buswidth); |
| 1316 | | break; |
| 1317 | | } |
| 1318 | | } |
| 1319 | | #endif |
| 1320 | | |
| 1321 | 1297 | static READ8_HANDLER( input_port_0_r ) { return input_port_read(space->machine, "IN0"); } |
| 1322 | 1298 | |
| 1323 | 1299 | static const struct pc_vga_interface vga_interface = |
| 1324 | 1300 | { |
| 1325 | | 1, |
| 1326 | 1301 | NULL, |
| 1302 | NULL, |
| 1327 | 1303 | |
| 1328 | 1304 | input_port_0_r, |
| 1329 | 1305 | |