trunk/src/emu/machine/i6300esb.c
| r242397 | r242398 | |
| 40 | 40 | AM_RANGE(0x88, 0x8b) AM_READWRITE8 (d31_err_sts_r, d31_err_sts_w, 0x00ff0000) |
| 41 | 41 | AM_RANGE(0x90, 0x93) AM_READWRITE16(pci_dma_cfg_r, pci_dma_cfg_w, 0x0000ffff) |
| 42 | 42 | AM_RANGE(0xa0, 0xa3) AM_READWRITE16(gen_pmcon_1_r, gen_pmcon_1_w, 0x0000ffff) |
| 43 | | AM_RANGE(0xa0, 0xa3) AM_READWRITE16(gen_pmcon_2_r, gen_pmcon_2_w, 0xffff0000) |
| 43 | AM_RANGE(0xa0, 0xa3) AM_READWRITE8 (gen_pmcon_2_r, gen_pmcon_2_w, 0x00ff0000) |
| 44 | 44 | AM_RANGE(0xa4, 0xa7) AM_READWRITE8 (gen_pmcon_3_r, gen_pmcon_3_w, 0x000000ff) |
| 45 | 45 | AM_RANGE(0xac, 0xaf) AM_READWRITE (rst_cnt2_r, rst_cnt2_w) |
| 46 | 46 | AM_RANGE(0xb0, 0xb3) AM_READWRITE8 (apm_cnt_r, apm_cnt_w, 0x00ff0000) |
| r242397 | r242398 | |
| 294 | 294 | logerror("%s: gen_pmcon_1 = %04x\n", tag(), gen_pmcon_1); |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | | READ16_MEMBER (i6300esb_lpc_device::gen_pmcon_2_r) |
| 297 | READ8_MEMBER (i6300esb_lpc_device::gen_pmcon_2_r) |
| 298 | 298 | { |
| 299 | 299 | return gen_pmcon_2; |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | | WRITE16_MEMBER(i6300esb_lpc_device::gen_pmcon_2_w) |
| 302 | WRITE8_MEMBER (i6300esb_lpc_device::gen_pmcon_2_w) |
| 303 | 303 | { |
| 304 | | COMBINE_DATA(&gen_pmcon_2); |
| 305 | | logerror("%s: gen_pmcon_2 = %04x\n", tag(), gen_pmcon_2); |
| 304 | gen_pmcon_2 = data; |
| 305 | logerror("%s: gen_pmcon_2 = %02x\n", tag(), gen_pmcon_2); |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | READ8_MEMBER (i6300esb_lpc_device::gen_pmcon_3_r) |
trunk/src/emu/machine/i6300esb.h
| r242397 | r242398 | |
| 37 | 37 | DECLARE_ADDRESS_MAP(internal_io_map, 32); |
| 38 | 38 | |
| 39 | 39 | UINT32 pmbase, gpio_base, fwh_sel1, gen_cntl, etr1, rst_cnt2, gpi_rout; |
| 40 | | UINT16 bios_cntl, pci_dma_cfg, gen1_dec, lpc_en, gen2_dec, fwh_sel2, func_dis, gen_pmcon_1, gen_pmcon_2; |
| 40 | UINT16 bios_cntl, pci_dma_cfg, gen1_dec, lpc_en, gen2_dec, fwh_sel2, func_dis, gen_pmcon_1; |
| 41 | 41 | UINT16 mon_trp_rng[4], mon_trp_msk; |
| 42 | 42 | UINT8 pirq_rout[8]; |
| 43 | 43 | UINT8 acpi_cntl, tco_cntl, gpio_cntl, serirq_cntl, d31_err_cfg, d31_err_sts, gen_sta, back_cntl, rtc_conf; |
| 44 | 44 | UINT8 lpc_if_com_range, lpc_if_fdd_lpt_range, lpc_if_sound_range, fwh_dec_en1, fwh_dec_en2, siu_config_port; |
| 45 | | UINT8 gen_pmcon_3, apm_cnt, apm_sts, mon_fwd_en, nmi_sc; |
| 45 | UINT8 gen_pmcon_2, gen_pmcon_3, apm_cnt, apm_sts, mon_fwd_en, nmi_sc; |
| 46 | 46 | int siu_config_state; |
| 47 | 47 | |
| 48 | 48 | DECLARE_WRITE8_MEMBER (nop_w); |
| r242397 | r242398 | |
| 74 | 74 | DECLARE_WRITE16_MEMBER(pci_dma_cfg_w); |
| 75 | 75 | DECLARE_READ16_MEMBER (gen_pmcon_1_r); // a0 |
| 76 | 76 | DECLARE_WRITE16_MEMBER(gen_pmcon_1_w); |
| 77 | | DECLARE_READ16_MEMBER (gen_pmcon_2_r); // a2 |
| 78 | | DECLARE_WRITE16_MEMBER(gen_pmcon_2_w); |
| 77 | DECLARE_READ8_MEMBER (gen_pmcon_2_r); // a2 |
| 78 | DECLARE_WRITE8_MEMBER(gen_pmcon_2_w); |
| 79 | 79 | DECLARE_READ8_MEMBER (gen_pmcon_3_r); // a4 |
| 80 | 80 | DECLARE_WRITE8_MEMBER (gen_pmcon_3_w); |
| 81 | 81 | DECLARE_READ32_MEMBER (rst_cnt2_r); // ac |
trunk/src/emu/machine/i82875p.c
| r242397 | r242398 | |
| 1 | 1 | #include "i82875p.h" |
| 2 | 2 | |
| 3 | | const device_type I82875P_HOST = &device_creator<i82875p_host_device>; |
| 4 | | const device_type I82875P_AGP = &device_creator<i82875p_agp_device>; |
| 3 | const device_type I82875P_HOST = &device_creator<i82875p_host_device>; |
| 4 | const device_type I82875P_AGP = &device_creator<i82875p_agp_device>; |
| 5 | const device_type I82875P_OVERFLOW = &device_creator<i82875p_overflow_device>; |
| 5 | 6 | |
| 6 | 7 | DEVICE_ADDRESS_MAP_START(agp_translation_map, 32, i82875p_host_device) |
| 7 | 8 | ADDRESS_MAP_END |
| r242397 | r242398 | |
| 237 | 238 | return toud; |
| 238 | 239 | } |
| 239 | 240 | |
| 241 | #include "debugger.h" |
| 242 | |
| 240 | 243 | WRITE16_MEMBER(i82875p_host_device::toud_w) |
| 241 | 244 | { |
| 242 | 245 | COMBINE_DATA(&toud); |
| 243 | 246 | toud &= ~7; |
| 244 | 247 | logerror("%s: toud = %08x\n", tag(), toud << 16); |
| 245 | 248 | remap_cb(); |
| 249 | debugger_break(machine()); |
| 246 | 250 | } |
| 247 | 251 | |
| 248 | 252 | READ16_MEMBER( i82875p_host_device::mchcfg_r) |
| r242397 | r242398 | |
| 344 | 348 | io_space->install_device(0, 0xffff, *static_cast<pci_host_device *>(this), &pci_host_device::io_configuration_access_map); |
| 345 | 349 | |
| 346 | 350 | UINT32 top = toud << 16; |
| 351 | if(esmramc & 1) { |
| 352 | switch((esmramc >> 1) & 3) { |
| 353 | case 2: top += 512*1024; break; |
| 354 | case 3: top += 1024*1024; break; |
| 355 | } |
| 356 | } |
| 357 | |
| 347 | 358 | if(top > ram_size) |
| 348 | 359 | top = ram_size; |
| 349 | 360 | |
| r242397 | r242398 | |
| 416 | 427 | } |
| 417 | 428 | |
| 418 | 429 | |
| 419 | | |
| 420 | | |
| 421 | 430 | i82875p_agp_device::i82875p_agp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 422 | 431 | : agp_bridge_device(mconfig, I82875P_AGP, "i82875p AGP bridge", tag, owner, clock, "i82875p_agp", __FILE__) |
| 423 | 432 | { |
| r242397 | r242398 | |
| 432 | 441 | { |
| 433 | 442 | agp_bridge_device::device_reset(); |
| 434 | 443 | } |
| 444 | |
| 445 | DEVICE_ADDRESS_MAP_START(overflow_map, 32, i82875p_overflow_device) |
| 446 | AM_RANGE(0x000, 0x007) AM_READWRITE8(dram_row_boundary_r, dram_row_boundary_w, 0xffffffff) |
| 447 | AM_RANGE(0x010, 0x013) AM_READWRITE8(dram_row_attribute_r, dram_row_attribute_w, 0xffffffff) |
| 448 | AM_RANGE(0x060, 0x064) AM_READWRITE (dram_timing_r, dram_timing_w) |
| 449 | AM_RANGE(0x068, 0x06b) AM_READWRITE (dram_controller_mode_r, dram_controller_mode_w) |
| 450 | ADDRESS_MAP_END |
| 451 | |
| 452 | |
| 453 | i82875p_overflow_device::i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 454 | : pci_device(mconfig, I82875P_OVERFLOW, "i82875p configuration overflow", tag, owner, clock, "i82875p_overflow", __FILE__) |
| 455 | { |
| 456 | } |
| 457 | |
| 458 | void i82875p_overflow_device::device_start() |
| 459 | { |
| 460 | pci_device::device_start(); |
| 461 | |
| 462 | add_map(4*1024, M_MEM, FUNC(i82875p_overflow_device::overflow_map)); |
| 463 | } |
| 464 | |
| 465 | void i82875p_overflow_device::device_reset() |
| 466 | { |
| 467 | pci_device::device_reset(); |
| 468 | memset(dram_row_boundary, 1, sizeof(dram_row_boundary)); |
| 469 | memset(dram_row_attribute, 0, sizeof(dram_row_attribute)); |
| 470 | dram_timing = 0; |
| 471 | dram_controller_mode = 0x00010001; |
| 472 | } |
| 473 | |
| 474 | READ8_MEMBER (i82875p_overflow_device::dram_row_boundary_r) |
| 475 | { |
| 476 | return dram_row_boundary[offset]; |
| 477 | } |
| 478 | |
| 479 | WRITE8_MEMBER (i82875p_overflow_device::dram_row_boundary_w) |
| 480 | { |
| 481 | dram_row_boundary[offset] = data; |
| 482 | logerror("%s: dram_row_boundary_w %d, %02x\n", tag(), offset, data); |
| 483 | } |
| 484 | |
| 485 | READ8_MEMBER (i82875p_overflow_device::dram_row_attribute_r) |
| 486 | { |
| 487 | return dram_row_attribute[offset]; |
| 488 | } |
| 489 | |
| 490 | WRITE8_MEMBER (i82875p_overflow_device::dram_row_attribute_w) |
| 491 | { |
| 492 | dram_row_attribute[offset] = data; |
| 493 | logerror("%s: dram_row_attribute_w %d, %02x\n", tag(), offset, data); |
| 494 | } |
| 495 | |
| 496 | READ32_MEMBER (i82875p_overflow_device::dram_timing_r) |
| 497 | { |
| 498 | return dram_timing; |
| 499 | } |
| 500 | |
| 501 | WRITE32_MEMBER(i82875p_overflow_device::dram_timing_w) |
| 502 | { |
| 503 | COMBINE_DATA(&dram_timing); |
| 504 | logerror("%s: dram_timing_w %08x\n", tag(), dram_timing); |
| 505 | } |
| 506 | |
| 507 | READ32_MEMBER (i82875p_overflow_device::dram_controller_mode_r) |
| 508 | { |
| 509 | return dram_controller_mode; |
| 510 | } |
| 511 | |
| 512 | WRITE32_MEMBER(i82875p_overflow_device::dram_controller_mode_w) |
| 513 | { |
| 514 | COMBINE_DATA(&dram_controller_mode); |
| 515 | logerror("%s: dram_controller_mode_w %08x\n", tag(), dram_controller_mode); |
| 516 | } |
trunk/src/emu/machine/i82875p.h
| r242397 | r242398 | |
| 5 | 5 | |
| 6 | 6 | #include "pci.h" |
| 7 | 7 | |
| 8 | | #define MCFG_I82875P_HOST_ADD(_tag, _subdevice_id, _cpu_tag, _ram_size) \ |
| 8 | #define MCFG_I82875P_HOST_ADD(_tag, _subdevice_id, _cpu_tag, _ram_size) \ |
| 9 | 9 | MCFG_PCI_HOST_ADD(_tag, I82875P_HOST, 0x80862578, 0x02, _subdevice_id) \ |
| 10 | | downcast<i82875p_host_device *>(device)->set_cpu_tag(_cpu_tag); \ |
| 10 | downcast<i82875p_host_device *>(device)->set_cpu_tag(_cpu_tag); \ |
| 11 | 11 | downcast<i82875p_host_device *>(device)->set_ram_size(_ram_size); |
| 12 | 12 | |
| 13 | 13 | #define MCFG_I82875P_AGP_ADD(_tag) \ |
| 14 | 14 | MCFG_AGP_BRIDGE_ADD(_tag, I82875P_AGP, 0x80862579, 0x02) |
| 15 | 15 | |
| 16 | #define MCFG_I82875P_OVERFLOW_ADD(_tag, _subdevice_id) \ |
| 17 | MCFG_PCI_DEVICE_ADD(_tag, I82875P_OVERFLOW, 0x8086257e, 0x02, 0x088000, _subdevice_id) |
| 18 | |
| 16 | 19 | class i82875p_host_device : public pci_host_device { |
| 17 | 20 | public: |
| 18 | 21 | i82875p_host_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| r242397 | r242398 | |
| 100 | 103 | virtual void device_reset(); |
| 101 | 104 | }; |
| 102 | 105 | |
| 106 | class i82875p_overflow_device : public pci_device { |
| 107 | public: |
| 108 | i82875p_overflow_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); |
| 109 | |
| 110 | |
| 111 | DECLARE_READ8_MEMBER (dram_row_boundary_r); |
| 112 | DECLARE_WRITE8_MEMBER (dram_row_boundary_w); |
| 113 | DECLARE_READ8_MEMBER (dram_row_attribute_r); |
| 114 | DECLARE_WRITE8_MEMBER (dram_row_attribute_w); |
| 115 | DECLARE_READ32_MEMBER (dram_timing_r); |
| 116 | DECLARE_WRITE32_MEMBER(dram_timing_w); |
| 117 | DECLARE_READ32_MEMBER (dram_controller_mode_r); |
| 118 | DECLARE_WRITE32_MEMBER(dram_controller_mode_w); |
| 119 | |
| 120 | protected: |
| 121 | |
| 122 | virtual void device_start(); |
| 123 | virtual void device_reset(); |
| 124 | |
| 125 | private: |
| 126 | DECLARE_ADDRESS_MAP(overflow_map, 32); |
| 127 | |
| 128 | UINT8 dram_row_boundary[8], dram_row_attribute[4]; |
| 129 | UINT32 dram_timing, dram_controller_mode; |
| 130 | }; |
| 131 | |
| 103 | 132 | extern const device_type I82875P_HOST; |
| 104 | 133 | extern const device_type I82875P_AGP; |
| 134 | extern const device_type I82875P_OVERFLOW; |
| 105 | 135 | |
| 106 | 136 | |
| 107 | 137 | #endif |
trunk/src/emu/machine/pci.c
| r242397 | r242398 | |
| 459 | 459 | for(int i=0; i != all_devices.count(); i++) |
| 460 | 460 | if(all_devices[i] != this) |
| 461 | 461 | all_devices[i]->reset_all_mappings(); |
| 462 | |
| 463 | prefetch_baseu = 0; |
| 464 | prefetch_limitu = 0; |
| 465 | memory_base = 0; |
| 466 | memory_limit = 0; |
| 467 | prefetch_base = 0; |
| 468 | prefetch_limit = 0; |
| 469 | iobaseu = 0; |
| 470 | iolimitu = 0; |
| 471 | iobase = 0; |
| 472 | iolimit = 0; |
| 462 | 473 | } |
| 463 | 474 | |
| 464 | 475 | void pci_bridge_device::map_device(UINT64 memory_window_start, UINT64 memory_window_end, UINT64 memory_offset, address_space *memory_space, |
| r242397 | r242398 | |
| 595 | 606 | |
| 596 | 607 | READ8_MEMBER (pci_bridge_device::iobase_r) |
| 597 | 608 | { |
| 598 | | logerror("%s: iobase_r\n", tag()); |
| 599 | | return 0xff; |
| 609 | return iobase; |
| 600 | 610 | } |
| 601 | 611 | |
| 602 | 612 | WRITE8_MEMBER (pci_bridge_device::iobase_w) |
| 603 | 613 | { |
| 614 | iobase = data; |
| 604 | 615 | logerror("%s: iobase_w %02x\n", tag(), data); |
| 605 | 616 | } |
| 606 | 617 | |
| 607 | 618 | READ8_MEMBER (pci_bridge_device::iolimit_r) |
| 608 | 619 | { |
| 609 | | logerror("%s: iolimit_r\n", tag()); |
| 610 | | return 0xff; |
| 620 | return iolimit; |
| 611 | 621 | } |
| 612 | 622 | |
| 613 | 623 | WRITE8_MEMBER (pci_bridge_device::iolimit_w) |
| 614 | 624 | { |
| 625 | iolimit = data; |
| 615 | 626 | logerror("%s: iolimit_w %02x\n", tag(), data); |
| 616 | 627 | } |
| 617 | 628 | |
| r242397 | r242398 | |
| 628 | 639 | |
| 629 | 640 | READ16_MEMBER (pci_bridge_device::memory_base_r) |
| 630 | 641 | { |
| 631 | | logerror("%s: memory_base_r\n", tag()); |
| 632 | | return 0xffff; |
| 642 | return memory_base; |
| 633 | 643 | } |
| 634 | 644 | |
| 635 | 645 | WRITE16_MEMBER(pci_bridge_device::memory_base_w) |
| 636 | 646 | { |
| 637 | | logerror("%s: memory_base_w %04x\n", tag(), data); |
| 647 | COMBINE_DATA(&memory_base); |
| 648 | logerror("%s: memory_base_w %04x\n", tag(), memory_base); |
| 638 | 649 | } |
| 639 | 650 | |
| 640 | 651 | READ16_MEMBER (pci_bridge_device::memory_limit_r) |
| 641 | 652 | { |
| 642 | | logerror("%s: memory_limit_r\n", tag()); |
| 643 | | return 0xffff; |
| 653 | return memory_limit; |
| 644 | 654 | } |
| 645 | 655 | |
| 646 | 656 | WRITE16_MEMBER(pci_bridge_device::memory_limit_w) |
| 647 | 657 | { |
| 648 | | logerror("%s: memory_limit_w %04x\n", tag(), data); |
| 658 | COMBINE_DATA(&memory_limit); |
| 659 | logerror("%s: memory_limit_w %04x\n", tag(), memory_limit); |
| 649 | 660 | } |
| 650 | 661 | |
| 651 | 662 | READ16_MEMBER (pci_bridge_device::prefetch_base_r) |
| 652 | 663 | { |
| 653 | | logerror("%s: prefetch_base_r\n", tag()); |
| 654 | | return 0xffff; |
| 664 | return prefetch_base; |
| 655 | 665 | } |
| 656 | 666 | |
| 657 | 667 | WRITE16_MEMBER(pci_bridge_device::prefetch_base_w) |
| 658 | 668 | { |
| 659 | | logerror("%s: prefetch_base_w %04x\n", tag(), data); |
| 669 | COMBINE_DATA(&prefetch_base); |
| 670 | logerror("%s: prefetch_base_w %04x\n", tag(), prefetch_base); |
| 660 | 671 | } |
| 661 | 672 | |
| 662 | 673 | READ16_MEMBER (pci_bridge_device::prefetch_limit_r) |
| 663 | 674 | { |
| 664 | | logerror("%s: prefetch_limit_r\n", tag()); |
| 665 | | return 0xffff; |
| 675 | return prefetch_limit; |
| 666 | 676 | } |
| 667 | 677 | |
| 668 | 678 | WRITE16_MEMBER(pci_bridge_device::prefetch_limit_w) |
| 669 | 679 | { |
| 670 | | logerror("%s: prefetch_limit_w %04x\n", tag(), data); |
| 680 | COMBINE_DATA(&prefetch_limit); |
| 681 | logerror("%s: prefetch_limit_w %04x\n", tag(), prefetch_limit); |
| 671 | 682 | } |
| 672 | 683 | |
| 673 | 684 | READ32_MEMBER (pci_bridge_device::prefetch_baseu_r) |
| 674 | 685 | { |
| 675 | | logerror("%s: prefetch_baseu_r\n", tag()); |
| 676 | | return 0xffffffff; |
| 686 | return prefetch_baseu; |
| 677 | 687 | } |
| 678 | 688 | |
| 679 | 689 | WRITE32_MEMBER(pci_bridge_device::prefetch_baseu_w) |
| 680 | 690 | { |
| 681 | | logerror("%s: prefetch_baseu_w %08x\n", tag(), data); |
| 691 | COMBINE_DATA(&prefetch_baseu); |
| 692 | logerror("%s: prefetch_baseu_w %08x\n", tag(), prefetch_baseu); |
| 682 | 693 | } |
| 683 | 694 | |
| 684 | 695 | READ32_MEMBER (pci_bridge_device::prefetch_limitu_r) |
| 685 | 696 | { |
| 686 | | logerror("%s: prefetch_limitu_r\n", tag()); |
| 687 | | return 0xffffffff; |
| 697 | return prefetch_limitu; |
| 688 | 698 | } |
| 689 | 699 | |
| 690 | 700 | WRITE32_MEMBER(pci_bridge_device::prefetch_limitu_w) |
| 691 | 701 | { |
| 692 | | logerror("%s: prefetch_limitu_w %08x\n", tag(), data); |
| 702 | COMBINE_DATA(&prefetch_limitu); |
| 703 | logerror("%s: prefetch_limitu_w %08x\n", tag(), prefetch_limitu); |
| 693 | 704 | } |
| 694 | 705 | |
| 695 | 706 | READ16_MEMBER (pci_bridge_device::iobaseu_r) |
| 696 | 707 | { |
| 697 | | logerror("%s: iobaseu_r\n", tag()); |
| 698 | | return 0xffff; |
| 708 | return iobaseu; |
| 699 | 709 | } |
| 700 | 710 | |
| 701 | 711 | WRITE16_MEMBER(pci_bridge_device::iobaseu_w) |
| 702 | 712 | { |
| 703 | | logerror("%s: iobaseu_w %04x\n", tag(), data); |
| 713 | COMBINE_DATA(&iobaseu); |
| 714 | logerror("%s: iobaseu_w %04x\n", tag(), iobaseu); |
| 704 | 715 | } |
| 705 | 716 | |
| 706 | 717 | READ16_MEMBER (pci_bridge_device::iolimitu_r) |
| 707 | 718 | { |
| 708 | | logerror("%s: iolimitu_r\n", tag()); |
| 709 | | return 0xffff; |
| 719 | return iolimitu; |
| 710 | 720 | } |
| 711 | 721 | |
| 712 | 722 | WRITE16_MEMBER(pci_bridge_device::iolimitu_w) |
| 713 | 723 | { |
| 714 | | logerror("%s: iolimitu_w %04x\n", tag(), data); |
| 724 | COMBINE_DATA(&iolimitu); |
| 725 | logerror("%s: iolimitu_w %04x\n", tag(), iolimitu); |
| 715 | 726 | } |
| 716 | 727 | |
| 717 | 728 | READ8_MEMBER (pci_bridge_device::interrupt_line_r) |
| r242397 | r242398 | |
| 738 | 749 | |
| 739 | 750 | READ16_MEMBER (pci_bridge_device::bridge_control_r) |
| 740 | 751 | { |
| 741 | | logerror("%s: bridge_control_r\n", tag()); |
| 742 | 752 | return bridge_control; |
| 743 | 753 | } |
| 744 | 754 | |