src/mess/machine/bebox.c
| r3667 | r3668 | |
| 167 | 167 | if (LOG_CPUIMASK) |
| 168 | 168 | { |
| 169 | 169 | logerror("BeBox CPU #0 pc=0x%08X imask=0x%08x\n", |
| 170 | | (unsigned) activecpu_get_reg(REG_PC), bebox_cpu_imask[0]); |
| 170 | (unsigned) cpu_get_pc( space->cpu), bebox_cpu_imask[0]); |
| 171 | 171 | } |
| 172 | | bebox_update_interrupts(machine); |
| 172 | bebox_update_interrupts(space->machine); |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| r3667 | r3668 | |
| 184 | 184 | if (LOG_CPUIMASK) |
| 185 | 185 | { |
| 186 | 186 | logerror("BeBox CPU #1 pc=0x%08X imask=0x%08x\n", |
| 187 | | (unsigned) activecpu_get_reg(REG_PC), bebox_cpu_imask[1]); |
| 187 | (unsigned) cpu_get_pc( space->cpu ), bebox_cpu_imask[1]); |
| 188 | 188 | } |
| 189 | | bebox_update_interrupts(machine); |
| 189 | bebox_update_interrupts(space->machine); |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| r3667 | r3668 | |
| 194 | 194 | { |
| 195 | 195 | UINT32 result; |
| 196 | 196 | result = bebox_crossproc_interrupts; |
| 197 | | if (cpu_getactivecpu()) |
| 197 | /* TODO: This test needs to be really fixed */ |
| 198 | if ( space->machine->activecpu != space->machine->cpu[0] ) |
| 198 | 199 | result |= 0x02000000; |
| 199 | 200 | else |
| 200 | 201 | result &= ~0x02000000; |
| r3667 | r3668 | |
| 239 | 240 | */ |
| 240 | 241 | } |
| 241 | 242 | |
| 242 | | cpunum_set_input_line(machine, crossproc_map[i].cpunum, crossproc_map[i].inputline, line); |
| 243 | cpu_set_input_line(space->machine->cpu[crossproc_map[i].cpunum], crossproc_map[i].inputline, line); |
| 243 | 244 | } |
| 244 | 245 | } |
| 245 | 246 | } |
| r3667 | r3668 | |
| 250 | 251 | |
| 251 | 252 | if (b & 0x20) |
| 252 | 253 | { |
| 253 | | cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, (b & 0x80) ? CLEAR_LINE : ASSERT_LINE); |
| 254 | cpu_set_input_line( space->machine->cpu[1], INPUT_LINE_RESET, (b & 0x80) ? CLEAR_LINE : ASSERT_LINE); |
| 254 | 255 | } |
| 255 | 256 | } |
| 256 | 257 | |
| r3667 | r3668 | |
| 270 | 271 | bebox_interrupts, bebox_cpu_imask[cpunum], interrupt ? "on" : "off"); |
| 271 | 272 | } |
| 272 | 273 | |
| 273 | | cpunum_set_input_line(machine, cpunum, INPUT_LINE_IRQ0, interrupt ? ASSERT_LINE : CLEAR_LINE); |
| 274 | cpu_set_input_line(machine->cpu[cpunum], INPUT_LINE_IRQ0, interrupt ? ASSERT_LINE : CLEAR_LINE); |
| 274 | 275 | } |
| 275 | 276 | } |
| 276 | 277 | |
| r3667 | r3668 | |
| 320 | 321 | assert_always((interrupt_bit < ARRAY_LENGTH(interrupt_names)) && (interrupt_names[interrupt_bit] != NULL), "Raising invalid interrupt"); |
| 321 | 322 | |
| 322 | 323 | logerror("bebox_set_irq_bit(): pc[0]=0x%08x pc[1]=0x%08x %s interrupt #%u (%s)\n", |
| 323 | | (unsigned) cpunum_get_reg(0, REG_PC), |
| 324 | | (unsigned) cpunum_get_reg(1, REG_PC), |
| 324 | (unsigned) cpu_get_reg( machine->cpu[0], REG_PC), |
| 325 | (unsigned) cpu_get_reg( machine->cpu[1], REG_PC), |
| 325 | 326 | val ? "Asserting" : "Clearing", |
| 326 | 327 | interrupt_bit, interrupt_names[interrupt_bit]); |
| 327 | 328 | } |
| r3667 | r3668 | |
| 446 | 447 | result = pic8259_acknowledge( bebox_devices.pic8259_master ); |
| 447 | 448 | if (result == 2) |
| 448 | 449 | result = pic8259_acknowledge( bebox_devices.pic8259_slave ); |
| 449 | | bebox_set_irq_bit(machine, 5, 0); /* HACK */ |
| 450 | bebox_set_irq_bit(space->machine, 5, 0); /* HACK */ |
| 450 | 451 | return ((UINT64) result) << 56; |
| 451 | 452 | } |
| 452 | 453 | |
| r3667 | r3668 | |
| 493 | 494 | "ide_controller"); |
| 494 | 495 | } |
| 495 | 496 | |
| 496 | | static READ8_HANDLER( bebox_800001F0_8_r ) { return ide_controller_r(ide_device(machine), offset + 0x1F0); } |
| 497 | | static WRITE8_HANDLER( bebox_800001F0_8_w ) { ide_controller_w(ide_device(machine), offset + 0x1F0, data); } |
| 497 | static READ8_HANDLER( bebox_800001F0_8_r ) { return ide_controller_r(ide_device(space->machine), offset + 0x1F0); } |
| 498 | static WRITE8_HANDLER( bebox_800001F0_8_w ) { ide_controller_w(ide_device(space->machine), offset + 0x1F0, data); } |
| 498 | 499 | |
| 499 | | READ64_HANDLER( bebox_800001F0_r ) { return read64be_with_read8_handler(bebox_800001F0_8_r, machine, offset, mem_mask); } |
| 500 | | WRITE64_HANDLER( bebox_800001F0_w ) { write64be_with_write8_handler(bebox_800001F0_8_w, machine, offset, data, mem_mask); } |
| 500 | READ64_HANDLER( bebox_800001F0_r ) { return read64be_with_read8_handler(bebox_800001F0_8_r, space, offset, mem_mask); } |
| 501 | WRITE64_HANDLER( bebox_800001F0_w ) { write64be_with_write8_handler(bebox_800001F0_8_w, space, offset, data, mem_mask); } |
| 501 | 502 | |
| 502 | 503 | |
| 503 | 504 | READ64_HANDLER( bebox_800003F0_r ) |
| 504 | 505 | { |
| 505 | | UINT64 result = read64be_with_read8_handler(pc_fdc_r, machine, offset, mem_mask | 0xFFFF); |
| 506 | UINT64 result = read64be_with_read8_handler(pc_fdc_r, space, offset, mem_mask | 0xFFFF); |
| 506 | 507 | |
| 507 | 508 | if (((mem_mask >> 8) & 0xFF) == 0) |
| 508 | 509 | { |
| 509 | 510 | result &= ~(0xFF << 8); |
| 510 | | result |= ide_controller_r(ide_device(machine), 0x3F6) << 8; |
| 511 | result |= ide_controller_r(ide_device(space->machine), 0x3F6) << 8; |
| 511 | 512 | } |
| 512 | 513 | |
| 513 | 514 | if (((mem_mask >> 0) & 0xFF) == 0) |
| 514 | 515 | { |
| 515 | 516 | result &= ~(0xFF << 0); |
| 516 | | result |= ide_controller_r(ide_device(machine), 0x3F7) << 0; |
| 517 | result |= ide_controller_r(ide_device(space->machine), 0x3F7) << 0; |
| 517 | 518 | } |
| 518 | 519 | return result; |
| 519 | 520 | } |
| r3667 | r3668 | |
| 521 | 522 | |
| 522 | 523 | WRITE64_HANDLER( bebox_800003F0_w ) |
| 523 | 524 | { |
| 524 | | write64be_with_write8_handler(pc_fdc_w, machine, offset, data, mem_mask | 0xFFFF); |
| 525 | write64be_with_write8_handler(pc_fdc_w, space, offset, data, mem_mask | 0xFFFF); |
| 525 | 526 | |
| 526 | 527 | if (((mem_mask >> 8) & 0xFF) == 0) |
| 527 | | ide_controller_w(ide_device(machine), 0x3F6, (data >> 8) & 0xFF); |
| 528 | ide_controller_w(ide_device(space->machine), 0x3F6, (data >> 8) & 0xFF); |
| 528 | 529 | |
| 529 | 530 | if (((mem_mask >> 0) & 0xFF) == 0) |
| 530 | | ide_controller_w(ide_device(machine), 0x3F7, (data >> 0) & 0xFF); |
| 531 | ide_controller_w(ide_device(space->machine), 0x3F7, (data >> 0) & 0xFF); |
| 531 | 532 | } |
| 532 | 533 | |
| 533 | 534 | |
| r3667 | r3668 | |
| 546 | 547 | * |
| 547 | 548 | *************************************/ |
| 548 | 549 | |
| 549 | | static read8_machine_func bebox_vga_memory_rh; |
| 550 | | static write8_machine_func bebox_vga_memory_wh; |
| 550 | static read8_space_func bebox_vga_memory_rh; |
| 551 | static write8_space_func bebox_vga_memory_wh; |
| 551 | 552 | |
| 552 | 553 | static READ64_HANDLER( bebox_video_r ) |
| 553 | 554 | { |
| r3667 | r3668 | |
| 567 | 568 | |
| 568 | 569 | static READ64_HANDLER( bebox_vga_memory_r ) |
| 569 | 570 | { |
| 570 | | return read64be_with_read8_handler(bebox_vga_memory_rh, machine, offset, mem_mask); |
| 571 | return read64be_with_read8_handler(bebox_vga_memory_rh, space, offset, mem_mask); |
| 571 | 572 | } |
| 572 | 573 | |
| 573 | 574 | |
| 574 | 575 | static WRITE64_HANDLER( bebox_vga_memory_w ) |
| 575 | 576 | { |
| 576 | | write64be_with_write8_handler(bebox_vga_memory_wh, machine, offset, data, mem_mask); |
| 577 | write64be_with_write8_handler(bebox_vga_memory_wh, space, offset, data, mem_mask); |
| 577 | 578 | } |
| 578 | 579 | |
| 579 | 580 | |
| 580 | | static void bebox_map_vga_memory(offs_t begin, offs_t end, read8_machine_func rh, write8_machine_func wh) |
| 581 | static void bebox_map_vga_memory(offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh) |
| 581 | 582 | { |
| 582 | | read64_machine_func rh64 = (rh == SMH_BANK4) ? SMH_BANK4 : bebox_vga_memory_r; |
| 583 | | write64_machine_func wh64 = (wh == SMH_BANK4) ? SMH_BANK4 : bebox_vga_memory_w; |
| 583 | const address_space *space = cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ); |
| 584 | 584 | |
| 585 | read64_space_func rh64 = (rh == SMH_BANK4) ? SMH_BANK4 : bebox_vga_memory_r; |
| 586 | write64_space_func wh64 = (wh == SMH_BANK4) ? SMH_BANK4 : bebox_vga_memory_w; |
| 587 | |
| 585 | 588 | bebox_vga_memory_rh = rh; |
| 586 | 589 | bebox_vga_memory_wh = wh; |
| 587 | 590 | |
| 588 | | memory_install_read64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 589 | | memory_install_write64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 591 | memory_install_read64_handler(space, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 592 | memory_install_write64_handler(space, 0xC00A0000, 0xC00BFFFF, 0, 0, SMH_NOP); |
| 590 | 593 | |
| 591 | | memory_install_read64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, rh64); |
| 592 | | memory_install_write64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, wh64); |
| 594 | memory_install_read64_handler(space, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, rh64); |
| 595 | memory_install_write64_handler(space, 0xC0000000 + begin, 0xC0000000 + end, 0, 0, wh64); |
| 593 | 596 | } |
| 594 | 597 | |
| 595 | 598 | |
| r3667 | r3668 | |
| 665 | 668 | |
| 666 | 669 | READ64_HANDLER(bebox_page_r) |
| 667 | 670 | { |
| 668 | | return read64be_with_read8_handler(at_page8_r, machine, offset, mem_mask); |
| 671 | return read64be_with_read8_handler(at_page8_r, space, offset, mem_mask); |
| 669 | 672 | } |
| 670 | 673 | |
| 671 | 674 | |
| 672 | 675 | WRITE64_HANDLER(bebox_page_w) |
| 673 | 676 | { |
| 674 | | write64be_with_write8_handler(at_page8_w, machine, offset, data, mem_mask); |
| 677 | write64be_with_write8_handler(at_page8_w, space, offset, data, mem_mask); |
| 675 | 678 | } |
| 676 | 679 | |
| 677 | 680 | |
| r3667 | r3668 | |
| 707 | 710 | |
| 708 | 711 | WRITE64_HANDLER(bebox_80000480_w) |
| 709 | 712 | { |
| 710 | | write64be_with_write8_handler(at_hipage8_w, machine, offset, data, mem_mask); |
| 713 | write64be_with_write8_handler(at_hipage8_w, space, offset, data, mem_mask); |
| 711 | 714 | } |
| 712 | 715 | |
| 713 | 716 | |
| 714 | 717 | static DMA8237_MEM_READ( bebox_dma_read_byte ) |
| 715 | 718 | { |
| 719 | const address_space *space = cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ); |
| 716 | 720 | offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) |
| 717 | 721 | & 0x7FFF0000; |
| 718 | 722 | return memory_read_byte(space, page_offset + offset); |
| r3667 | r3668 | |
| 721 | 725 | |
| 722 | 726 | static DMA8237_MEM_WRITE( bebox_dma_write_byte ) |
| 723 | 727 | { |
| 728 | const address_space *space = cpu_get_address_space( device->machine->cpu[0], ADDRESS_SPACE_PROGRAM ); |
| 724 | 729 | offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) |
| 725 | 730 | & 0x7FFF0000; |
| 726 | 731 | memory_write_byte(space, page_offset + offset, data); |
| r3667 | r3668 | |
| 825 | 830 | |
| 826 | 831 | READ64_HANDLER( bebox_flash_r ) |
| 827 | 832 | { |
| 828 | | return read64be_with_read8_handler(bebox_flash8_r, machine, offset, mem_mask); |
| 833 | return read64be_with_read8_handler(bebox_flash8_r, space, offset, mem_mask); |
| 829 | 834 | } |
| 830 | 835 | |
| 831 | 836 | |
| 832 | 837 | WRITE64_HANDLER( bebox_flash_w ) |
| 833 | 838 | { |
| 834 | | write64be_with_write8_handler(bebox_flash8_w, machine, offset, data, mem_mask); |
| 839 | write64be_with_write8_handler(bebox_flash8_w, space, offset, data, mem_mask); |
| 835 | 840 | } |
| 836 | 841 | |
| 837 | 842 | |
| r3667 | r3668 | |
| 875 | 880 | int reg = offset*8; |
| 876 | 881 | UINT64 r = 0; |
| 877 | 882 | if (!(mem_mask & U64(0xff00000000000000))) { |
| 878 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+0) << 56; |
| 883 | r |= (UINT64)lsi53c810_reg_r(space, reg+0) << 56; |
| 879 | 884 | } |
| 880 | 885 | if (!(mem_mask & U64(0x00ff000000000000))) { |
| 881 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+1) << 48; |
| 886 | r |= (UINT64)lsi53c810_reg_r(space, reg+1) << 48; |
| 882 | 887 | } |
| 883 | 888 | if (!(mem_mask & U64(0x0000ff0000000000))) { |
| 884 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+2) << 40; |
| 889 | r |= (UINT64)lsi53c810_reg_r(space, reg+2) << 40; |
| 885 | 890 | } |
| 886 | 891 | if (!(mem_mask & U64(0x000000ff00000000))) { |
| 887 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+3) << 32; |
| 892 | r |= (UINT64)lsi53c810_reg_r(space, reg+3) << 32; |
| 888 | 893 | } |
| 889 | 894 | if (!(mem_mask & U64(0x00000000ff000000))) { |
| 890 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+4) << 24; |
| 895 | r |= (UINT64)lsi53c810_reg_r(space, reg+4) << 24; |
| 891 | 896 | } |
| 892 | 897 | if (!(mem_mask & U64(0x0000000000ff0000))) { |
| 893 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+5) << 16; |
| 898 | r |= (UINT64)lsi53c810_reg_r(space, reg+5) << 16; |
| 894 | 899 | } |
| 895 | 900 | if (!(mem_mask & U64(0x000000000000ff00))) { |
| 896 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+6) << 8; |
| 901 | r |= (UINT64)lsi53c810_reg_r(space, reg+6) << 8; |
| 897 | 902 | } |
| 898 | 903 | if (!(mem_mask & U64(0x00000000000000ff))) { |
| 899 | | r |= (UINT64)lsi53c810_reg_r(machine, reg+7) << 0; |
| 904 | r |= (UINT64)lsi53c810_reg_r(space, reg+7) << 0; |
| 900 | 905 | } |
| 901 | 906 | |
| 902 | 907 | return r; |
| r3667 | r3668 | |
| 907 | 912 | { |
| 908 | 913 | int reg = offset*8; |
| 909 | 914 | if (!(mem_mask & U64(0xff00000000000000))) { |
| 910 | | lsi53c810_reg_w(machine, reg+0, data >> 56); |
| 915 | lsi53c810_reg_w(space, reg+0, data >> 56); |
| 911 | 916 | } |
| 912 | 917 | if (!(mem_mask & U64(0x00ff000000000000))) { |
| 913 | | lsi53c810_reg_w(machine, reg+1, data >> 48); |
| 918 | lsi53c810_reg_w(space, reg+1, data >> 48); |
| 914 | 919 | } |
| 915 | 920 | if (!(mem_mask & U64(0x0000ff0000000000))) { |
| 916 | | lsi53c810_reg_w(machine, reg+2, data >> 40); |
| 921 | lsi53c810_reg_w(space, reg+2, data >> 40); |
| 917 | 922 | } |
| 918 | 923 | if (!(mem_mask & U64(0x000000ff00000000))) { |
| 919 | | lsi53c810_reg_w(machine, reg+3, data >> 32); |
| 924 | lsi53c810_reg_w(space, reg+3, data >> 32); |
| 920 | 925 | } |
| 921 | 926 | if (!(mem_mask & U64(0x00000000ff000000))) { |
| 922 | | lsi53c810_reg_w(machine, reg+4, data >> 24); |
| 927 | lsi53c810_reg_w(space, reg+4, data >> 24); |
| 923 | 928 | } |
| 924 | 929 | if (!(mem_mask & U64(0x0000000000ff0000))) { |
| 925 | | lsi53c810_reg_w(machine, reg+5, data >> 16); |
| 930 | lsi53c810_reg_w(space, reg+5, data >> 16); |
| 926 | 931 | } |
| 927 | 932 | if (!(mem_mask & U64(0x000000000000ff00))) { |
| 928 | | lsi53c810_reg_w(machine, reg+6, data >> 8); |
| 933 | lsi53c810_reg_w(space, reg+6, data >> 8); |
| 929 | 934 | } |
| 930 | 935 | if (!(mem_mask & U64(0x00000000000000ff))) { |
| 931 | | lsi53c810_reg_w(machine, reg+7, data >> 0); |
| 936 | lsi53c810_reg_w(space, reg+7, data >> 0); |
| 932 | 937 | } |
| 933 | 938 | } |
| 934 | 939 | |
| r3667 | r3668 | |
| 941 | 946 | static UINT32 scsi53c810_fetch(UINT32 dsp) |
| 942 | 947 | { |
| 943 | 948 | UINT32 result; |
| 944 | | result = program_read_dword_64be(dsp & 0x7FFFFFFF); |
| 949 | result = memory_read_dword_64be( cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), dsp & 0x7FFFFFFF); |
| 945 | 950 | return BYTE_REVERSE32(result); |
| 946 | 951 | } |
| 947 | 952 | |
| r3667 | r3668 | |
| 1007 | 1012 | /* brutal ugly hack; at some point the PCI code should be handling this stuff */ |
| 1008 | 1013 | if (scsi53c810_data[5] != 0xFFFFFFF0) |
| 1009 | 1014 | { |
| 1015 | const address_space *space = cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ); |
| 1016 | |
| 1010 | 1017 | addr = (scsi53c810_data[5] | 0xC0000000) & ~0xFF; |
| 1011 | | memory_install_read64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, addr, addr + 0xFF, 0, 0, scsi53c810_r); |
| 1012 | | memory_install_write64_handler(Machine, 0, ADDRESS_SPACE_PROGRAM, addr, addr + 0xFF, 0, 0, scsi53c810_w); |
| 1018 | memory_install_read64_handler(space, addr, addr + 0xFF, 0, 0, scsi53c810_r); |
| 1019 | memory_install_write64_handler(space, addr, addr + 0xFF, 0, 0, scsi53c810_w); |
| 1013 | 1020 | } |
| 1014 | 1021 | } |
| 1015 | 1022 | break; |
| r3667 | r3668 | |
| 1089 | 1096 | |
| 1090 | 1097 | DRIVER_INIT( bebox ) |
| 1091 | 1098 | { |
| 1092 | | int cpu; |
| 1099 | const address_space *space_0 = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ); |
| 1100 | const address_space *space_1 = cpu_get_address_space( machine->cpu[1], ADDRESS_SPACE_PROGRAM ); |
| 1093 | 1101 | offs_t vram_begin; |
| 1094 | 1102 | offs_t vram_end; |
| 1095 | 1103 | |
| r3667 | r3668 | |
| 1103 | 1111 | intelflash_init(0, FLASH_FUJITSU_29F016A, memory_region(machine, "user1")); |
| 1104 | 1112 | |
| 1105 | 1113 | /* install MESS managed RAM */ |
| 1106 | | for (cpu = 0; cpu < 2; cpu++) |
| 1107 | | { |
| 1108 | | memory_install_read64_handler(machine, cpu, ADDRESS_SPACE_PROGRAM, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1109 | | memory_install_write64_handler(machine, cpu, ADDRESS_SPACE_PROGRAM, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1110 | | } |
| 1114 | memory_install_read64_handler(space_0, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1115 | memory_install_write64_handler(space_0, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1116 | memory_install_read64_handler(space_1, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1117 | memory_install_write64_handler(space_1, 0, mess_ram_size - 1, 0, 0x02000000, SMH_BANK3); |
| 1111 | 1118 | memory_set_bankptr(machine, 3, mess_ram); |
| 1112 | 1119 | |
| 1113 | 1120 | mc146818_init(machine, MC146818_STANDARD); |
| r3667 | r3668 | |
| 1117 | 1124 | /* install VGA memory */ |
| 1118 | 1125 | vram_begin = 0xC1000000; |
| 1119 | 1126 | vram_end = vram_begin + pc_vga_memory_size() - 1; |
| 1120 | | for (cpu = 0; cpu < 2; cpu++) |
| 1121 | | { |
| 1122 | | memory_install_read64_handler(machine, cpu, ADDRESS_SPACE_PROGRAM, vram_begin, vram_end, 0, 0, bebox_video_r); |
| 1123 | | memory_install_write64_handler(machine, cpu, ADDRESS_SPACE_PROGRAM, vram_begin, vram_end, 0, 0, bebox_video_w); |
| 1124 | | } |
| 1127 | memory_install_read64_handler(space_0, vram_begin, vram_end, 0, 0, bebox_video_r); |
| 1128 | memory_install_write64_handler(space_0, vram_begin, vram_end, 0, 0, bebox_video_w); |
| 1129 | memory_install_read64_handler(space_1, vram_begin, vram_end, 0, 0, bebox_video_r); |
| 1130 | memory_install_write64_handler(space_1, vram_begin, vram_end, 0, 0, bebox_video_w); |
| 1125 | 1131 | |
| 1126 | 1132 | /* The following is a verrrry ugly hack put in to support NetBSD for |
| 1127 | 1133 | * NetBSD. When NetBSD/bebox it does most of its work on CPU #0 and then |
| r3667 | r3668 | |
| 1141 | 1147 | /* bcctr 0x14, 0 */ |
| 1142 | 1148 | U64(0x4E80042000000000) |
| 1143 | 1149 | }; |
| 1144 | | memory_install_read64_handler(machine, 1, ADDRESS_SPACE_PROGRAM, 0x9421FFF0, 0x9421FFFF, 0, 0, SMH_BANK1); |
| 1150 | memory_install_read64_handler(space_1, 0x9421FFF0, 0x9421FFFF, 0, 0, SMH_BANK1); |
| 1145 | 1151 | memory_set_bankptr(machine, 1, ops); |
| 1146 | 1152 | } |
| 1147 | 1153 | } |